@alephium/web3 0.5.0-rc.21 → 0.5.0-rc.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -60,7 +60,7 @@ function prettifyExactAmount(amount, decimals) {
60
60
  }
61
61
  exports.prettifyExactAmount = prettifyExactAmount;
62
62
  function prettifyNumber(amount, decimals, config) {
63
- const number = typeof amount === 'string' ? amount : toFixedNumber(amount, decimals);
63
+ const number = toFixedNumber(number256ToBigint(amount), decimals);
64
64
  if (!(0, exports.isNumeric)(number)) {
65
65
  return undefined;
66
66
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alephium/web3",
3
- "version": "0.5.0-rc.21",
3
+ "version": "0.5.0-rc.22",
4
4
  "description": "A JS/TS library to interact with the Alephium platform",
5
5
  "license": "GPL",
6
6
  "main": "dist/src/index.js",
@@ -68,7 +68,7 @@ export function prettifyExactAmount(amount: Number256, decimals: number): string
68
68
  }
69
69
 
70
70
  export function prettifyNumber(amount: Number256, decimals: number, config: IPrettifyNumberConfig): string | undefined {
71
- const number = typeof amount === 'string' ? amount : toFixedNumber(amount, decimals)
71
+ const number = toFixedNumber(number256ToBigint(amount), decimals)
72
72
 
73
73
  if (!isNumeric(number)) {
74
74
  return undefined