@aurigami/sdk 1.8.3 → 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/entities/tokenAmount.d.ts +3 -2
- package/dist/sdk.cjs.development.js +26 -4
- 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 +26 -4
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/consts/constants.ts +6 -0
- package/src/contracts/misc.ts +1 -1
- package/src/entities/tokenAmount.ts +7 -3
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
|
1
2
|
import { Address } from '../types';
|
|
2
3
|
import { Token } from './token';
|
|
3
4
|
export declare class TokenAmount {
|
|
4
5
|
readonly token: Token;
|
|
5
6
|
private rawAmnt;
|
|
6
7
|
constructor(token: Token, amount: string, isRaw?: boolean);
|
|
7
|
-
formattedAmount(): string;
|
|
8
|
-
formattedAmountWithSymbol(): string;
|
|
8
|
+
formattedAmount(decimal?: number, fmt?: BigNumber.Format): string;
|
|
9
|
+
formattedAmountWithSymbol(decimal?: number, fmt?: BigNumber.Format): string;
|
|
9
10
|
rawAmount(): string;
|
|
10
11
|
compare(other: TokenAmount): number;
|
|
11
12
|
static fromAddressAndAmount(tokenAddress: Address, amount: string, isRaw?: boolean): TokenAmount;
|
|
@@ -166,6 +166,24 @@ var REFERRAL_CAMPAIGNS = /*#__PURE__*/Object.fromEntries([['referral-2505', {
|
|
|
166
166
|
}], ['referrer-2505', {
|
|
167
167
|
start: 1652882400,
|
|
168
168
|
end: 1653487199
|
|
169
|
+
}], ['referral-0106', {
|
|
170
|
+
start: 1653487200,
|
|
171
|
+
end: 1654091999
|
|
172
|
+
}], ['referrer-0106', {
|
|
173
|
+
start: 1653487200,
|
|
174
|
+
end: 1654091999
|
|
175
|
+
}], ['referral-0806', {
|
|
176
|
+
start: 1654092000,
|
|
177
|
+
end: 1654696799
|
|
178
|
+
}], ['referrer-0806', {
|
|
179
|
+
start: 1654092000,
|
|
180
|
+
end: 1654696799
|
|
181
|
+
}], ['referral-1506', {
|
|
182
|
+
start: 1654696800,
|
|
183
|
+
end: 1655301599
|
|
184
|
+
}], ['referrer-1506', {
|
|
185
|
+
start: 1654696800,
|
|
186
|
+
end: 1655301599
|
|
169
187
|
}]]);
|
|
170
188
|
|
|
171
189
|
var decimalRecords = {
|
|
@@ -1628,12 +1646,16 @@ var TokenAmount = /*#__PURE__*/function () {
|
|
|
1628
1646
|
|
|
1629
1647
|
var _proto = TokenAmount.prototype;
|
|
1630
1648
|
|
|
1631
|
-
_proto.formattedAmount = function formattedAmount() {
|
|
1649
|
+
_proto.formattedAmount = function formattedAmount(decimal, fmt) {
|
|
1650
|
+
if (decimal && fmt) {
|
|
1651
|
+
return new BigNumber(this.rawAmnt).div(decimalFactor(decimal)).toFormat(decimal, fmt);
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1632
1654
|
return new BigNumber(this.rawAmnt).div(decimalFactor(this.token.decimals)).toString();
|
|
1633
1655
|
};
|
|
1634
1656
|
|
|
1635
|
-
_proto.formattedAmountWithSymbol = function formattedAmountWithSymbol() {
|
|
1636
|
-
return this.formattedAmount() + " " + getSymbol(this.token.address);
|
|
1657
|
+
_proto.formattedAmountWithSymbol = function formattedAmountWithSymbol(decimal, fmt) {
|
|
1658
|
+
return this.formattedAmount(decimal, fmt) + " " + getSymbol(this.token.address);
|
|
1637
1659
|
};
|
|
1638
1660
|
|
|
1639
1661
|
_proto.rawAmount = function rawAmount() {
|
|
@@ -4436,7 +4458,7 @@ var MiscRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
4436
4458
|
balR = new BigNumber(bal.toString()).dividedBy(_1E18.toString());
|
|
4437
4459
|
borR = new BigNumber(bor.toString()).dividedBy(_1E18.toString());
|
|
4438
4460
|
|
|
4439
|
-
if (!(balR.lt(dust)
|
|
4461
|
+
if (!(balR.lt(dust) && borR.lt(dust))) {
|
|
4440
4462
|
_context5.next = 26;
|
|
4441
4463
|
break;
|
|
4442
4464
|
}
|