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: Joystream/pioneer#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 ?
Originally posted by @thesan in Joystream/pioneer#3994 (comment)
So this comes from the QN returning the update amount as a
number. The problem is that the amount is50000000000000000which is (one digit) greater thanNumber.MAX_SAFE_INTEGERas a result thebn.jsthrows an error.Try this on https://atlas-next.joystream.org/query-node/server/graphql:
It's potentially a wide spread issue because although Pioneer expects strings since this change all the
Floatvalues from@/common/api/schemas/schema.graphqlare returned from the QN asnumber. For stuff like block numbers it's fine (althoughIntwould be more appropriate) but for JOY amount this often might trigger exceptions inbn.js. This is actually the bug that @traumschule reported here: Joystream/pioneer#2327 (comment).A quick fix here would be to just cast the amount to a
stringand then to aBN. 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 ?
Originally posted by @thesan in Joystream/pioneer#3994 (comment)