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

feat: don't refetch approval/stake fees when mutation is pending #6989

Merged
merged 2 commits into from
May 27, 2024

Conversation

gomesalexandre
Copy link
Contributor

Description

Tackles the jumpy issue spotted by @0xApotheosis in #6925 (review):

  •  Approval gas estimate changes after confirming quote
  •  Approval fee fiat amount spans two lines

Pull Request Type

  • 🐛 Bug fix (Non-breaking Change: Fixes an issue)
  • 🛠️ Chore (Non-breaking Change: Doc updates, pkg upgrades, typos, etc..)
  • 💅 New Feature (Breaking/Non-breaking Change)

Issue (if applicable)

Risk

High Risk PRs Require 2 approvals

What protocols, transaction types or contract interactions might be affected by this PR?

Testing

  • Using MM, fire click either the approve or stake button depending on whether or not an approval is needed
  • Wait something like 15-30s before confirming the Tx in wallet (node is currently turbo slow so things can take a v. long time to respond back)
  • Ensure the gas fee is not refetched after you clicked the confirm button in app
  • Ensure the fas fee is still not refetched after confirming in MM, and before we route to status

Engineering

  • ^

Operations

  • ^

Screenshots (if applicable)

https://jam.dev/c/eea90cea-e428-4c00-9400-d3151ac6e32b

@gomesalexandre gomesalexandre requested a review from a team as a code owner May 24, 2024 10:01
@gomesalexandre gomesalexandre marked this pull request as draft May 24, 2024 10:01
@gomesalexandre
Copy link
Contributor Author

gomesalexandre commented May 24, 2024

Note, spotted another issue with share of pool being refetchy, see Jam at 2:39 https://jam.dev/c/eea90cea-e428-4c00-9400-d3151ac6e32b - fixed by cherry-picking this bit from the topmost PR: https://github.com/shapeshift/web/pull/6963/files#diff-2c26074bf0c6e9c74bfe83f94b8a5e575248d9f946d41508854d0c7868402135

0fd524e / https://jam.dev/c/40e91cd2-ead4-4597-9497-a13cf7b8fc56

@gomesalexandre gomesalexandre marked this pull request as ready for review May 24, 2024 10:12
@gomesalexandre gomesalexandre mentioned this pull request May 24, 2024
3 tasks
@0xApotheosis 0xApotheosis self-assigned this May 27, 2024
Copy link
Contributor

@0xApotheosis 0xApotheosis left a comment

Choose a reason for hiding this comment

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

Jumpiness resolved ☺️

@0xApotheosis 0xApotheosis merged commit 99b739b into develop May 27, 2024
6 checks passed
@0xApotheosis 0xApotheosis deleted the feat_stake_fees_follow_up branch May 27, 2024 01:01
gomesalexandre added a commit that referenced this pull request May 27, 2024
* feat: don't refetch approval/stake fees when mutation is pending

* feat: cherry-pick invalidateQueries safety bits
gomesalexandre added a commit that referenced this pull request May 27, 2024
* feat: don't refetch approval/stake fees when mutation is pending

* feat: cherry-pick invalidateQueries safety bits
0xApotheosis pushed a commit that referenced this pull request May 27, 2024
* feat: surface manual rune address to users, start wire-up of form in
ChangeAddressInput and improve types

* feat: cleanup

* feat: new rune address terminology

* feat: improve naming and validation from the skeleton pre-wire-up

* feat: wire-up gas fees

* feat: cleanup fluff

* feat: more cleanup

* feat: more cleanup

* feat: disable same addy for custom addresses

* feat: wire-up change address status

* fix: loading state and improve copies

* fix: lint

* feat: invalidate queries

* feat: consistently invalidate as an async cleanup operation

* feat: tackle TODO

* add empty state

* update confirm and input change address

* feat: account dropdown address form-based same address validation

* feat: don't fetch fees on same account dropdown addy

* feat: more guards against overfetching

* feat: disable button when no current address

* feat: omit undefined param in sendChangeAddressTx and rename to
handleChangeAddress

* feat: cleanup

* feat: better home for types

* feat: more cleanup

* feat: comment typo

* fix: merge

* fix: error messaging

* feat: don't refetch approval/stake fees when mutation is pending (#6989)

* feat: don't refetch approval/stake fees when mutation is pending

* feat: cherry-pick invalidateQueries safety bits

* feat: changeAddresStatus external link

* feat: improve copy

* feat: rm unused translations

* fix: address selection invalid shenanigans

* feat: improve alignment

---------

Co-authored-by: reallybeard <[email protected]>
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.

Implement rFOX staking flow
2 participants