Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix big amount bug and 0 balance validation #12187

Merged
merged 1 commit into from
May 25, 2023

Conversation

Jibz-Mysten
Copy link
Contributor

@Jibz-Mysten Jibz-Mysten commented May 24, 2023

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

Screen.Recording.2023-05-24.at.3.44.10.PM.mov

after

Screen.Recording.2023-05-24.at.3.45.14.PM.mov

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
  • 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

@Jibz-Mysten Jibz-Mysten requested a review from Jordan-Mysten May 24, 2023 19:52
@vercel
Copy link

vercel bot commented May 24, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
offline-signer-helper ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 25, 2023 2:07pm
4 Ignored Deployments
Name Status Preview Comments Updated (UTC)
explorer ⬜️ Ignored (Inspect) May 25, 2023 2:07pm
explorer-storybook ⬜️ Ignored (Inspect) May 25, 2023 2:07pm
sui-wallet-kit ⬜️ Ignored (Inspect) May 25, 2023 2:07pm
wallet-adapter ⬜️ Ignored (Inspect) May 25, 2023 2:07pm

@@ -35,7 +35,8 @@ export function useGetAllCoins(coinType: string, address?: SuiAddress | null) {

return allData;
},
enabled: !!address,
enabled: !!address && !!coinType,
staleTime: 5000,
Copy link
Contributor

Choose a reason for hiding this comment

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

Fine with this approach for now, but we probably should rework this flow in general to do JIT coin fetching and just use the balance instead of using the cached fetch.

@Jibz-Mysten Jibz-Mysten force-pushed the gj--wallet-send-large-amount-bug-fix branch from 8105f12 to 0a0aee5 Compare May 25, 2023 14:06
@Jibz-Mysten Jibz-Mysten merged commit a68ca2e into main May 25, 2023
@Jibz-Mysten Jibz-Mysten deleted the gj--wallet-send-large-amount-bug-fix branch May 25, 2023 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants