Skip to content

Commit

Permalink
Merge pull request #3704 from Emurgo/ruslan/deserialization-fix
Browse files Browse the repository at this point in the history
deserialization fix
  • Loading branch information
vsubhuman authored Oct 20, 2024
2 parents bc1aa78 + ef6d5a1 commit 450bd41
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 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
4 changes: 2 additions & 2 deletions packages/yoroi-extension/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/yoroi-extension/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yoroi",
"version": "5.4.210",
"version": "5.4.220",
"description": "Cardano ADA wallet",
"scripts": {
"dev-mv2": "rimraf dev/ && NODE_OPTIONS=--openssl-legacy-provider babel-node scripts-mv2/build --type=debug --env 'mainnet'",
Expand Down

0 comments on commit 450bd41

Please sign in to comment.