Skip to content

Commit

Permalink
FIx primary key bug (#3259)
Browse files Browse the repository at this point in the history
  • Loading branch information
hkirat authored Mar 9, 2023
1 parent c087cb0 commit 6a545d1
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ 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,
MnemonicIcon,
PushDetail,
} from "@coral-xyz/react-common";
import {
useAuthenticatedUser,
useBackgroundClient,
useKeyringHasMnemonic,
useUser,
Expand All @@ -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);
Expand Down Expand Up @@ -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);
};
Expand Down

1 comment on commit 6a545d1

@vercel
Copy link

@vercel vercel bot commented on 6a545d1 Mar 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.