Skip to content

Commit

Permalink
feat: add keys option to the add shared wallet modal main page (#1227)
Browse files Browse the repository at this point in the history
* feat: add keys option to the add shared wallet modal main page

* feat: add translation to shared keys coppied toast, define GetStartedProps as discriminated union
  • Loading branch information
szymonmaslowski authored Jun 20, 2024
1 parent 0270b64 commit ab257bd
Show file tree
Hide file tree
Showing 26 changed files with 431 additions and 267 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useState } from 'react';
import { firstValueFrom } from 'rxjs';
import { Redirect, Route, Switch, useHistory } from 'react-router-dom';
import { AddSharedWalletModal, SharedWalletCreationFlow, SharedWalletGetStarted } from '@lace/shared-wallets';
import { AddSharedWalletModal, SharedWalletCreationFlow, AddSharedWalletMainPageFlow } from '@lace/shared-wallets';
import { useBackgroundPage } from '@providers/BackgroundPageProvider';
import { walletRoutePaths } from '@routes';
import { useWalletManager } from '@hooks';
Expand All @@ -22,6 +22,8 @@ export const SharedWallet = (): JSX.Element => {
})();
}, [walletRepository]);

const sharedKeys = 'addr_shared_vksdhgfsft578s6tf68tdsf,stake_shared_vkgyufieus65cuv76s5vrs7';

return (
<AddSharedWalletModal
onClose={() => {
Expand All @@ -46,8 +48,11 @@ export const SharedWallet = (): JSX.Element => {
exact
path={walletRoutePaths.sharedWallet.root}
render={() => (
<SharedWalletGetStarted
<AddSharedWalletMainPageFlow
onCreateSharedWalletClick={() => history.push(walletRoutePaths.sharedWallet.create)}
sharedKeys={sharedKeys}
onImportSharedWalletClick={() => void 0}
onKeysGenerateClick={() => void 0}
/>
)}
/>
Expand Down
3 changes: 3 additions & 0 deletions packages/icons/raw/copy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions packages/icons/raw/key.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/shared-wallets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"@chromatic-com/storybook": "^1.5.0",
"@lace/configs": "workspace:^",
"@lace/translation": "workspace:^",
"@storybook/addon-actions": "^8.1.6",
"@storybook/addon-essentials": "^8.1.6",
"@storybook/addon-interactions": "^8.1.6",
"@storybook/addon-links": "^8.1.6",
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit ab257bd

Please sign in to comment.