fix bug in disconnect & reconnect
This commit is contained in:
parent
cdd965071d
commit
1629ff5756
|
@ -18,13 +18,6 @@ export function findLargestBalanceAccountForMint(
|
|||
const account = accounts[maxBalanceAccountIndex]
|
||||
const balance = balances[maxBalanceAccountIndex]
|
||||
|
||||
console.log(
|
||||
'findLargestBalanceAccountForMint',
|
||||
maxBalanceAccountIndex,
|
||||
account,
|
||||
balance
|
||||
)
|
||||
|
||||
return { account, balance }
|
||||
}
|
||||
|
||||
|
|
|
@ -109,7 +109,6 @@ export default function useWallet() {
|
|||
setWalletStore((state) => {
|
||||
state.connected = false
|
||||
state.tokenAccounts = []
|
||||
state.mints = {}
|
||||
})
|
||||
notify({
|
||||
type: 'info',
|
||||
|
@ -128,7 +127,7 @@ export default function useWallet() {
|
|||
|
||||
// fetch pool on page load
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
;(async () => {
|
||||
await actions.fetchPool()
|
||||
actions.fetchMints()
|
||||
})()
|
||||
|
|
|
@ -152,8 +152,6 @@ const useWalletStore = create<WalletStore>((set, get) => ({
|
|||
walletOwner
|
||||
)
|
||||
|
||||
console.log('fetchWalletTokenAccounts', ownedTokenAccounts)
|
||||
|
||||
set((state) => {
|
||||
state.tokenAccounts = ownedTokenAccounts
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue