From c0537bc4720d41442f77ece9efdca66ffd19884a Mon Sep 17 00:00:00 2001 From: starknetdev Date: Fri, 13 Oct 2023 15:37:34 +0100 Subject: [PATCH] force disconnect of original account --- ui/src/app/components/ArcadeDialog.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ui/src/app/components/ArcadeDialog.tsx b/ui/src/app/components/ArcadeDialog.tsx index ee2b736f7..7a0d9f204 100644 --- a/ui/src/app/components/ArcadeDialog.tsx +++ b/ui/src/app/components/ArcadeDialog.tsx @@ -22,7 +22,7 @@ export const ArcadeDialog = () => { const showArcadeDialog = useUIStore((state) => state.showArcadeDialog); const arcadeDialog = useUIStore((state) => state.arcadeDialog); const isWrongNetwork = useUIStore((state) => state.isWrongNetwork); - const { connect, connectors, available } = useConnectors(); + const { connect, disconnect, connectors, available } = useConnectors(); const { getMasterAccount, create, @@ -149,6 +149,7 @@ export const ArcadeDialog = () => { key={index} account={account} onClick={connect} + disconnect={disconnect} address={address!} walletAccount={walletAccount!} masterAccountAddress={masterAccount} @@ -231,6 +232,7 @@ export const ArcadeDialog = () => { interface ArcadeAccountCardProps { account: Connector; onClick: (conn: Connector) => void; + disconnect: () => void; address: string; walletAccount: AccountInterface; masterAccountAddress: string; @@ -259,6 +261,7 @@ interface ArcadeAccountCardProps { export const ArcadeAccountCard = ({ account, onClick, + disconnect, address, walletAccount, masterAccountAddress, @@ -321,7 +324,10 @@ export const ArcadeAccountCard = ({