@aurigami/sdk 1.8.5 → 1.8.6

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.
package/dist/sdk.esm.js CHANGED
@@ -1642,8 +1642,8 @@ var TokenAmount = /*#__PURE__*/function () {
1642
1642
  var _proto = TokenAmount.prototype;
1643
1643
 
1644
1644
  _proto.formattedAmount = function formattedAmount(decimal, fmt) {
1645
- if (decimal && fmt) {
1646
- return new BigNumber(this.rawAmnt).div(decimalFactor(decimal)).toFormat(decimal, fmt);
1645
+ if (decimal !== undefined && fmt !== undefined) {
1646
+ return new BigNumber(this.rawAmnt).div(decimalFactor(this.token.decimals)).toFormat(decimal, fmt);
1647
1647
  }
1648
1648
 
1649
1649
  return new BigNumber(this.rawAmnt).div(decimalFactor(this.token.decimals)).toString();