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

Consensus dashboard account list card #1160

Merged
merged 6 commits into from
Feb 2, 2024

Conversation

buberdds
Copy link
Contributor

@buberdds buberdds commented Jan 18, 2024

Screenshot from 2024-01-18 11-56-26

Copy link

github-actions bot commented Jan 18, 2024

Deployed to Cloudflare Pages

Latest commit: 76779967a6794859c7a0ab8bf0c8743220b29af0
Status:✅ Deploy successful!
Preview URL: https://8ee988ae.oasis-explorer.pages.dev

@buberdds buberdds force-pushed the mz/consensusDashboardAccountList branch 7 times, most recently from 9d4f66e to 870d546 Compare January 18, 2024 16:22
src/locales/en/translation.json Outdated Show resolved Hide resolved
Comment on lines 805 to 931
// TODO: remove when API returns total, looking at query filters we store that data in Nexus
const total = BigInt(account.available) + BigInt(account.escrow) + BigInt(account.debonding)
Copy link
Member

Choose a reason for hiding this comment

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

This calculation is wrong. API does not return the correct fields, and debonding is named misleadingly. History of wrong math: oasisprotocol/nexus#84 and oasisprotocol/oasis-wallet-web#927

https://nexus.oasis.io/v1/consensus/accounts?limit=1

"available":"0","debonding":"0","escrow":"0"

single account API returns correct fields
https://nexus.oasis.io/v1/consensus/accounts/oasis1qz78ap0456g2rk7j6rmtvasc9v2kjhz2s58qgj90

"available":"21454060793","debonding":"0","debonding_delegations_balance":"0","delegations_balance":"103544825467","escrow":"0"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will leave TODOs in this case.

@buberdds buberdds force-pushed the mz/consensusDashboardAccountList branch 6 times, most recently from d2c3637 to a858a1c Compare January 31, 2024 12:04
@buberdds buberdds force-pushed the mz/consensusDashboardAccountList branch from a858a1c to 02667f8 Compare February 1, 2024 10:35
@buberdds buberdds force-pushed the mz/consensusDashboardAccountList branch from 02667f8 to 7677996 Compare February 2, 2024 09:03
@buberdds buberdds merged commit c02ef34 into master Feb 2, 2024
8 checks passed
@buberdds buberdds deleted the mz/consensusDashboardAccountList branch February 2, 2024 09:06
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.

None yet

2 participants