diff --git a/.storybook/viewports.ts b/.storybook/viewports.ts index ddfe099aad4..5f333aff73d 100644 --- a/.storybook/viewports.ts +++ b/.storybook/viewports.ts @@ -1,7 +1,4 @@ -import { breakpoints } from '@leather-wallet/tokens'; - -// TODO import from '@leather-wallet/tokens' -import { tokens } from '../theme/tokens'; +import { breakpoints, tokens } from '@leather-wallet/tokens'; export const customViewports = { popup: { diff --git a/package.json b/package.json index 3d04c051795..74684bcab20 100644 --- a/package.json +++ b/package.json @@ -132,7 +132,7 @@ "@dlc-link/dlc-tools": "1.1.1", "@fungible-systems/zone-file": "2.0.0", "@hirosystems/token-metadata-api-client": "1.2.0", - "@leather-wallet/tokens": "0.0.8", + "@leather-wallet/tokens": "0.0.10", "@ledgerhq/hw-transport-webusb": "6.27.19", "@noble/hashes": "1.3.2", "@noble/secp256k1": "2.0.0", diff --git a/src/app/components/crypto-assets/bitcoin/brc20-token-asset-list/components/brc20-token-asset-list.layout.tsx b/src/app/components/crypto-assets/bitcoin/brc20-token-asset-list/components/brc20-token-asset-list.layout.tsx index 15d7543f946..0cf4eff9f09 100644 --- a/src/app/components/crypto-assets/bitcoin/brc20-token-asset-list/components/brc20-token-asset-list.layout.tsx +++ b/src/app/components/crypto-assets/bitcoin/brc20-token-asset-list/components/brc20-token-asset-list.layout.tsx @@ -3,7 +3,7 @@ import { Stack, StackProps } from 'leather-styles/jsx'; export function Brc20AssetListLayout({ children }: StackProps) { return ( - + {children} ); diff --git a/src/app/components/crypto-assets/choose-crypto-asset/crypto-asset-list.tsx b/src/app/components/crypto-assets/choose-crypto-asset/crypto-asset-list.tsx index 3a663fa1deb..4692d5b9b85 100644 --- a/src/app/components/crypto-assets/choose-crypto-asset/crypto-asset-list.tsx +++ b/src/app/components/crypto-assets/choose-crypto-asset/crypto-asset-list.tsx @@ -22,7 +22,7 @@ export function CryptoAssetList({ cryptoAssetBalances, onItemClick }: CryptoAsse const { whenWallet } = useWalletType(); return ( - + {signer => ( diff --git a/src/app/components/request-password.tsx b/src/app/components/request-password.tsx index 718b4f7887d..0f630a34f35 100644 --- a/src/app/components/request-password.tsx +++ b/src/app/components/request-password.tsx @@ -87,6 +87,7 @@ export function RequestPassword({ onSuccess }: RequestPasswordProps) { /> {error && {error}} + {/* TODO: #4735 implement forgot password flow */} {/* Forgot password? diff --git a/src/app/features/container/container.tsx b/src/app/features/container/container.tsx index 19e3aeb2bfe..2554c1dab80 100644 --- a/src/app/features/container/container.tsx +++ b/src/app/features/container/container.tsx @@ -67,7 +67,6 @@ export function Container() { useEffect(() => { // set the whole body colour based on page variant so it can update dynamically - // TODO replace this with data-attributes to improve and fix modal BG colours if (variant === 'home') { document.body.style.backgroundColor = token('colors.ink.background-primary'); } @@ -122,6 +121,7 @@ export function Container() { /> } title={getTitleFromUrl(pathname)} + // TODO fix hiding of logo on unlock page logo={ !hideLogo(pathname) && ( void analytics.track('sign-out'), [analytics]); const { signOut } = useKeyActions(); const navigate = useNavigate(); - // FIXME same bug as SwitchAcccount dialog where we call hooks from useWalletType when no wallet yet set + // #4370 SMELL without this early return the wallet crashes on new install with + // : Wallet is neither of type `ledger` nor `software` if (!isShowing) return null; return ( } /> - }> + }> {homePageModalRoutes} {homePageModalRoutes} diff --git a/src/app/store/networks/networks.ts b/src/app/store/networks/networks.ts index db70acf03de..71e3b192529 100644 --- a/src/app/store/networks/networks.ts +++ b/src/app/store/networks/networks.ts @@ -9,8 +9,6 @@ import { storeAtom } from '..'; import { selectCurrentNetworkId, selectNetworks } from './networks.selectors'; import { findMatchingNetworkKey } from './networks.utils'; -// TODO as about this as it's depreacted but not sure what to do instead -// PR https://github.com/leather-wallet/extension/pull/3017 /** @deprecated */ export const currentNetworkAtom = atom(get => { const store = get(storeAtom); diff --git a/src/app/ui/components/account/account.card.stories.tsx b/src/app/ui/components/account/account.card.stories.tsx index ed3c63ae9c2..8a47ba3c4e8 100644 --- a/src/app/ui/components/account/account.card.stories.tsx +++ b/src/app/ui/components/account/account.card.stories.tsx @@ -9,7 +9,7 @@ import { AccountCard as Component } from './account.card'; const meta: Meta = { component: Component, tags: ['autodocs'], - title: 'Design System/Layout/AccountCard', + title: 'Layout/AccountCard', }; export default meta; diff --git a/src/app/ui/components/button/button.stories.tsx b/src/app/ui/components/button/button.stories.tsx index b76ad4f4d42..bff459f25e4 100644 --- a/src/app/ui/components/button/button.stories.tsx +++ b/src/app/ui/components/button/button.stories.tsx @@ -5,7 +5,6 @@ import { BtcAvatarIcon } from '@app/ui/components/avatar/btc-avatar-icon'; import { ChevronDownIcon } from '@app/ui/icons/chevron-down-icon'; import { PlaceholderIcon } from '@app/ui/icons/placeholder-icon'; -// TODO - fix this, my branch is missing a lot of variants and I thin kthats whays up with bottons import { Button as Component } from './button'; const meta: Meta = { diff --git a/src/app/ui/components/containers/dialog/dialog.stories.tsx b/src/app/ui/components/containers/dialog/dialog.stories.tsx index db0b1f5f8d9..dbbb86e3770 100644 --- a/src/app/ui/components/containers/dialog/dialog.stories.tsx +++ b/src/app/ui/components/containers/dialog/dialog.stories.tsx @@ -1,15 +1,26 @@ +import { useState } from 'react'; + import type { Meta } from '@storybook/react'; -import { Dialog as Component, RadixDialogProps } from './dialog'; +import { Button } from '../../button/button'; +import { Dialog as Component } from './dialog'; const meta: Meta = { component: Component, tags: ['autodocs'], - title: 'Design System/Containers/Dialog', + title: 'Containers/Dialog', }; export default meta; -export function Dialog(args: RadixDialogProps) { - return ; +export function Dialog() { + const [isShowing, setIsShowing] = useState(false); + return ( + <> + + setIsShowing(false)}> +

