Skip to content

Commit

Permalink
deserialization fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vsubhuman committed Oct 20, 2024
1 parent 59b4c63 commit 20403aa
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions packages/yoroi-extension/app/api/common/lib/MultiToken.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,19 @@ export class MultiToken {
|}): MultiToken {
try {
return new MultiToken(
multiTokenData.values.map(({ identifier, networkId, amount }) => ({
identifier,
networkId,
// $FlowIgnore
amount: new BigNumber({ ...amount, _isBigNumber: true }),
})),
multiTokenData.values.map(({ identifier, networkId, amount }) => {
const fixedAmount = new BigNumber(
typeof amount === 'object'
? { ...amount, _isBigNumber: true }
: amount
);
return ({
identifier,
networkId,
// $FlowIgnore
amount: fixedAmount,
});
}),
multiTokenData.defaults
);
} catch (e) {
Expand Down

0 comments on commit 20403aa

Please sign in to comment.