diff --git a/packages/apps/dev-wallet/src/Components/BackupMnemonic/BackupMnemonic.tsx b/packages/apps/dev-wallet/src/Components/BackupMnemonic/BackupMnemonic.tsx index efb5fbf5fc..1dd8820363 100644 --- a/packages/apps/dev-wallet/src/Components/BackupMnemonic/BackupMnemonic.tsx +++ b/packages/apps/dev-wallet/src/Components/BackupMnemonic/BackupMnemonic.tsx @@ -30,9 +30,9 @@ export function BackupMnemonic({ return ( <> {step === 'start' && ( - - - Write your recovery phrase down + + + Write your recovery phrase down Make sure no one is watching you; consider some malware might take screenshot of your screen @@ -59,7 +59,7 @@ export function BackupMnemonic({ )} {step === 'view' && ( - + Write down your recovery phrase Your recovery phrase is the key to your account. Write it down and diff --git a/packages/apps/dev-wallet/src/Components/Table/FormatCreationDateWrapper.tsx b/packages/apps/dev-wallet/src/Components/Table/FormatCreationDateWrapper.tsx new file mode 100644 index 0000000000..d7b2d4945b --- /dev/null +++ b/packages/apps/dev-wallet/src/Components/Table/FormatCreationDateWrapper.tsx @@ -0,0 +1,13 @@ +import { IPactCommand } from '@kadena/client'; +import { ICompactTableFormatterProps } from '@kadena/kode-ui/patterns'; +import type { FC } from 'react'; + +export const FormatCreationDateWrapper: () => FC = + () => + ({ value }) => { + const date = new Date( + ((JSON.parse(value) as IPactCommand).meta.creationTime || 0) * 1000, + ).toLocaleString(); + + return date; + }; diff --git a/packages/apps/dev-wallet/src/Components/Table/FormatHash.tsx b/packages/apps/dev-wallet/src/Components/Table/FormatHash.tsx new file mode 100644 index 0000000000..de43c1bb86 --- /dev/null +++ b/packages/apps/dev-wallet/src/Components/Table/FormatHash.tsx @@ -0,0 +1,8 @@ +import { shorten } from '@/utils/helpers'; +import { ICompactTableFormatterProps } from '@kadena/kode-ui/patterns'; +import type { FC } from 'react'; + +export const FormatHash: () => FC = + () => + ({ value }) => + shorten(value); diff --git a/packages/apps/dev-wallet/src/Components/Table/FormatKeys.tsx b/packages/apps/dev-wallet/src/Components/Table/FormatKeys.tsx new file mode 100644 index 0000000000..627e13b8e0 --- /dev/null +++ b/packages/apps/dev-wallet/src/Components/Table/FormatKeys.tsx @@ -0,0 +1,28 @@ +import { IKeySet } from '@/modules/account/account.repository'; +import { shorten } from '@/utils/helpers'; +import { MonoKey } from '@kadena/kode-icons/system'; +import { Stack, Text } from '@kadena/kode-ui'; +import { ICompactTableFormatterProps } from '@kadena/kode-ui/patterns'; +import type { FC } from 'react'; + +export const FormatKeys: () => FC = + () => + ({ value }) => { + console.log(1111, value); + const keyset: string[] = value.length > 1 ? (value[1] as string) : []; + + console.log(keyset); + return ( + + {value[0]}: + {keyset.map((key) => ( + + + + + {shorten(key)}{' '} + + ))} + + ); + }; diff --git a/packages/apps/dev-wallet/src/pages/backup-recovery-phrase/write-down/confirm-recovery-phrase.tsx b/packages/apps/dev-wallet/src/pages/backup-recovery-phrase/write-down/confirm-recovery-phrase.tsx index ef3fd0431e..315b4fbbd8 100644 --- a/packages/apps/dev-wallet/src/pages/backup-recovery-phrase/write-down/confirm-recovery-phrase.tsx +++ b/packages/apps/dev-wallet/src/pages/backup-recovery-phrase/write-down/confirm-recovery-phrase.tsx @@ -1,4 +1,4 @@ -import { Box, Button, Heading, Text, TextField } from '@kadena/kode-ui'; +import { Button, Heading, Stack, Text, TextField } from '@kadena/kode-ui'; import { useState } from 'react'; import { useForm } from 'react-hook-form'; @@ -21,15 +21,15 @@ export function ConfirmRecoveryPhrase({ return ( <> - - Confirm you wrote it down + + Confirm you wrote it down
{error && {error}} -
+
); } diff --git a/packages/apps/dev-wallet/src/pages/keys/Components/KeySets.tsx b/packages/apps/dev-wallet/src/pages/keys/Components/KeySets.tsx index 15fb42863d..6efe732aed 100644 --- a/packages/apps/dev-wallet/src/pages/keys/Components/KeySets.tsx +++ b/packages/apps/dev-wallet/src/pages/keys/Components/KeySets.tsx @@ -1,9 +1,10 @@ import { ListItem } from '@/Components/ListItem/ListItem'; +import { FormatKeys } from '@/Components/Table/FormatKeys'; import { useWallet } from '@/modules/wallet/wallet.hook'; import { shorten } from '@/utils/helpers'; import { MonoKey } from '@kadena/kode-icons/system'; import { Button, Heading, Stack, Text } from '@kadena/kode-ui'; -import { useLayout } from '@kadena/kode-ui/patterns'; +import { CompactTable, useLayout } from '@kadena/kode-ui/patterns'; import { CreateKeySetForm } from './CreateKeySetForm'; export function KeySets() { @@ -17,7 +18,7 @@ export function KeySets() { /> - Key Sets + Key Sets - - {keysets - .filter(({ guard }) => guard.keys.length >= 2) - .map((keySet) => ( - - - - {keySet.alias} - {keySet.principal} - - - - {keySet.guard.pred}: - {keySet.guard.keys.map((key) => ( - - - - - {shorten(key)}{' '} - - ))} - - - ))} - + guard.keys.length >= 2)} + /> ); diff --git a/packages/apps/dev-wallet/src/pages/signature-builder/signature-builder.tsx b/packages/apps/dev-wallet/src/pages/signature-builder/signature-builder.tsx index 6a9aaec3ce..6688e68227 100644 --- a/packages/apps/dev-wallet/src/pages/signature-builder/signature-builder.tsx +++ b/packages/apps/dev-wallet/src/pages/signature-builder/signature-builder.tsx @@ -199,10 +199,8 @@ export function SignatureBuilder() { - - - Paste SigData, CommandSigData, or Payload - + + Paste SigData, CommandSigData, or Payload