Skip to content

[LW-7983] [LW-7984] dRep confirmation screens #554

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 38 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
8bfa024
refactor: move logic out of component
Sep 20, 2023
a7d8df5
fix: file path
Sep 20, 2023
8ff038e
feat(core): setup storybook
renanvalentin Sep 22, 2023
f601e08
refactor(ui): extract insufficient funds warning component
renanvalentin Sep 22, 2023
5e33403
feat(core): add lace/ui package
renanvalentin Sep 22, 2023
b53cbd9
feat(core): create ConfirmDRepRegistration component
renanvalentin Sep 22, 2023
ae715d3
feat(extension): install @lace/ui
renanvalentin Sep 22, 2023
0ebcec6
refactor: move functions to utils
Sep 21, 2023
99e7403
fix: type
Sep 22, 2023
c1d131c
refactor: types file
Sep 22, 2023
64f8f59
feat: check for DRep transaction
Sep 22, 2023
15a66e4
feat: integrate confirm drep registration component
Sep 25, 2023
389d589
refactor(core): use Metadata component
renanvalentin Sep 25, 2023
839f46b
refactor(core): use flexbox
renanvalentin Sep 25, 2023
463f73e
refactor(core): remove insufficient funds message
renanvalentin Sep 26, 2023
0de8546
refactor(core): create ConfirmDRepRetirement
renanvalentin Sep 26, 2023
a8da5c3
refactor: remove insufficient funds warning; break down main component
Sep 26, 2023
752a669
feat: add certificate data
Sep 27, 2023
466653b
feat: add drep retirement container
Sep 28, 2023
d242fb2
fix: condition
Sep 28, 2023
0ba6b88
fix: type
Sep 28, 2023
1a9b45e
fix: style
Sep 28, 2023
9b11b67
fix: check for anchor
Oct 2, 2023
a7ef4bd
fix: check for undefined certificates
Oct 5, 2023
0b9394f
fix: merge conflict
Oct 11, 2023
ff732da
fix: type error
Oct 11, 2023
7285264
feat: temp env changes
Oct 11, 2023
da51bc8
feat(extension): use consistent naming of DRep ID
mchappell Oct 12, 2023
6926335
feat(extension): show anchor metadata if exists
mchappell Oct 12, 2023
e8cfe53
feat(extension): convert user facing DRepID to bech32
mchappell Oct 12, 2023
587fed0
fix: add cardano symbol to deposit amount
mchappell Oct 12, 2023
e4b30d4
chore(core): downgrade storybook to v6
renanvalentin Oct 18, 2023
a7b0fbd
fix: update lock file
Oct 18, 2023
f29f7b9
fix: styles and text
Oct 18, 2023
4012f84
fix: storybook build
Oct 18, 2023
e3dbd71
fix: storybook build
Oct 19, 2023
66a1c80
feat: check retired drep key
Oct 19, 2023
c151b52
fix: check retired drep key
Oct 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/e2e-tests-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ jobs:
uses: ./.github/shared/build
with:
LACE_EXTENSION_KEY: ${{ secrets.MANIFEST_PUBLIC_KEY }}
CARDANO_SERVICES_URL_MAINNET: ${{ secrets.CARDANO_SERVICES_URL_MAINNET }}
CARDANO_SERVICES_URL_PREPROD: ${{ secrets.CARDANO_SERVICES_URL_PREPROD }}
CARDANO_SERVICES_URL_PREVIEW: ${{ secrets.CARDANO_SERVICES_URL_PREVIEW }}
CARDANO_SERVICES_URL_MAINNET: ${{ secrets.CARDANO_SERVICES_DEV_URL_MAINNET }}
CARDANO_SERVICES_URL_PREPROD: ${{ secrets.CARDANO_SERVICES_DEV_URL_PREPROD }}
CARDANO_SERVICES_URL_PREVIEW: ${{ secrets.CARDANO_SERVICES_DEV_URL_PREVIEW }}
- name: Start XVFB
run: |
Xvfb :99 &
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
uses: ./.github/shared/build
with:
LACE_EXTENSION_KEY: ${{ secrets.MANIFEST_PUBLIC_KEY }}
CARDANO_SERVICES_URL_MAINNET: ${{ secrets.CARDANO_SERVICES_URL_MAINNET }}
CARDANO_SERVICES_URL_PREPROD: ${{ secrets.CARDANO_SERVICES_URL_PREPROD }}
CARDANO_SERVICES_URL_PREVIEW: ${{ secrets.CARDANO_SERVICES_URL_PREVIEW }}
CARDANO_SERVICES_URL_MAINNET: ${{ secrets.CARDANO_SERVICES_DEV_URL_MAINNET }}
CARDANO_SERVICES_URL_PREPROD: ${{ secrets.CARDANO_SERVICES_DEV_URL_PREPROD }}
CARDANO_SERVICES_URL_PREVIEW: ${{ secrets.CARDANO_SERVICES_DEV_URL_PREVIEW }}
- name: Start XVFB
run: |
Xvfb :99 &
Expand Down
1 change: 1 addition & 0 deletions apps/browser-extension-wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"@lace/common": "0.1.0",
"@lace/core": "0.1.0",
"@lace/staking": "0.1.0",
"@lace/ui": "^0.1.0",
"@react-rxjs/core": "^0.9.8",
"@react-rxjs/utils": "^0.9.5",
"@vespaiach/axios-fetch-adapter": "^0.3.0",
Expand Down
5 changes: 4 additions & 1 deletion apps/browser-extension-wallet/src/dapp-connector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
} from '@providers';
import { HashRouter } from 'react-router-dom';
import { ThemeProvider } from '@providers/ThemeProvider';
import { UIThemeProvider } from '@providers/UIThemeProvider';
import { BackgroundServiceAPIProvider } from '@providers/BackgroundServiceAPI';
import { APP_MODE_POPUP } from './utils/constants';
import { PostHogClientProvider } from '@providers/PostHogClientProvider';
Expand All @@ -32,7 +33,9 @@ const App = (): React.ReactElement => (
<ExperimentsProvider>
<AnalyticsProvider>
<ThemeProvider>
<DappConnectorView />
<UIThemeProvider>
<DappConnectorView />
</UIThemeProvider>
</ThemeProvider>
</AnalyticsProvider>
</ExperimentsProvider>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const mockConsumeRemoteApi = jest.fn().mockReturnValue({
const mockCreateTxInspector = jest.fn().mockReturnValue(() => ({ minted: [] as any, burned: [] as any }));
import * as React from 'react';
import { cleanup, render, waitFor } from '@testing-library/react';
import { ConfirmTransaction } from '../ConfirmTransaction';
import { ConfirmTransaction } from '../confirm-transaction/ConfirmTransaction';
import '@testing-library/jest-dom';
import { I18nextProvider } from 'react-i18next';
import { StoreProvider } from '@src/stores';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import { ConfirmDRepRegistration } from '@lace/core';
import { SignTxData } from './types';
import { dRepRegistrationInspector, drepIDasBech32FromHash } from './utils';
import { Wallet } from '@lace/cardano';
import { useWalletStore } from '@src/stores';

interface Props {
signTxData: SignTxData;
errorMessage?: string;
}

export const ConfirmDRepRegistrationContainer = ({ signTxData, errorMessage }: Props): React.ReactElement => {
const { t } = useTranslation();
const certificate = dRepRegistrationInspector(signTxData.tx);
const {
walletUI: { cardanoCoin }
} = useWalletStore();

const depositPaidWithCardanoSymbol = `${Wallet.util.lovelacesToAdaString(certificate.deposit.toString())} ${
cardanoCoin.symbol
}`;

return (
<ConfirmDRepRegistration
dappInfo={signTxData.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')
}
}}
errorMessage={errorMessage}
/>
);
};
Loading