-
Notifications
You must be signed in to change notification settings - Fork 98
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
Added undelegation transactions to TabMyDelegation #1743
Conversation
- setUnbondingDelegations now takes as input an array instead of doing that from outside Signed-off-by: Karoly Albert Szabo <[email protected]>
Signed-off-by: Karoly Albert Szabo <[email protected]>
Codecov Report
@@ Coverage Diff @@
## develop #1743 +/- ##
===========================================
- Coverage 97.7% 97.65% -0.06%
===========================================
Files 102 102
Lines 2093 2088 -5
Branches 93 93
===========================================
- Hits 2045 2039 -6
- Misses 39 40 +1
Partials 9 9
|
Codecov Report
@@ Coverage Diff @@
## develop #1743 +/- ##
===========================================
- Coverage 95.07% 95.06% -0.01%
===========================================
Files 122 123 +1
Lines 2982 2978 -4
Branches 128 126 -2
===========================================
- Hits 2835 2831 -4
Misses 137 137
Partials 10 10
|
Signed-off-by: Karoly Albert Szabo <[email protected]>
…remove it?) Signed-off-by: Karoly Albert Szabo <[email protected]>
See my comment on #1387 (comment). Let's rename the tab to @faboweb what do you think ? |
@sabau had a cool idea about making a dropdown on the |
sounds cool. but let's maybe sketch it first. |
test/e2e/delegation.js
Outdated
@@ -62,11 +62,13 @@ test(`delegation`, async function(t) { | |||
t.test(`Stake`, async t => { | |||
let totalAtoms = (await app.client | |||
.$(`.header-balance .total-atoms h2`) | |||
.getText()).split(`.`)[0] // 130.000... | |||
.getText()).split(`.`)[0] // 30.000... |
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.
huh? why is it suddenly 100 less?
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 think bonded atoms are not calculated in to the total atoms any longer. Needs to be fixed.
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.
Exaclty this point I was uncertain on how this changed!
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.
Still an issue?
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.
fixed! 130.000 again
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.
by replacing state.stuff = x
with Vue.set(state, 'stuff', x)
amazing work thank you @sabau! @fedekunze we don't use the B (bond, unbond, bonding, unbonding) word, bud. 😉
very cool idea. i think i would prefer if we showed a link to the transaction on the transaction page as opposed to the actual tx component - but i can mock this up. either way, agreed - should be in a different PR. |
Signed-off-by: Karoly Albert Szabo <[email protected]>
data: () => ({ | ||
bondInfo: `Validators you are currently bonded to`, | ||
unbondInfo: `Your bonded validators in unbonding process` | ||
unbondInfo: `Your bonded validators in unbonding process`, | ||
unbondTransactions: `The transactions currently in unbouding period` |
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.
unbondTransactions: `The transactions currently in unbouding period` | |
unbondTransactions: `The transactions currently in unbonding period` |
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-bonding ;)
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.
that's how the term is called, unbonding period. We agreed not to use bonding instead of delegation
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.
let's just call it undelegation period
?
Co-Authored-By: sabau <[email protected]>
My proposal:
|
My proposal:
|
I vote NoWithVeto on showing the undelegation txs |
@@ -33,32 +33,28 @@ export default ({ node }) => { | |||
state.delegates = state.delegates.filter(c => c.id !== delegate) | |||
}, | |||
setCommittedDelegation(state, { candidateId, value }) { | |||
let committedDelegates = Object.assign({}, state.committedDelegates) | |||
state.committedDelegates[candidateId] = value |
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.
this may be why the total atoms do not update. Vue has sometimes a problem with checking updates on objects. the getter in getters.js
is probably only updating when state.committedDelegates
changes but only the properties of this change. Try using Vue.set(state.committedDelegates, candidateId, value)
.
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.
Oh no back then I missed this comment! I just fixed this
no such thing as NoWithVeto here ;) |
why?
also an option, but if the 2 list items are too similar it could be confusing
I disagree, it's not only about your validators but also about the undelegations. |
I think we should discuss this synchronously. I would like to answer and all together agree on those two questions:
|
Show just 2 list with minimal redisign until Staking 2
In Staking 2 group per validator the txs and we will decide the details there
|
Signed-off-by: Karoly Albert Szabo <[email protected]>
Signed-off-by: Karoly Albert Szabo <[email protected]>
- adjust tests - dirty fix: shares and shares_amount have to be fixed in the mock Signed-off-by: Karoly Albert Szabo <[email protected]>
- fixed setCiommitedDelegation - vue caveats for updated props not seen Signed-off-by: Karoly Albert Szabo <[email protected]>
Signed-off-by: Karoly Albert Szabo <[email protected]>
- add Time helper to get min_time for unbonding transactions - show only transactions in undelegation period Signed-off-by: Karoly Albert Szabo <[email protected]>
Description
Graphical suggestions are really welcome :) I personally don't like the solution I pourpose here, but was a starting point to have the data ready by recycling the view.
An idea I had was to make the transacitons part of the table, so every transacitons will appear as subrow of the unbounding validator (eventually collapsable)
Closes #1387
Note
We should create a separate PR for that
❤️ Thank you!
CHANGELOG.md
with issue # and GitHub usernameFiles changed
in the github PR explorer