From 7304274c44969f43ee1249b98a391df1cd83327c Mon Sep 17 00:00:00 2001 From: Kiran Pachhai Date: Wed, 27 Sep 2023 11:57:59 -0400 Subject: [PATCH] Now supporting the import of external accounts --- .../src/components/cards/GetAccountInfo.tsx | 6 +- .../src/components/cards/SendHelloMessage.tsx | 1 + .../components/sections/ExternalAccount.tsx | 30 +- packages/site/src/pages/index.tsx | 10 +- packages/site/src/types/snap.ts | 29 +- packages/snap/snap.manifest.json | 2 +- packages/snap/src/index.ts | 12 +- .../snap/src/rpc/account/getAccountBalance.ts | 3 +- .../snap/src/rpc/account/getAccountInfo.ts | 12 +- .../snap/src/rpc/account/transferCrypto.ts | 1 + .../snap/src/services/impl/hedera/index.ts | 15 +- packages/snap/src/snap/account.ts | 396 +++++++++++++++--- packages/snap/src/snap/dapp.ts | 20 +- packages/snap/src/snap/dialog.ts | 2 +- packages/snap/src/snap/state.ts | 33 +- packages/snap/src/types/account.ts | 10 + packages/snap/src/types/state.ts | 7 +- packages/snap/src/utils/config.ts | 3 +- packages/snap/src/utils/init.ts | 9 +- packages/snap/src/utils/params.ts | 37 ++ 20 files changed, 495 insertions(+), 143 deletions(-) diff --git a/packages/site/src/components/cards/GetAccountInfo.tsx b/packages/site/src/components/cards/GetAccountInfo.tsx index 1517bef..8ffaa43 100644 --- a/packages/site/src/components/cards/GetAccountInfo.tsx +++ b/packages/site/src/components/cards/GetAccountInfo.tsx @@ -12,7 +12,9 @@ import { } from '../../utils'; import { hederaNetworks } from '../../utils/hedera'; import { Card, SendHelloButton } from '../base'; -import { GetExternalAccountRef } from '../sections/ExternalAccount'; +import ExternalAccount, { + GetExternalAccountRef, +} from '../sections/ExternalAccount'; type Props = { setCurrentNetwork: React.Dispatch>; @@ -70,7 +72,7 @@ const GetAccountInfo: FC = ({ description: 'Get the current account information', form: ( <> - {/* */} +