-
Notifications
You must be signed in to change notification settings - Fork 182
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: custom rfox reward address display #7734
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, confirmed this does what it says on the box:
https://jam.dev/c/7b79745e-b9db-4c29-b9d0-e7632a7fd598
Noticed two bugs while testing this however:
- When having a custom RUNE rewards address, it is impossible to continue without manually inputting said address again. This is confirmed to be a bug against develop, though safer, as the previous behaviour for multi-accounts was automagical
<AccountDropdown />
select, which would change the user's reward addy - When having a custom RUNE rewards address, the
<AccountDropdown />
does not display for multi-accounts wallet, neither inStake
norChange Address
. We should let the users toggle betweenUse Custom Address
orUse Wallet Account
(though happy to have this one done in a follow-up)
Talked with the product team: If a user already has a stake:
|
3cb801c
to
73986b8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, while this does the do in happy paths, spotted two regressions:
Native
Already staked accounts (e2e, including wallets switch)
While this does what it says on the box for the most part, noticed two issues here, one which is a blocker and the other which is more like a UI improvement:
- UI improvement: it is possible to copy the account dropdown addy in "Change Address", but not the actual rewards address
- I was able to get into a non-actionable confirm button, which I believe may be the the same root cause as before. i.e, if you were to be able to manually input the address here still, I think this would work?
https://jam.dev/c/9779abe3-e831-4260-baf2-afa18f777836
Never staked account
- Most likely unrelated to this PR, I was never able to continue as fees estimation seem to be failing for some reason when coming back to input and going to confirm again, but the json-rpc call definitely succeeded here
- Tested back fresh after a refresh, and could repro again
MM
Already staked account
- Could repro the same regression re: disabled state
https://jam.dev/c/46f1d57a-3b45-4b6d-ab77-a49916724cd5
Never staked before account
- Widget goes hasta la vista after "Confirm and Stake" click as
stakeTxid
is undefined, so unable to test this
Confirmed develop is happy with the same flow:
b8f98ca
to
80fbb34
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last spotted regression, weird case of a missing address next to a copy button but otherwise LGTM
Never staked before account e2e (MM) :forbidden:
https://jam.dev/c/c731fff4-1b96-4551-b5bb-304c1d831e05
- I was able to stake succesfully this time around
- Staking again doesn't work
Also noting that the copy button is still borked in "Change Address" here and displaying no addy:
@NeOMakinG we should also add custom address support in useRfoxStake()
, so that we always pass a runeAddress
down, otherwise fees estimation will be disabled, meaning that we'll be perma-disabled:
Already staked account e2e (native) :check
https://jam.dev/c/655634d1-c298-4aae-9c67-90f8bb6b2874
Noting the addition of custom reward addy copy button 🎉
Native account switch (e2e) :check:
https://jam.dev/c/25751e0e-5299-490b-8052-6640bc09cde7
Already staked account e2e (MM) :check:
Weird one since this didn't work for a newly staked account
f569d33
to
f79b7b4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NeOMakinG tested with MM (no multichain snap) and native, LGTM, stamping this one for the sake of progression, as this makes things better than before - tyvm for the patience on the review cycles here! See testing below, three spotted issues to be tackled as follow-up:
- Native "Same address not allowed" state missing
- "Change Address"'s " copy button still sad for MM missing copy alongside it
- Shouldn't be able to toggle "Wallet Address" in change address if there is no THORChain support for the wallet (e.g MM without snaps)
Never staked before account (MM)
@NeOMakinG still noticing two issues re: change address, though non-blocking:
- Current reward address is not shown
- This copy shouldn't say "Use Wallet Address" - we shouldn't be able to toggle, only custom address is supported for MM and this should say something along the lines of "Use different address"
First stake and first subsequent stake
https://jam.dev/c/c03b4544-abed-4048-90b7-d7ad672c0289
Another subsequent stake
https://jam.dev/c/6a2fd5ae-ce63-403c-90d8-185af34ce7db
Never staked before account (native)
https://jam.dev/c/d9687ca3-c1f1-4166-93c6-1787a4df2de3
- Noticing we're missing error state here for "Same address not allowed":
- Which is happy after triggering address back and forth to the same account:
Already staked account (MM) - effectively the same as the previous one, but after a refresh
https://jam.dev/c/c591ba89-c62d-4d24-86b5-7490e347e24b
Description
If you add a custom reward address to rfox, it's not displayed and it would be overriden by
Since we introduced a copy button, we know see an empty copy button:
We should display the actual address instead
To solve most of the issues, we decided with the product team to remove the address override feature from the staking feature, here is how it should behave:
If you never staked
If you staked already
Issue (if applicable)
closes #7694
Risk
Low
Testing
On rFOX:
If you never staked
If you staked already
Also verify that the Change Address component is working as expected (be able to change the address in any ways using any wallet)
Also if you have an active staking, you could be able to click
change address
on the top right of the bottom part to go to the change address tabEngineering
n/a
Operations
n/a
Screenshots (if applicable)
MM without snap and without staking active:
MM With custom address and staking active
MM with snap without active staking
Native with custom reward address
Native with internal account active staking
Native without staking active