diff --git a/packages/app-extension/src/components/Unlocked/Settings/AddConnectWallet/CreateMenu.tsx b/packages/app-extension/src/components/Unlocked/Settings/AddConnectWallet/CreateMenu.tsx index 4edea6c29..f27fbcaa6 100644 --- a/packages/app-extension/src/components/Unlocked/Settings/AddConnectWallet/CreateMenu.tsx +++ b/packages/app-extension/src/components/Unlocked/Settings/AddConnectWallet/CreateMenu.tsx @@ -9,6 +9,7 @@ import { UI_RPC_METHOD_KEYRING_DERIVE_WALLET, UI_RPC_METHOD_KEYRING_STORE_READ_ALL_PUBKEYS, UI_RPC_METHOD_SIGN_MESSAGE_FOR_PUBLIC_KEY, + UI_RPC_METHOD_USER_ACCOUNT_READ, } from "@coral-xyz/common"; import { HardwareIcon, @@ -16,6 +17,7 @@ import { PushDetail, } from "@coral-xyz/react-common"; import { + useAuthenticatedUser, useBackgroundClient, useKeyringHasMnemonic, useUser, @@ -40,6 +42,7 @@ export function CreateMenu({ blockchain }: { blockchain: Blockchain }) { const background = useBackgroundClient(); const hasMnemonic = useKeyringHasMnemonic(); const user = useUser(); + const authenticatedUser = useAuthenticatedUser(); const [keyringExists, setKeyringExists] = useState(false); const [newPublicKey, setNewPublicKey] = useState(""); const [openDrawer, setOpenDrawer] = useState(false); @@ -128,6 +131,12 @@ export function CreateMenu({ blockchain }: { blockchain: Blockchain }) { params: [blockchain], }); } + + await background.request({ + method: UI_RPC_METHOD_USER_ACCOUNT_READ, + params: [authenticatedUser?.jwt], + }); + setNewPublicKey(newPublicKey); setLoading(false); };