court-dashboard icon indicating copy to clipboard operation
court-dashboard copied to clipboard

Balance Module: Update latest movement message when not effective

Open fabriziovigevani opened this issue 4 years ago • 4 comments

fixes #340

Shows a Effective next term message when the movement is immediate and not yet effective.

By immediate we mean that the movement had an immediate impact on the total balance.

E.g for activating tokens, the active balance is already increased, the increased amount is not yet effective in that is not going to be taken into account for drafting.

Was not totally sure of using the sandglass icon as suggested by @john-light https://github.com/aragon/court-dashboard/issues/340#issuecomment-632136217 since it wouldn't give you an idea of whether the movement is positive or not. For example, another immediate movement that can be not yet effective is slashing.

Preview

Not effective Screen Shot 2020-06-02 at 9 56 07 PM

Effective

Screen Shot 2020-06-02 at 9 59 31 PM

fabriziovigevani avatar Jun 03 '20 01:06 fabriziovigevani

This pull request is being automatically deployed with Vercel (learn more). To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/aragon/court-dashboard/evggngb04 ✅ Preview: https://court-dashboard-git-latest-movement-fix.aragon.now.sh

vercel[bot] avatar Jun 03 '20 01:06 vercel[bot]

  1. In the "Not effective" screenshot, where it says +9490 ANJ Effective next term is this 9490 ANJ included in the balance of Active: 9990 ANJ shown directly above? Or will the 9490 ANJ only be added to the Active balance in the next term? (and then the Active balance will be 19480 ANJ)

  2. In the "Effective" screenshot, under the "Inactive" column it says -9490 ANJ Activated. Should it say "Activated" here? Or Deactivated? And should it show a - sign or a + sign, if the token balance is getting added to this column? (Similar question for the -10,000 ANJ Withdrawal shown on the "My Wallet" column of this screenshot.)

john-light avatar Jun 03 '20 17:06 john-light

In the "Not effective" screenshot, where it says +9490 ANJ Effective next term is this 9490 ANJ included in the balance of Active: 9990 ANJ shown directly above? Or will the 9490 ANJ only be added to the Active balance in the next term? (and then the Active balance will be 19480 ANJ)

It is included already in the balance yes.

In the "Effective" screenshot, under the "Inactive" column it says -9490 ANJ Activated. Should it say "Activated" here? Or Deactivated? And should it show a - sign or a + sign, if the token balance is getting added to this column? (Similar question for the -10,000 ANJ Withdrawal shown on the "My Wallet" column of this screenshot.)

The - a + signs reflects how the latest movement affected that balance. In the case of the inactive balance it shows the - because the 9490 ANJ went from the inactive to the active balance.

Regarding the message, the intention of it is to show the reason of why the balance increased/decreased and in this the inactive balance decreased by 9490 ANJ because it was activated.

Do you see that a little confusing?

Regarding the wallet balance movement, in our local environment we run a script which does two txs to initiate balances, first moves the amount from the wallet balance to the inactive balance(and that's why it's showing the withdrawal) before moving it to the active balance. (In production this would not occur) since the dashboard only allows moving from wallet balance to active balance in one tx. But in the rare case where someone would create txs outside the dashboard and does a staking tx, then the amount would move from the wallet balance to the inactive balance and that's the movement you would see.

fabriziovigevani avatar Jun 04 '20 15:06 fabriziovigevani

It is included already in the balance yes.

I think the ANJ should only be included in the active balance once it is "effective".

The - and + signs reflects how the latest movement affected that balance. In the case of the inactive balance it shows the - because the 9490 ANJ went from the inactive to the active balance.

Regarding the message, the intention of it is to show the reason of why the balance increased/decreased and in this the inactive balance decreased by 9490 ANJ because it was activated.

Do you see that a little confusing?

It is a bit confusing but perhaps only because I lacked context for why the ANJ was being deducted from the Inactive column. We can leave this part as-is for now.

john-light avatar Jun 04 '20 19:06 john-light