Skip to content

Commit

Permalink
Fix NFT transfer with big token id (#4636)
Browse files Browse the repository at this point in the history
  • Loading branch information
wdv4758h authored Jul 28, 2022
1 parent 0fba3f3 commit 3e542b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/util/number/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -735,5 +735,5 @@ export const toHexadecimal = (decimal) => {
decimal = String(decimal);
}
if (decimal.startsWith('0x')) return decimal;
return parseInt(decimal, 10).toString(16);
return toBigNumber.dec(decimal).toString(16);
};
3 changes: 3 additions & 0 deletions app/util/number/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,9 @@ describe('toHexadecimal', () => {
expect(toHexadecimal(2)).toEqual('2');
expect(toHexadecimal()).toEqual(undefined);
expect(toHexadecimal(1232)).toEqual('4d0');
expect(
toHexadecimal('123456789012345678901234567890123456789012345678'),
).toEqual('159ffe6f22fd5cc42c524df6fd5e28d0de38f34e');
});
});

Expand Down

0 comments on commit 3e542b8

Please sign in to comment.