-
Notifications
You must be signed in to change notification settings - Fork 126
app: replace legacy fee registration with postbond #2025
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
Conversation
Thanks! I'm rushing to resolve #1990 so we can iron out the UI elements of bond options, namely target tier and max bonded amount. |
The reg asset selector and other forms used in posting a bond still contain "registration fee" terminology. Variable, class, method names as well. I believe those need to be updated but want to put the core stuff out here first. |
356ccc3
to
e2627e3
Compare
4e6c703
to
6beff4a
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.
I wasn't able to post the bond because I kept getting the panic because pendingBondConfs
was nil.
c3e131b
to
ae92a07
Compare
client/core/bond.go
Outdated
dc.acct.targetTier = form.Bond / bondAsset.Amt | ||
dc.acct.maxBondedAmt = maxBondedAmt | ||
dc.acct.authMtx.Unlock() | ||
// maxBondedAmt and bondAsset were set by connectDEX |
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.
no longer correct if view-only acct?
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.
No longer correct in all cases. They’re only set here now, if maintain is true and it’s a fresh registration attempt (!acctExists).
About max bonded amount, assuming a user has zero trading tier(and maybe the expired tier has not been refunded) and then decides to set bond options to (
I guess since #1990 is merged, we can discuss this further. |
That's not a usable amount. The default for maxBondAmt is 4x the bond amount times target tier.
The bond-reserves PR needs to go in. There are extensive changes to |
For UI, we generally do NOT want the user setting On this topic though, you do make a point that if user tier drops and more bond is required, a clear backend notification should be emitted indicating why another bond cannot be posted (they need to raise their max bonded amount or accept that their account is penalized). |
Right. I agree the bonds reserves PR might need to go in before finally resolving the UI elements regarding bonds, since it has extensive changes. Regarding having an advance bonds settings section(esp. for |
You may rebase on the |
@ukane-philemon If you are taking this over, do you want to make a new PR or can you push on this branch? |
I think @itswisdomagain is still on this? (untill he says otherwise). However, I was testing this PR with some changes related to this. |
@itswisdomagain Did you wanna do the rebase and a couple more tweaks before handing it over? Or did I misunderstand matrix chat? |
While at it, we could update these too. |
I want to keep the footprint of this PR minimal to get it in fast. If we update that stuff (for completeness, but unnecessary), we need to isolate it into a separate commit, but I still expect breakage doing it. |
I'll rebase and cherry-pick @ukane-philemon's commit for the bond maintenance option, so this can go in without further delay. |
ae92a07
to
945ff5c
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.
Some warnings and errors, not sure if related to these changes:
I was deleting the account in options and then connecting again. Maybe related... |
Oh, yeah, maybe unrelated, but issue a bond to a dex, then "Disable Account" in Settings then connect to the dex again and you get those logs. It appears to brick the refund. |
Looks like we should block Disable Account if there are active bonds! |
To clarify, we still need to update the UI. I just meant let's not churn on "Variable, class, method names as well". "How will you post the registration fee?" => "What asset would you like to use for fidelity bonds?" "...funds will be spent from your wallet to play the registration fee." => "...funds will be locked in time-locked fidelity bonds, which you may redeem in the future." etc. |
Just did this in #2103 I think this PR should rebase on that one. |
945ff5c
to
01ef09e
Compare
Rebased and force pushed on the remote. If there are more than a couple iterations, we may reopen this PR from my remote (still including the commit from you guys of course). |
01ef09e
to
812f66b
Compare
Thanks @chappjc. Sorry for the delays. |
812f66b
to
4b86a8d
Compare
My last force push is a minimal change to how the |
dad84fd
to
8510914
Compare
Resolves #1991.
Registration flow is largely maintained, except the /postbond API endpoint
is used instead of /register; and the confirm registration form allows users
to specify a bond strength.
Markets page shows confirmation counter for pending bonds which is only
displayed if the user's account tier is < 1 and there are pending bonds.
Also adds a Post Bond feature to the dexsettings page for manual bond posting.