From f7dcd5fdf79e2d380a561c66ca3efc0a17066d95 Mon Sep 17 00:00:00 2001 From: Vladan Date: Tue, 19 Mar 2024 13:45:06 +0100 Subject: [PATCH] fix: metamask wallet --- .../MetamaskMigrationDialog/MetamaskCreateAccount.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/Dialogs/MetamaskMigrationDialog/MetamaskCreateAccount.tsx b/src/components/Dialogs/MetamaskMigrationDialog/MetamaskCreateAccount.tsx index 444301d1..fcf8f147 100644 --- a/src/components/Dialogs/MetamaskMigrationDialog/MetamaskCreateAccount.tsx +++ b/src/components/Dialogs/MetamaskMigrationDialog/MetamaskCreateAccount.tsx @@ -6,7 +6,7 @@ import UserContext from '@context/UserContext'; import { Network } from '@data/networks'; import { estimateRegistrationPrice, getAccountBalance } from '@utils/ens'; import { sendAmount, switchToNetwork } from '@utils/metamask'; -import { BigNumber, utils } from 'ethers'; +import { BigNumber, Wallet, utils } from 'ethers'; import { useContext, useEffect, useRef, useState } from 'react'; import InfoLight from '@media/UI/info-light.svg'; import InfoDark from '@media/UI/info-dark.svg'; @@ -96,7 +96,8 @@ export default function MetamaskCreateAccount({ } await fdpClientRef.current.account.register(request); - setWallet(fdpClientRef.current.account.wallet); + const wallet = new Wallet(fdpClientRef.current.account.wallet.privateKey); + setWallet(wallet); setFdpStorageType('native'); setIsLoggedIn(true); setLoginType('username');