@aurigami/sdk 1.8.4 → 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/entities/tokenAmount.d.ts +3 -2
- package/dist/sdk.cjs.development.js +7 -3
- package/dist/sdk.cjs.development.js.map +1 -1
- package/dist/sdk.cjs.production.min.js +1 -1
- package/dist/sdk.cjs.production.min.js.map +1 -1
- package/dist/sdk.esm.js +7 -3
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/entities/tokenAmount.ts +9 -3
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 !== undefined && fmt !== undefined) {
|
|
1646
|
+
return new BigNumber(this.rawAmnt).div(decimalFactor(this.token.decimals)).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() {
|