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

Update WG budget proposal details page shows blank #3994

Closed
dmtrjsg opened this issue Dec 22, 2022 · 3 comments
Closed

Update WG budget proposal details page shows blank #3994

dmtrjsg opened this issue Dec 22, 2022 · 3 comments
Assignees
Labels
bug Something isn't working ephesus

Comments

@dmtrjsg
Copy link
Contributor

dmtrjsg commented Dec 22, 2022

Env: https://dao-git-ephesus-joystream.vercel.app/#/proposals/current

Proposal: https://dao-git-ephesus-joystream.vercel.app/#/proposals/preview/12

Screenshot 2022-12-22 at 16.23.27.png

┆Issue is synchronized with this Asana task by Unito

@dmtrjsg dmtrjsg added bug Something isn't working ephesus labels Dec 22, 2022
@traumschule
Copy link
Contributor

I believe there is a problem when no lead is set. The WG should be hidden from the selection.

ephesus-wg-select

ephesus-leads

However the proposal shows all details: https://dao-git-ephesus-joystream.vercel.app/#/proposals/preview/5
It is rejected as expected since there's no council.

proposal5

@thesan
Copy link
Member

thesan commented Dec 22, 2022

So this comes from the QN returning the update amount as a number. The problem is that the amount is 50000000000000000 which is (one digit) greater than Number.MAX_SAFE_INTEGER as a result the bn.js throws an error.

Try this on https://atlas-next.joystream.org/query-node/server/graphql:

query {
  proposals (where: { details_json: { isTypeOf_eq: "UpdateWorkingGroupBudgetProposalDetails" } }) {
    details {
      ...on UpdateWorkingGroupBudgetProposalDetails { amount }
    }
  }
}

It's potentially a wide spread issue because although Pioneer expects strings since this change all the Float values from @/common/api/schemas/schema.graphql are returned from the QN as number. For stuff like block numbers it's fine (although Int would be more appropriate) but for JOY amount this often might trigger exceptions in bn.js. This is actually the bug that @traumschule reported here: #2327 (comment).

A quick fix here would be to just cast the amount to a string and then to a BN. However it also means a small precision loss.

I don't think this can be fixed long term on the client. @zeeshanakram3, @Lezek123 can you think of an easy fix on the QN for this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ephesus
Projects
None yet
Development

No branches or pull requests

3 participants