Some Dialog

+
+ + ); } diff --git a/src/app/ui/components/containers/footers/footer.stories.tsx b/src/app/ui/components/containers/footers/footer.stories.tsx index e4c58026b88..7f13d4c0a7b 100644 --- a/src/app/ui/components/containers/footers/footer.stories.tsx +++ b/src/app/ui/components/containers/footers/footer.stories.tsx @@ -2,14 +2,14 @@ import type { Meta } from '@storybook/react'; import { Flex, styled } from 'leather-styles/jsx'; import { Button } from '@app/ui/components/button/button'; -import { AvailableBalance } from '@app/ui/components/containers/footers/available-balance'; +import { Link } from '../../link/link'; import { Footer as Component } from './footer'; const meta: Meta = { component: Component, tags: ['autodocs'], - title: 'Design System/Containers/Footer', + title: 'Containers/Footer', parameters: { controls: { disable: true, @@ -83,17 +83,13 @@ export function FooterWithText() { Leather Wallet will now be provided by Leather Wallet LLC [a subsidiary of Nassau Machines Inc]. Please review and accept Leather Wallet{' '} - + Terms of Service - {' '} + {' '} and{' '} - + Privacy Policy - + . @@ -109,8 +105,7 @@ export function FooterWithLink() { - {/* use new View all addresses - +
); } -export function FooterWithBalance() { - return ( - - - - - ); -} - export function FooterWithBalancesAbove() { return ( diff --git a/src/app/ui/components/containers/headers/header.stories.tsx b/src/app/ui/components/containers/headers/header.stories.tsx index f64a44fd9cb..d6b48b0b883 100644 --- a/src/app/ui/components/containers/headers/header.stories.tsx +++ b/src/app/ui/components/containers/headers/header.stories.tsx @@ -5,7 +5,7 @@ import { Header as Component, HeaderProps } from './header'; const meta: Meta = { component: Component, tags: ['autodocs'], - title: 'Design System/Containers/Header', + title: 'Containers/Header', args: { variant: 'home', }, diff --git a/src/app/ui/icons/docs/icons.mdx b/src/app/ui/icons/docs/icons.mdx index 4c4154ecb70..0cf54de7f4b 100644 --- a/src/app/ui/icons/docs/icons.mdx +++ b/src/app/ui/icons/docs/icons.mdx @@ -20,7 +20,7 @@ import { iconsList } from './icons-list';
-

Default 24x24

+

Default 24x24

{iconsList.map(item => { const IconComponent = Icon[item]; @@ -36,7 +36,7 @@ import { iconsList } from './icons-list';
-

Small 16x16

+

Small 16x16

{iconsList.map(item => { const IconComponent = Icon[item]; diff --git a/src/app/ui/layout/card/card.stories.tsx b/src/app/ui/layout/card/card.stories.tsx index 7bb30e2a122..026a1da1f56 100644 --- a/src/app/ui/layout/card/card.stories.tsx +++ b/src/app/ui/layout/card/card.stories.tsx @@ -8,7 +8,7 @@ import { Card as Component } from './card'; const meta: Meta = { component: Component, tags: ['autodocs'], - title: 'Design System/Layout/Card', + title: 'Layout/Card', }; export default meta; diff --git a/src/app/ui/layout/page/page.layout.stories.tsx b/src/app/ui/layout/page/page.layout.stories.tsx index d6a29ae0f11..8b972aa73d1 100644 --- a/src/app/ui/layout/page/page.layout.stories.tsx +++ b/src/app/ui/layout/page/page.layout.stories.tsx @@ -7,7 +7,7 @@ import { Page as Component } from './page.layout'; const meta: Meta = { component: Component, tags: ['autodocs'], - title: 'Design System/Layout/Page', + title: 'Layout/Page', }; export default meta; diff --git a/src/app/ui/layout/page/page.layout.tsx b/src/app/ui/layout/page/page.layout.tsx index fb8e16dc99b..304441a518d 100644 --- a/src/app/ui/layout/page/page.layout.tsx +++ b/src/app/ui/layout/page/page.layout.tsx @@ -11,8 +11,6 @@ export function Page({ children }: PageProps) { return ( = { component: Component, tags: ['autodocs'], - title: 'Design System/Pages/Home', + title: 'Pages/Home', }; export default meta; diff --git a/src/app/ui/pages/two-column.layout.stories.tsx b/src/app/ui/pages/two-column.layout.stories.tsx index 482571827d5..47b594f98a9 100644 --- a/src/app/ui/pages/two-column.layout.stories.tsx +++ b/src/app/ui/pages/two-column.layout.stories.tsx @@ -6,7 +6,7 @@ import { TwoColumnLayout as Component } from './two-column.layout'; const meta: Meta = { component: Component, tags: ['autodocs'], - title: 'Design System/Layout/TwoColumnLayout', + title: 'Layout/TwoColumnLayout', }; export default meta; @@ -14,7 +14,7 @@ export default meta; export function TwoColumnLayout() { return ( Hello world} content={

lorem ipsum

} action={<>some action}> - +
); } diff --git a/src/app/ui/pages/two-column.layout.tsx b/src/app/ui/pages/two-column.layout.tsx index 2dfe8676b29..78b8c6df1a3 100644 --- a/src/app/ui/pages/two-column.layout.tsx +++ b/src/app/ui/pages/two-column.layout.tsx @@ -33,12 +33,7 @@ export function TwoColumnLayout({ - + { test.beforeEach( async ({ extensionId, globalPage, onboardingPage, homePage, networkPage, page }) => { diff --git a/tests/specs/settings/settings.spec.ts b/tests/specs/settings/settings.spec.ts index 92a825fa117..48c7bb71d37 100644 --- a/tests/specs/settings/settings.spec.ts +++ b/tests/specs/settings/settings.spec.ts @@ -4,7 +4,6 @@ import { SettingsSelectors } from '@tests/selectors/settings.selectors'; import { test } from '../../fixtures/fixtures'; -// FIXME PETE - this test needs to be updated and improved test.describe('Settings menu', () => { test.beforeEach(async ({ extensionId, globalPage, onboardingPage }) => { await globalPage.setupAndUseApiCalls(extensionId); diff --git a/theme/global/global.ts b/theme/global/global.ts index fca0794f3cc..53f9459487a 100644 --- a/theme/global/global.ts +++ b/theme/global/global.ts @@ -1,8 +1,6 @@ +import { tokens } from '@leather-wallet/tokens'; import { defineGlobalStyles } from '@pandacss/dev'; -// TODO import from '@leather-wallet/tokens' -import { tokens } from '../tokens'; - // 4370 TODO audit the use of this file as we are pretty close to not needing it // - could set some styles in the