Skip to content

Commit

Permalink
fix: change owner (#10625)
Browse files Browse the repository at this point in the history
  • Loading branch information
nuanyang233 committed Aug 25, 2023
1 parent d39eadb commit 20d4bab
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,17 @@ export const AccountsManagerPopover = memo<AccountsManagePopoverProps>(
}, [owner, personaManagers, walletManagers])

const handleChangeOwner = useCallback(async () => {
if (isSameAddress(address, account)) return
const result = await connection.connect({
account: address,
chainId,
providerType: ProviderType.MaskWallet,
silent: true,
})
// switch account
if (!isSameAddress(address, account)) {
await connection.connect({
account: address,
chainId,
providerType: ProviderType.MaskWallet,
silent: true,
})

if (network) await Network?.switchNetwork(network.ID)

if (!result) return
if (network) await Network?.switchNetwork(network.ID)
}
await openPopupWindow(PopupRoutes.ChangeOwner, { contractAccount: address, toBeClose: true })
}, [address, connection, account, chainId, network])

Expand Down

0 comments on commit 20d4bab

Please sign in to comment.