Skip to content

Commit

Permalink
fix big amount bug and 0 balance validation (#12187)
Browse files Browse the repository at this point in the history
## Description 

Describe the changes or additions included in this PR.

Fix the validation showing a 0 balance issue. Setting stale time to 5000
fixes it. useQuery queryFn
before


https://github.com/MystenLabs/sui/assets/126525197/41cd560d-03a5-4ce7-bfed-83374e6a94ea


after 


https://github.com/MystenLabs/sui/assets/126525197/058f6e17-46b2-4cc9-928e-6624a4442c06


## Test Plan 

How did you test the new or updated feature?

---
If your changes are not user-facing and not a breaking change, you can
skip the following section. Otherwise, please indicate what changed, and
then add to the Release Notes section as highlighted during the release
process.

### Type of Change (Check all that apply)

- [ ] protocol change
- [x] user-visible impact
- [ ] breaking change for a client SDKs
- [ ] breaking change for FNs (FN binary must upgrade)
- [ ] breaking change for validators or node operators (must upgrade
binaries)
- [ ] breaking change for on-chain data layout
- [ ] necessitate either a data wipe or data migration

### Release notes
  • Loading branch information
Jibz-Mysten authored May 25, 2023
1 parent 12c4b3a commit a68ca2e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/wallet/src/ui/app/hooks/useGetAllCoins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ export function useGetAllCoins(coinType: string, address?: SuiAddress | null) {

return allData;
},
enabled: !!address,
enabled: !!address && !!coinType,
staleTime: 5000,
initialData: [],
});
}

1 comment on commit a68ca2e

@vercel
Copy link

@vercel vercel bot commented on a68ca2e May 25, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

offline-signer-helper – ./dapps/offline-signer-helper

offline-signer-helper-mysten-labs.vercel.app
offline-signer-helper.vercel.app
offline-signer-helper-git-main-mysten-labs.vercel.app

Please sign in to comment.