@aurigami/sdk 1.8.4 → 1.8.5

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
@@ -1641,12 +1641,16 @@ var TokenAmount = /*#__PURE__*/function () {
1641
1641
 
1642
1642
  var _proto = TokenAmount.prototype;
1643
1643
 
1644
- _proto.formattedAmount = function formattedAmount() {
1644
+ _proto.formattedAmount = function formattedAmount(decimal, fmt) {
1645
+ if (decimal && fmt) {
1646
+ return new BigNumber(this.rawAmnt).div(decimalFactor(decimal)).toFormat(decimal, fmt);
1647
+ }
1648
+
1645
1649
  return new BigNumber(this.rawAmnt).div(decimalFactor(this.token.decimals)).toString();
1646
1650
  };
1647
1651
 
1648
- _proto.formattedAmountWithSymbol = function formattedAmountWithSymbol() {
1649
- return this.formattedAmount() + " " + getSymbol(this.token.address);
1652
+ _proto.formattedAmountWithSymbol = function formattedAmountWithSymbol(decimal, fmt) {
1653
+ return this.formattedAmount(decimal, fmt) + " " + getSymbol(this.token.address);
1650
1654
  };
1651
1655
 
1652
1656
  _proto.rawAmount = function rawAmount() {