Skip to content

Commit fc659cb

Browse files
mchappelllgobbi-atixmirceahaseganLucasrenanvalentin
authored
feat(extension): introduce conway-era dapp transaction screens and activity history (#727)
* chore/Bump cardano-js-sdk (#559) * chore!: bump cardano-js-sdk packages to latest versions * ci: add cardano services urls parameters to build step * Feat/sanchonet network switch support (#612) * feat: update env to support switching to sanchonet * chore: remove old testnet * chore: bump cardano-sdk packages to latest version --------- Co-authored-by: mirceahasegan <[email protected]> * [LW-7983] [LW-7984] dRep confirmation screens (#554) * refactor: move logic out of component * fix: file path * feat(core): setup storybook * refactor(ui): extract insufficient funds warning component * feat(core): add lace/ui package * feat(core): create ConfirmDRepRegistration component * feat(extension): install @lace/ui * refactor: move functions to utils * fix: type * refactor: types file * feat: check for DRep transaction * feat: integrate confirm drep registration component * refactor(core): use Metadata component * refactor(core): use flexbox * refactor(core): remove insufficient funds message * refactor(core): create ConfirmDRepRetirement * refactor: remove insufficient funds warning; break down main component * feat: add certificate data * feat: add drep retirement container * fix: condition * fix: type * fix: style * fix: check for anchor * fix: check for undefined certificates * fix: merge conflict * fix: type error * feat: temp env changes * feat(extension): use consistent naming of DRep ID * feat(extension): show anchor metadata if exists * feat(extension): convert user facing DRepID to bech32 * fix: add cardano symbol to deposit amount * chore(core): downgrade storybook to v6 * fix: update lock file * fix: styles and text * fix: storybook build * fix: storybook build * feat: check retired drep key * fix: check retired drep key --------- Co-authored-by: Renan Ferreira <[email protected]> Co-authored-by: Michael Chappell <[email protected]> * feat(extension): [LW-7984] voting procedures (#655) * feat(ui): create metadata component * wip * feat(ui): text link component * chore(ui): fix rebase * feat(ui): create metadata link component * feat(core): create voting procedures component * chore(extension): fix rebase * fix(ui): add work break * feat(extension): voting procedures * refactor(core): make actions optional * refactor(core): use action as key prop * refactor(extension): add custom title for voting procedures * [LW-8491] Voting delegation confirmation (#648) * feat(core): setup storybook * feat(core): add lace/ui package * feat: check for DRep transaction * feat: integrate confirm drep registration component * refactor: remove insufficient funds warning; break down main component * feat: add certificate data * feat: add drep retirement container * feat(extension): use consistent naming of DRep ID * fix: add cardano symbol to deposit amount * refactor: certificate inspector factory * feat: voting delegation * fix: type errors * fix: merge conflicts --------- Co-authored-by: Michael Chappell <[email protected]> * chore: modify sanchonet urls (#667) * feat: drep update certificate signing (#664) * fix(extension): updated padding and missing bech32 addressing * fix: no explorer for sanchonet * chore(extension): add unit tests for dapp/confirm-tx (#743) * fix: update drep id casing * fix: update title translations for cip95 popups * fix(extension): [LW-9163] nullish check on existence of stakeKeyDeposit property not value (#751) * fix: e2e no unresolved imports * chore(extension): resolve pr comments (#748) * fix(extension): translation keys casing and unit tests (#756) * chore(all): exclude stories and tests from the rollup builds (#752) * chore(core): fix extension of stories .ts -> .tsx (impacts: rollup) * chore(all): exclude test files from rollup builds * Chore/update for sdk conway era (#734) * chore: stake pools sort by ros * chore: metrics require lastRos and ros * Revert "Chore/update for sdk conway era (#734)" (#767) This reverts commit 5b81b19. * test(extension): add test ids for governance actions (#765) * Merge main into feat/sanchonet (#763) * feat(staking): maintenance 24 Nov 2023 (#754) * feat(staking): maintenance 24 Nov 2023 * [LW-9151] Edit account name component (#746) * feat(ui): input component * feat(extension): edit account drawer * feat(extension): add unit test * feat: rename input component * feat(ui): use pseudo parameters * feat(ui): input width * feat(ui): input disabled style * feat(extension): add ui package * feat: update lock file * feat(ui): remove redundant styles * feat(extension): [LW-5806] update Minting transaction display from dapps (#608) * feat: identify minting txs from dapps and display proper UI to confirm refs: LW-5806 * feat(extension): update dapp transaction styling * refactor(extension,core): fix sonarcloud quality checks * ci(core): add @lace/ui to dependencies * test(extension): add mocks in ConfirmTransaction.test.tsx * test(extension): remove leftover from local testing * refactor(core): add missing newline at end of file --------- Co-authored-by: przemyslaw.wlodek <[email protected]> * test(extension): maintenance 27 nov (#757) * test(extension): maintenance nov 27 * test(extension): clear failed request test logs * test(extension): add real time console test logging, remove unnecessary logs * test(extension): update wdio version * test(extension): add node option env variable for e2e github runs * test(extension): move node options to e2e test sections * test(extension): increase max-old-space-size * test(extension): downgrade wdio to stable version, remove node env variable * feat(staking): [LW-6437, LW-8877] past epochs rewards chart (#718) --------- Co-authored-by: refi93 <[email protected]> Co-authored-by: przemyslaw.wlodek <[email protected]> Co-authored-by: januszjanus <[email protected]> * feat(extension): track manual re-sync and hd wallet discovery (#712) * feat(staking): [LW-8929, LW-8777] apply pool search also to selected pools (#706) --------- Co-authored-by: refi93 <[email protected]> * feat(staking,common): enable manageDelegation CTA from pool details (#720) Co-authored-by: przemyslaw.wlodek <[email protected]> * feat(staking): load multi-delegation for HW wallets (#686) --------- Signed-off-by: Kamil Džurman <[email protected]> Co-authored-by: Rafael Korbaš <[email protected]> Co-authored-by: januszjanus <[email protected]> Co-authored-by: przemyslaw.wlodek <[email protected]> * test(extension): test maintenance 29 Nov - fix Dapp e2e (#760) * feat(extension): [LW-9028] Add wallet concepts to menu (#742) * feat(extension): update dropdown menu with new wallet component * feat(extension): add add new wallet option to profile dropdown * refactor(ui): add test id * refactor(extension): add test id for multi wallet * refactor(extension): increase button width to match figma * refactor(extension): remove copy address tooltip from multi-wallet menu it em * refactor(extension): align top navigation buttons with side panel * refactor(extension): update the expand button styling * refactor(extension): update network pill and expand button styling * refactor(extension): update network pill border radius * refactor(extension): limit network pill change to popup only * fix(extension): fix moving left side bar * refactor(extension,core,cardano): post-merge fixes * chore(extension): fix unit tests + rename * chore(extension): fix unit tests and mocks * chore(extension): remove TODO comments * chore(core): review comments --------- Signed-off-by: Kamil Džurman <[email protected]> Co-authored-by: Janusz Janus <[email protected]> Co-authored-by: Lucas <[email protected]> Co-authored-by: Leonel Gobbi <[email protected]> Co-authored-by: bslabiak <[email protected]> Co-authored-by: Tomek Marciniak <[email protected]> Co-authored-by: refi93 <[email protected]> Co-authored-by: Kamil Džurman <[email protected]> Co-authored-by: Lukasz Jagiela <[email protected]> Co-authored-by: Renan Valentin <[email protected]> * feat(extension): add drep retirement id mismatch modal (#758) * chore: update cardano-sdk packages * refactor: update lace based on cardano-sdk breaking changes refactor: use internal wallet address discovery * fix: typos in translation * feat: stake and vote confirmation screens (#683) * chore/Bump cardano-js-sdk (#559) * chore!: bump cardano-js-sdk packages to latest versions * ci: add cardano services urls parameters to build step * Feat/sanchonet network switch support (#612) * feat: update env to support switching to sanchonet * chore: remove old testnet * chore: bump cardano-sdk packages to latest version --------- Co-authored-by: mirceahasegan <[email protected]> * [LW-7983] [LW-7984] dRep confirmation screens (#554) * refactor: move logic out of component * fix: file path * feat(core): setup storybook * refactor(ui): extract insufficient funds warning component * feat(core): add lace/ui package * feat(core): create ConfirmDRepRegistration component * feat(extension): install @lace/ui * refactor: move functions to utils * fix: type * refactor: types file * feat: check for DRep transaction * feat: integrate confirm drep registration component * refactor(core): use Metadata component * refactor(core): use flexbox * refactor(core): remove insufficient funds message * refactor(core): create ConfirmDRepRetirement * refactor: remove insufficient funds warning; break down main component * feat: add certificate data * feat: add drep retirement container * fix: condition * fix: type * fix: style * fix: check for anchor * fix: check for undefined certificates * fix: merge conflict * fix: type error * feat: temp env changes * feat(extension): use consistent naming of DRep ID * feat(extension): show anchor metadata if exists * feat(extension): convert user facing DRepID to bech32 * fix: add cardano symbol to deposit amount * chore(core): downgrade storybook to v6 * fix: update lock file * fix: styles and text * fix: storybook build * fix: storybook build * feat: check retired drep key * fix: check retired drep key --------- Co-authored-by: Renan Ferreira <[email protected]> Co-authored-by: Michael Chappell <[email protected]> * feat(extension): [LW-7984] voting procedures (#655) * feat(ui): create metadata component * wip * feat(ui): text link component * chore(ui): fix rebase * feat(ui): create metadata link component * feat(core): create voting procedures component * chore(extension): fix rebase * fix(ui): add work break * feat(extension): voting procedures * refactor(core): make actions optional * refactor(core): use action as key prop * refactor(extension): add custom title for voting procedures * [LW-8491] Voting delegation confirmation (#648) * feat(core): setup storybook * feat(core): add lace/ui package * feat: check for DRep transaction * feat: integrate confirm drep registration component * refactor: remove insufficient funds warning; break down main component * feat: add certificate data * feat: add drep retirement container * feat(extension): use consistent naming of DRep ID * fix: add cardano symbol to deposit amount * refactor: certificate inspector factory * feat: voting delegation * fix: type errors * fix: merge conflicts --------- Co-authored-by: Michael Chappell <[email protected]> * chore: modify sanchonet urls (#667) * feat: drep update certificate signing (#664) * feat: stake and vote confirmation screens * fix: correct capitalisation of DRep ID * fix: voting translation titles * feat(extension): update staking credential path --------- Co-authored-by: Leonel Gobbi <[email protected]> Co-authored-by: mirceahasegan <[email protected]> Co-authored-by: Renan Ferreira <[email protected]> Co-authored-by: Michael Chappell <[email protected]> * [LW-8490] Governance Actions (#670) * chore/Bump cardano-js-sdk (#559) * chore!: bump cardano-js-sdk packages to latest versions * ci: add cardano services urls parameters to build step * Feat/sanchonet network switch support (#612) * feat: update env to support switching to sanchonet * chore: remove old testnet * chore: bump cardano-sdk packages to latest version --------- Co-authored-by: mirceahasegan <[email protected]> * [LW-7983] [LW-7984] dRep confirmation screens (#554) * refactor: move logic out of component * fix: file path * feat(core): setup storybook * refactor(ui): extract insufficient funds warning component * feat(core): add lace/ui package * feat(core): create ConfirmDRepRegistration component * feat(extension): install @lace/ui * refactor: move functions to utils * fix: type * refactor: types file * feat: check for DRep transaction * feat: integrate confirm drep registration component * refactor(core): use Metadata component * refactor(core): use flexbox * refactor(core): remove insufficient funds message * refactor(core): create ConfirmDRepRetirement * refactor: remove insufficient funds warning; break down main component * feat: add certificate data * feat: add drep retirement container * fix: condition * fix: type * fix: style * fix: check for anchor * fix: check for undefined certificates * fix: merge conflict * fix: type error * feat: temp env changes * feat(extension): use consistent naming of DRep ID * feat(extension): show anchor metadata if exists * feat(extension): convert user facing DRepID to bech32 * fix: add cardano symbol to deposit amount * chore(core): downgrade storybook to v6 * fix: update lock file * fix: styles and text * fix: storybook build * fix: storybook build * feat: check retired drep key * fix: check retired drep key --------- Co-authored-by: Renan Ferreira <[email protected]> Co-authored-by: Michael Chappell <[email protected]> * feat(extension): [LW-7984] voting procedures (#655) * feat(ui): create metadata component * wip * feat(ui): text link component * chore(ui): fix rebase * feat(ui): create metadata link component * feat(core): create voting procedures component * chore(extension): fix rebase * fix(ui): add work break * feat(extension): voting procedures * refactor(core): make actions optional * refactor(core): use action as key prop * refactor(extension): add custom title for voting procedures * feat(core): create parameter change action * feat(core): create hard fork initiation action * feat(core): create new constitution action * feat(core): create no confidence action * feat(core): create treasury withdrawals action * feat(core): create info action * feat(core): create update comittee action * refactor(core): check if anchor is provided * refactor(core): update storybook path * feat(extension): add translations * refactor(core): remove ununsed prop * feat(staking): [LW-8684] add tooltip to piechart (#616) * feat: lw-8684-add tooltip to delegation piechart * fix: add custom tooltip dot style * feat(ui): add tooltip to metadata component * chore(core): fix pipeline * chore(core): update proposal procedures components to the latest ui * fix(extension): resolve pr comments --------- Co-authored-by: Leonel Gobbi <[email protected]> Co-authored-by: mirceahasegan <[email protected]> Co-authored-by: Lucas <[email protected]> Co-authored-by: Michael Chappell <[email protected]> Co-authored-by: John Oshalusi <[email protected]> Co-authored-by: Vitalii Vozniak <[email protected]> * fix(extension): resolve pr comments * fix(extension): remove code duplications for metadata and metadata link components * feat(extension): lw-8600 (#819) * feat(extension): lw-8600 * feat(extension): fix translations * feat(extension): fix tx details mappers * fix(extension): lw-8600 move helpers to common util * fix(extension): resolve pr comment * fix(extension): unify tx details lists * fix(extension): resolve sdet comments * fix(extension): resolve sdet comments * refactor: remove need to target dev endpoints in CI * refactor: remove sanchonet as default network option * refactor: remove sanchonet explorer check * feat(extension): update drep mapper check * fix(extension): conway-era tx activities line items (#860) * fix(extension): conway-era tx activiries line items * fix(extension): adjust tests * fix(extension): resolve pr comments * feat(extension): update drep mapper check * fix(extension): convert drepid and stakekeyhash to bech32, fix translations * fix(extension): lw-9688: unable to see transaction details for conway-era transactions * fix(extension): resolve lw-9621 pe comments * fix(extension): resolve lw-9621 pr comments * fix(extension): lw-9621 add storybook showing all conway era governance activity items * chore(core): fix storybook build * fix: use correct stake address bech32 * fix(core): sanchonet-related storybook errors [LW-9721] (#880) * fix(core): add custom viewports and proper structure to storybook * fix(core): react key prop errors * refactor: rename useCexplorerBaseUrl typo * fix: add storybook back for core package * feat: update stories for conway-era tx activity history * fix: add retry fallback for matching last active tab based on non-standard URL * chore: update dev preview env file * feat(extension): update conway era tx details to the latest figma (#868) * feat(extension): update conway era tx details to the latest figma * feat(extension): handle multiline row items with subitems * feat(extension): handle parameter_change_action * fix(extension): resolve pr comments * fix(extension): update to the latest figma/AC * fix(extension): resolve pr comments * fix(extension): resolve sanchonet pr comments * fix(extension): after merge with sanchonet fixes * fix(extension): after merge with sanchonet fixes * fix(extension): resolve sanchonet pr comments * chore(core): mock @lace/cardano for storybook * fix(extension): fix tests * chore: downgrade uuid package to same used by pouchdb * refactor: remove unintended config changes * fix: no wallet dapp test * fix(extension): resolve lw-9622 sdet comments * feat(extension): update conway era history line items * fix(extension): make anchor url clickable * fix(extension): resolve pr comments * fix: lw-8940 casing in reward account * feat(extension): update sign with hw * chore: reword stakeVoteDelegation title * feat(extension): handle requests from non registered users (#935) * feat(extension): handle requests from non registered users * feat(extension): fix modal visibility condition * feat(extension): fix test * fix(extension): resolve pr comments * fix(extension): fix labels * refactor: rename proprosal procedure call * fix: broken hook test * feat: revert useTxSummary hook * feat(extension): fix test * refactor: revert story change --------- Signed-off-by: Kamil Džurman <[email protected]> Co-authored-by: Leonel Gobbi <[email protected]> Co-authored-by: mirceahasegan <[email protected]> Co-authored-by: Lucas <[email protected]> Co-authored-by: Renan Ferreira <[email protected]> Co-authored-by: vetalcore <[email protected]> Co-authored-by: Przemysław Włodek <[email protected]> Co-authored-by: Wojtek Kłos <[email protected]> Co-authored-by: Janusz Janus <[email protected]> Co-authored-by: bslabiak <[email protected]> Co-authored-by: Tomek Marciniak <[email protected]> Co-authored-by: refi93 <[email protected]> Co-authored-by: Kamil Džurman <[email protected]> Co-authored-by: Lukasz Jagiela <[email protected]> Co-authored-by: John Oshalusi <[email protected]> Co-authored-by: wklos-iohk <[email protected]>
1 parent 26e6e11 commit fc659cb

File tree

253 files changed

+15605
-634
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

253 files changed

+15605
-634
lines changed

apps/browser-extension-wallet/.env.defaults

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,22 +61,25 @@ PRODUCTION_MODE_TRACKING=false
6161
POSTHOG_DEV_TOKEN_MAINNET=phc_gH96Lx5lEVXTTWEyytSdTFPDk3Xsxwi4BqG88mKObd1
6262
POSTHOG_DEV_TOKEN_PREPROD=phc_Xlmldm6EYSfQVgB9Uxm3b2xC1noDlgFFXpF9AJ6SMfJ
6363
POSTHOG_DEV_TOKEN_PREVIEW=phc_e8SaOOWpXpNE59TnpLumeUjWm4iv024AWjhQqU406jr
64+
POSTHOG_DEV_TOKEN_SANCHONET=phc_OUu6sPucDu5S6skRmYbWN5Jn8TpggWTQu1Y1ETkm3xt
6465

6566
# Cardano Services
6667
CARDANO_SERVICES_URL_MAINNET=https://dev-mainnet.lw.iog.io
6768
CARDANO_SERVICES_URL_PREPROD=https://dev-preprod.lw.iog.io
6869
CARDANO_SERVICES_URL_PREVIEW=https://dev-preview.lw.iog.io
70+
CARDANO_SERVICES_URL_SANCHONET=https://backend.dev-sanchonet.eks.lw.iog.io
6971

7072
# Explorer URLs
7173
CEXPLORER_URL_MAINNET=https://cexplorer.io
7274
CEXPLORER_URL_PREVIEW=https://preview.cexplorer.io
7375
CEXPLORER_URL_PREPROD=https://preprod.cexplorer.io
74-
CEXPLORER_URL_SANCHONET=https://sanchonet.cexplorer.io
76+
CEXPLORER_URL_SANCHONET=https://sancho.cexplorer.io
7577

7678
# ADA Handle URLs
7779
ADA_HANDLE_URL_MAINNET=https://api.handle.me
7880
ADA_HANDLE_URL_PREVIEW=https://preview.api.handle.me
7981
ADA_HANDLE_URL_PREPROD=https://preprod.api.handle.me
82+
ADA_HANDLE_URL_SANCHONET=
8083

8184
# Manifest.json
8285
LACE_EXTENSION_KEY=gafhhkghbfjjkeiendhlofajokpaflmk

apps/browser-extension-wallet/.env.developerpreview

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,13 @@ POSTHOG_DEV_TOKEN_PREVIEW=phc_e8SaOOWpXpNE59TnpLumeUjWm4iv024AWjhQqU406jr
6060
CARDANO_SERVICES_URL_MAINNET=https://dev-mainnet.lw.iog.io
6161
CARDANO_SERVICES_URL_PREPROD=https://dev-preprod.lw.iog.io
6262
CARDANO_SERVICES_URL_PREVIEW=https://dev-preview.lw.iog.io
63+
CARDANO_SERVICES_URL_SANCHONET=https://backend.dev-sanchonet.eks.lw.iog.io
6364

6465
# Explorer URLs
6566
CEXPLORER_URL_MAINNET=https://cexplorer.io
6667
CEXPLORER_URL_PREVIEW=https://preview.cexplorer.io
6768
CEXPLORER_URL_PREPROD=https://preprod.cexplorer.io
68-
CEXPLORER_URL_SANCHONET=https://sanchonet.cexplorer.io
69+
CEXPLORER_URL_SANCHONET=https://sancho.cexplorer.io
6970

7071
# ADA Handle URLs
7172
ADA_HANDLE_URL_MAINNET=https://api.handle.me

apps/browser-extension-wallet/.env.example

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,22 +59,25 @@ POSTHOG_PRODUCTION_TOKEN_PREVIEW=production-preview-token
5959
POSTHOG_DEV_TOKEN_MAINNET=dev-mainnet-token
6060
POSTHOG_DEV_TOKEN_PREPROD=dev-preprod-token
6161
POSTHOG_DEV_TOKEN_PREVIEW=dev-preview-token
62+
POSTHOG_DEV_TOKEN_SANCHONET=dev-sanchonet-token
6263

6364
# Cardano Services
6465
CARDANO_SERVICES_URL_MAINNET=https://backend.live-mainnet.eks.lw.iog.io
6566
CARDANO_SERVICES_URL_PREPROD=https://backend.live-preprod.eks.lw.iog.io
6667
CARDANO_SERVICES_URL_PREVIEW=https://backend.live-preview.eks.lw.iog.io
68+
CARDANO_SERVICES_URL_SANCHONET=https://backend.dev-sanchonet.eks.lw.iog.io
6769

6870
# Explorer URLs
6971
CEXPLORER_URL_MAINNET=https://cexplorer.io
7072
CEXPLORER_URL_PREVIEW=https://preview.cexplorer.io
7173
CEXPLORER_URL_PREPROD=https://preprod.cexplorer.io
72-
CEXPLORER_URL_TESTNET=https://testnet.cexplorer.io
74+
CEXPLORER_URL_SANCHONET=https://sancho.cexplorer.io
7375

7476
# ADA Handle URLs
7577
ADA_HANDLE_URL_MAINNET=https://api.handle.me
7678
ADA_HANDLE_URL_PREVIEW=https://preview.api.handle.me
7779
ADA_HANDLE_URL_PREPROD=https://preprod.api.handle.me
80+
ADA_HANDLE_URL_SANCHONET=
7881

7982
# Manifest.json
8083
LACE_EXTENSION_KEY=gafhhkghbfjjkeiendhlofajokpaflmk

apps/browser-extension-wallet/src/config.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const envChecks = (chosenChain: Wallet.ChainName): void => {
4545
throw new Error('no available chains to connect to');
4646
}
4747

48-
if (!process.env.AVAILABLE_CHAINS.includes('Mainnet')) {
48+
if (!process.env.AVAILABLE_CHAINS.includes('Mainnet') && process.env.DEFAULT_CHAIN !== 'Sanchonet') {
4949
throw new Error('mainnet chain not available in env');
5050
}
5151

@@ -78,12 +78,14 @@ export const config = (): Config => {
7878
CARDANO_SERVICES_URLS: {
7979
Mainnet: process.env.CARDANO_SERVICES_URL_MAINNET,
8080
Preprod: process.env.CARDANO_SERVICES_URL_PREPROD,
81-
Preview: process.env.CARDANO_SERVICES_URL_PREVIEW
81+
Preview: process.env.CARDANO_SERVICES_URL_PREVIEW,
82+
Sanchonet: process.env.CARDANO_SERVICES_URL_SANCHONET
8283
},
8384
CEXPLORER_BASE_URL: {
8485
Mainnet: `${process.env.CEXPLORER_URL_MAINNET}`,
8586
Preprod: `${process.env.CEXPLORER_URL_PREPROD}`,
86-
Preview: `${process.env.CEXPLORER_URL_PREVIEW}`
87+
Preview: `${process.env.CEXPLORER_URL_PREVIEW}`,
88+
Sanchonet: `${process.env.CEXPLORER_URL_SANCHONET}`
8789
},
8890
CEXPLORER_URL_PATHS: {
8991
Tx: 'tx',

apps/browser-extension-wallet/src/dapp-connector.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { CurrencyStoreProvider } from '@providers/currency';
88
import { DatabaseProvider, AxiosClientProvider, AppSettingsProvider, AnalyticsProvider } from '@providers';
99
import { HashRouter } from 'react-router-dom';
1010
import { ThemeProvider } from '@providers/ThemeProvider';
11+
import { UIThemeProvider } from '@providers/UIThemeProvider';
1112
import { BackgroundServiceAPIProvider } from '@providers/BackgroundServiceAPI';
1213
import { APP_MODE_POPUP } from './utils/constants';
1314
import { PostHogClientProvider } from '@providers/PostHogClientProvider';
@@ -27,7 +28,9 @@ const App = (): React.ReactElement => (
2728
<AnalyticsProvider>
2829
<ThemeProvider>
2930
<AddressesDiscoveryOverlay>
30-
<DappConnectorView />
31+
<UIThemeProvider>
32+
<DappConnectorView />
33+
</UIThemeProvider>
3134
</AddressesDiscoveryOverlay>
3235
</ThemeProvider>
3336
</AnalyticsProvider>

apps/browser-extension-wallet/src/features/address-book/context/AddressBookProvider.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ export type AddressRecordParams = Pick<AddressBookSchema, 'address' | 'name' | '
1818
export const cardanoNetworkMap: { [key in Wallet.ChainName]: Wallet.Cardano.NetworkMagics } = {
1919
Mainnet: Wallet.Cardano.NetworkMagics.Mainnet,
2020
Preprod: Wallet.Cardano.NetworkMagics.Preprod,
21-
Preview: Wallet.Cardano.NetworkMagics.Preview
21+
Preview: Wallet.Cardano.NetworkMagics.Preview,
22+
Sanchonet: Wallet.Cardano.NetworkMagics.Sanchonet
2223
};
2324

2425
const handleRecordValidation = (list: AddressBookSchema[], record: AddressRecordParams) => {
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import React, { ReactNode, useCallback } from 'react';
2+
import { Image } from 'antd';
3+
import { useTranslation } from 'react-i18next';
4+
import Empty from '../../../assets/icons/empty.svg';
5+
import styles from './Layout.module.scss';
6+
import { Button } from '@lace/common';
7+
8+
type DappErrorProps = {
9+
title: string;
10+
description: ReactNode;
11+
closeButtonLabel?: string;
12+
onCloseClick?: () => void;
13+
containerTestId: string;
14+
imageTestId: string;
15+
titleTestId: string;
16+
descriptionTestId: string;
17+
closeButtonTestId: string;
18+
};
19+
export const DappError = ({
20+
title,
21+
description,
22+
closeButtonLabel,
23+
onCloseClick,
24+
containerTestId,
25+
imageTestId,
26+
titleTestId,
27+
descriptionTestId,
28+
closeButtonTestId
29+
}: DappErrorProps): React.ReactElement => {
30+
const { t } = useTranslation();
31+
const handleClose = useCallback(() => {
32+
onCloseClick?.();
33+
}, [onCloseClick]);
34+
35+
return (
36+
<div data-testid={containerTestId} className={styles.dappErrorContainer}>
37+
<div className={styles.dappErrorContent}>
38+
<Image data-testid={imageTestId} preview={false} width={112} src={Empty} />
39+
<div className={styles.heading} data-testid={titleTestId}>
40+
{title}
41+
</div>
42+
<div className={styles.description} data-testid={descriptionTestId}>
43+
{description}
44+
</div>
45+
</div>
46+
<div className={styles.footer}>
47+
<Button data-testid={closeButtonTestId} className={styles.footerBtn} onClick={handleClose}>
48+
{closeButtonLabel || t('dapp.dappErrorPage.closeButton')}
49+
</Button>
50+
</div>
51+
</div>
52+
);
53+
};

apps/browser-extension-wallet/src/features/dapp/components/DappTransactionFail.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ export const DappTransactionFail = (): React.ReactElement => {
2424
}, [analytics]);
2525

2626
return (
27-
<div data-testid="dapp-sign-tx-fail" className={styles.noWalletContainer}>
28-
<div className={styles.noWalletContent}>
27+
<div data-testid="dapp-sign-tx-fail" className={styles.dappErrorContainer}>
28+
<div className={styles.dappErrorContent}>
2929
<Image data-testid="dapp-sign-tx-fail-image" preview={false} width={112} src={Fail} />
3030
<div data-testid="dapp-sign-tx-fail-heading" className={styles.heading}>
3131
{t('dapp.sign.failure.title')}

apps/browser-extension-wallet/src/features/dapp/components/DappTransactionSuccess.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ export const DappTransactionSuccess = (): React.ReactElement => {
2525
}, [analytics]);
2626

2727
return (
28-
<div data-testid="dapp-sign-tx-success" className={styles.noWalletContainer}>
29-
<div className={styles.noWalletContent}>
28+
<div data-testid="dapp-sign-tx-success" className={styles.dappErrorContainer}>
29+
<div className={styles.dappErrorContent}>
3030
<Image data-testid="dapp-sign-tx-success-image" preview={false} width={112} src={Success} />
3131
<div data-testid="dapp-sign-tx-success-heading" className={styles.heading}>
3232
{t('browserView.transaction.success.youCanSafelyCloseThisPanel')}

apps/browser-extension-wallet/src/features/dapp/components/Layout.module.scss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626
padding-top: size_unit(4);
2727
}
2828

29-
.noWalletContainer {
29+
.dappErrorContainer {
3030
align-items: center;
3131
display: flex;
3232
flex-direction: column;
3333
height: 100%;
3434
justify-content: space-between;
3535
width: 100%;
3636

37-
.noWalletContent {
37+
.dappErrorContent {
3838
padding: 0 size_unit(3);
3939
display: flex;
4040
flex: 1;
@@ -45,7 +45,7 @@
4545
.heading {
4646
color: var(--text-color-secondary);
4747
font-size: var(--bodyLarge);
48-
font-weight: 800;
48+
font-weight: 600;
4949
letter-spacing: 0.02em;
5050
line-height: size_unit(3);
5151
margin-top: size_unit(2);
@@ -55,6 +55,7 @@
5555
.description {
5656
color: var(--text-color-secondary);
5757
font-size: var(--bodySmall);
58+
font-weight: 500;
5859
letter-spacing: 0.02em;
5960
line-height: size_unit(3);
6061
margin-top: size_unit(2);

0 commit comments

Comments
 (0)