fix bug in disconnect & reconnect

This commit is contained in:
Maximilian Schneider 2021-07-05 17:27:47 +02:00
parent cdd965071d
commit 1629ff5756
3 changed files with 1 additions and 11 deletions

View File

@ -18,13 +18,6 @@ export function findLargestBalanceAccountForMint(
const account = accounts[maxBalanceAccountIndex]
const balance = balances[maxBalanceAccountIndex]
console.log(
'findLargestBalanceAccountForMint',
maxBalanceAccountIndex,
account,
balance
)
return { account, balance }
}

View File

@ -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()
})()

View File

@ -152,8 +152,6 @@ const useWalletStore = create<WalletStore>((set, get) => ({
walletOwner
)
console.log('fetchWalletTokenAccounts', ownedTokenAccounts)
set((state) => {
state.tokenAccounts = ownedTokenAccounts
})