Skip to content

Commit

Permalink
refactor(core): squash all commits to fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
tommayeliog committed May 21, 2024
1 parent 90d84e9 commit 9cfb48d
Show file tree
Hide file tree
Showing 190 changed files with 3,689 additions and 5,171 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/chromatic-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
chromatic-deployment:
name: Chromatic Core
if: github.event.pull_request.draft == false
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/chromatic-staking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
chromatic-deployment:
name: Chromatic Staking
if: github.event.pull_request.draft == false
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/chromatic-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
chromatic-deployment:
name: Chromatic UI
if: github.event.pull_request.draft == false
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ concurrency:
jobs:
prepare:
name: Prepare
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04

steps:
- name: Checkout repository
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:

unitTests:
name: Unit tests
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04
needs: prepare

steps:
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:

smokeTests:
name: Smoke tests
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04
needs: prepare

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-tests-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ jobs:
publish-reports-linux:
if: always()
needs: run-tests-windows
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonar-cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:
jobs:
sonarcloud:
name: SonarCloud Code Analysis
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
Expand Down
3 changes: 3 additions & 0 deletions apps/browser-extension-wallet/.env.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ USE_MULTI_DELEGATION_STAKING_ACTIVITY=true
USE_MULTI_DELEGATION_STAKING_GRID_VIEW=true
USE_MULTI_DELEGATION_STAKING_FILTERS=false
USE_ROS_STAKING_COLUMN=false
USE_FOOR_TOPUP=false

USE_POSTHOG_ANALYTICS_FOR_OPTED_OUT=false
USE_MULTI_WALLET=true
Expand All @@ -48,6 +49,8 @@ PRIVACY_POLICY_URL=https://www.lace.io/iog-privacy-policy.pdf
COOKIE_POLICY_URL=https://www.lace.io/lace-cookie-policy.pdf
TERMS_OF_USE_URL=https://www.lace.io/lace-terms-of-use.pdf
YOUTUBE_RECOVERY_PHRASE_VIDEO_URL=https://www.youtube-nocookie.com/embed/hOFVXo969rk?si=0a-hNDVME6eTboIX
BANXA_LACE_URL=https://lacewallet.banxa-sandbox.com/
BANXA_HOMEPAGE_URL=https://banxa.com/

# events tracking
PUBLIC_POSTHOG_HOST=https://eu.posthog.com
Expand Down
3 changes: 3 additions & 0 deletions apps/browser-extension-wallet/.env.developerpreview
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ USE_MULTI_DELEGATION_STAKING_TREZOR=false
USE_MULTI_DELEGATION_STAKING_ACTIVITY=true
USE_MULTI_DELEGATION_STAKING_GRID_VIEW=true
USE_ROS_STAKING_COLUMN=false
USE_FOOR_TOPUP=false

USE_POSTHOG_ANALYTICS_FOR_OPTED_OUT=false
USE_MULTI_WALLET=false
Expand All @@ -48,6 +49,8 @@ PRIVACY_POLICY_URL=https://www.lace.io/iog-privacy-policy.pdf
COOKIE_POLICY_URL=https://www.lace.io/lace-cookie-policy.pdf
TERMS_OF_USE_URL=https://www.lace.io/lace-terms-of-use.pdf
YOUTUBE_RECOVERY_PHRASE_VIDEO_URL=https://www.youtube-nocookie.com/embed/hOFVXo969rk?si=0a-hNDVME6eTboIX
BANXA_LACE_URL=https://lacewallet.banxa-sandbox.com/
BANXA_HOMEPAGE_URL=https://banxa.com/

# events tracking
PUBLIC_POSTHOG_HOST=https://eu.posthog.com
Expand Down
3 changes: 3 additions & 0 deletions apps/browser-extension-wallet/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ USE_MULTI_DELEGATION_STAKING_ACTIVITY=true
USE_MULTI_DELEGATION_STAKING_GRID_VIEW=true
USE_MULTI_DELEGATION_STAKING_FILTERS=false
USE_ROS_STAKING_COLUMN=false
USE_FOOR_TOPUP=false

# In App URLs
CATALYST_GOOGLE_PLAY_URL=https://play.google.com/store/apps/details?id=io.iohk.vitvoting
Expand All @@ -44,6 +45,8 @@ PRIVACY_POLICY_URL=https://www.lace.io/iog-privacy-policy.pdf
COOKIE_POLICY_URL=https://www.lace.io/lace-cookie-policy.pdf
TERMS_OF_USE_URL=https://www.lace.io/lace-terms-of-use.pdf
YOUTUBE_RECOVERY_PHRASE_VIDEO_URL=https://www.youtube-nocookie.com/embed/hOFVXo969rk?si=0a-hNDVME6eTboIX
BANXA_LACE_URL=https://lacewallet.banxa-sandbox.com/
BANXA_HOMEPAGE_URL=https://banxa.com/
# events tracking
PUBLIC_POSTHOG_HOST=https://eu.posthog.com
# set this variable to true only in release packages. By having this set to false, we ensure that we will not be using Post Hog production projects tokens in development stage
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import React, { useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { ConfirmDRepRegistration } from '@lace/core';
import { certificateInspectorFactory, depositPaidWithSymbol, drepIDasBech32FromHash } from './utils';
import { ConfirmDRepRegistration, DappInfo } from '@lace/core';
import { certificateInspectorFactory, depositPaidWithSymbol } from './utils';
import { Wallet } from '@lace/cardano';
import { useWalletStore } from '@src/stores';
import { useViewsFlowContext } from '@providers';
import { Skeleton } from 'antd';
import { Box, Flex } from '@lace/ui';

const { CertificateType } = Wallet.Cardano;

export const ConfirmDRepRegistrationContainer = (): React.ReactElement => {
const { t } = useTranslation();
const {
walletUI: { cardanoCoin }
} = useWalletStore();
Expand All @@ -37,26 +36,19 @@ export const ConfirmDRepRegistrationContainer = (): React.ReactElement => {
}

const depositPaidWithCardanoSymbol = depositPaidWithSymbol(certificate.deposit, cardanoCoin);

// TODO: might be changed in scope of https://input-output.atlassian.net/browse/LW-9034
return (
<ConfirmDRepRegistration
dappInfo={dappInfo}
metadata={{
depositPaid: depositPaidWithCardanoSymbol,
drepId: drepIDasBech32FromHash(certificate.dRepCredential.hash),
hash: certificate.anchor?.dataHash,
url: certificate.anchor?.url
}}
translations={{
metadata: t('core.DRepRegistration.metadata'),
labels: {
depositPaid: t('core.DRepRegistration.depositPaid'),
drepId: t('core.DRepRegistration.drepId'),
hash: t('core.DRepRegistration.hash'),
url: t('core.DRepRegistration.url')
}
}}
/>
<Flex h="$fill" flexDirection="column">
<Box mb={'$24'} mt={'$24'}>
<DappInfo {...dappInfo} />
</Box>
<ConfirmDRepRegistration
metadata={{
depositPaid: depositPaidWithCardanoSymbol,
drepId: Wallet.util.drepIDasBech32FromHash(certificate.dRepCredential.hash),
hash: certificate.anchor?.dataHash,
url: certificate.anchor?.url
}}
/>
</Flex>
);
};
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import React, { useCallback, useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { ConfirmDRepRetirement } from '@lace/core';
import { certificateInspectorFactory, depositPaidWithSymbol, disallowSignTx, drepIDasBech32FromHash } from './utils';
import { ConfirmDRepRetirement, DappInfo } from '@lace/core';
import { certificateInspectorFactory, depositPaidWithSymbol, disallowSignTx } from './utils';
import { Wallet } from '@lace/cardano';
import { useWalletStore } from '@src/stores';
import { useGetOwnPubDRepKeyHash } from './hooks';
import { Skeleton } from 'antd';
import { DappError } from '../DappError';
import { useViewsFlowContext } from '@providers';
import { Box, Flex } from '@lace/ui';

const { CertificateType } = Wallet.Cardano;

Expand Down Expand Up @@ -75,19 +76,16 @@ export const ConfirmDRepRetirementContainer = ({ onError }: Props): React.ReactE
}

return (
<ConfirmDRepRetirement
dappInfo={dappInfo}
metadata={{
depositReturned: depositPaidWithCardanoSymbol,
drepId: drepIDasBech32FromHash(certificate.dRepCredential.hash)
}}
translations={{
metadata: t('core.DRepRetirement.metadata'),
labels: {
depositReturned: t('core.DRepRetirement.depositReturned'),
drepId: t('core.DRepRetirement.drepId')
}
}}
/>
<Flex h="$fill" flexDirection="column">
<Box mb={'$24'} mt={'$24'}>
<DappInfo {...dappInfo} />
</Box>
<ConfirmDRepRetirement
metadata={{
depositReturned: depositPaidWithCardanoSymbol,
drepId: Wallet.util.drepIDasBech32FromHash(certificate.dRepCredential.hash)
}}
/>
</Flex>
);
};
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import React, { useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { ConfirmDRepUpdate } from '@lace/core';
import { certificateInspectorFactory, drepIDasBech32FromHash } from './utils';
import { ConfirmDRepUpdate, DappInfo } from '@lace/core';
import { certificateInspectorFactory } from './utils';
import { Wallet } from '@lace/cardano';
import { useViewsFlowContext } from '@providers';
import { Skeleton } from 'antd';
import { Box, Flex } from '@lace/ui';

const { CertificateType } = Wallet.Cardano;

export const ConfirmDRepUpdateContainer = (): React.ReactElement => {
const { t } = useTranslation();
const {
signTxRequest: { request },
dappInfo
Expand All @@ -32,21 +31,17 @@ export const ConfirmDRepUpdateContainer = (): React.ReactElement => {
}

return (
<ConfirmDRepUpdate
dappInfo={dappInfo}
metadata={{
drepId: drepIDasBech32FromHash(certificate.dRepCredential.hash),
hash: certificate.anchor?.dataHash,
url: certificate.anchor?.url
}}
translations={{
metadata: t('core.DRepUpdate.metadata'),
labels: {
drepId: t('core.DRepUpdate.drepId'),
hash: t('core.DRepUpdate.hash'),
url: t('core.DRepUpdate.url')
}
}}
/>
<Flex h="$fill" flexDirection="column">
<Box mb={'$24'} mt={'$24'}>
<DappInfo {...dappInfo} />
</Box>
<ConfirmDRepUpdate
metadata={{
drepId: Wallet.util.drepIDasBech32FromHash(certificate.dRepCredential.hash),
hash: certificate.anchor?.dataHash,
url: certificate.anchor?.url
}}
/>
</Flex>
);
};
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import React, { useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { ConfirmStakeRegistrationDelegation } from '@lace/core';
import { ConfirmStakeRegistrationDelegation, DappInfo } from '@lace/core';
import { certificateInspectorFactory, depositPaidWithSymbol } from './utils';
import { Wallet } from '@lace/cardano';
import { useWalletStore } from '@src/stores';
import { useViewsFlowContext } from '@providers';
import { Skeleton } from 'antd';
import { Box, Flex, TransactionSummary } from '@lace/ui';

const { CertificateType, RewardAddress } = Wallet.Cardano;

Expand Down Expand Up @@ -36,24 +37,22 @@ export const ConfirmStakeRegistrationDelegationContainer = (): React.ReactElemen
return <Skeleton loading />;
}
const depositPaidWithCardanoSymbol = depositPaidWithSymbol(certificate.deposit, cardanoCoin);

return (
<ConfirmStakeRegistrationDelegation
dappInfo={dappInfo}
metadata={{
poolId: certificate.poolId,
stakeKeyHash: RewardAddress.fromCredentials(currentChain.networkId, certificate.stakeCredential)
.toAddress()
.toBech32(),
depositPaid: depositPaidWithCardanoSymbol
}}
translations={{
metadata: t('core.StakeRegistrationDelegation.metadata'),
labels: {
poolId: t('core.StakeRegistrationDelegation.poolId'),
stakeKeyHash: t('core.StakeRegistrationDelegation.stakeKeyHash'),
depositPaid: t('core.StakeRegistrationDelegation.depositPaid')
}
}}
/>
<Flex h="$fill" flexDirection="column">
<Box mb={'$28'} mt={'$32'}>
<DappInfo {...dappInfo} />
</Box>
<TransactionSummary.Metadata label={t('core.StakeRegistrationDelegation.metadata')} text="" />
<ConfirmStakeRegistrationDelegation
metadata={{
poolId: certificate.poolId,
stakeKeyHash: RewardAddress.fromCredentials(currentChain.networkId, certificate.stakeCredential)
.toAddress()
.toBech32(),
depositPaid: depositPaidWithCardanoSymbol
}}
/>
</Flex>
);
};
Loading

0 comments on commit 9cfb48d

Please sign in to comment.