@aurigami/sdk 1.9.3 → 1.9.4
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.d.ts +1 -1
- package/dist/interactors/misc.d.ts +1 -1
- package/dist/sdk.cjs.development.js +18 -11
- 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 +18 -11
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/SDK.ts +3 -2
- package/src/interactors/misc.ts +3 -3
package/dist/SDK.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export declare class SdkRead extends BlockchainEntityRead {
|
|
|
37
37
|
*/
|
|
38
38
|
getPlyCirculatingSupply(): Promise<TokenAmount>;
|
|
39
39
|
getUtilisation(userAddr: types.Address): Promise<BigNumber>;
|
|
40
|
-
sneakAccounts(accounts: string[], tokenAddresses: string[]): Promise<types.AccountAuTokensInfo[]>;
|
|
40
|
+
sneakAccounts(accounts: string[], tokenAddresses: string[], dust?: BigNumber): Promise<types.AccountAuTokensInfo[]>;
|
|
41
41
|
}
|
|
42
42
|
export declare class SdkReadWrite extends SdkRead {
|
|
43
43
|
/**
|
|
@@ -25,5 +25,5 @@ export declare class MiscRead extends BlockchainEntityRead {
|
|
|
25
25
|
*/
|
|
26
26
|
getPlyCirculatingSupply(): Promise<TokenAmount>;
|
|
27
27
|
getUtilisation(userAddr: types.Address): Promise<BigNumber>;
|
|
28
|
-
sneakAccounts(accounts: string[], tokenAddresses: string[]): Promise<types.AccountAuTokensInfo[]>;
|
|
28
|
+
sneakAccounts(accounts: string[], tokenAddresses: string[], dust?: BigNumber): Promise<types.AccountAuTokensInfo[]>;
|
|
29
29
|
}
|
|
@@ -4466,17 +4466,20 @@ var MiscRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
4466
4466
|
}();
|
|
4467
4467
|
|
|
4468
4468
|
_proto.sneakAccounts = /*#__PURE__*/function () {
|
|
4469
|
-
var _sneakAccounts = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5(accounts, tokenAddresses) {
|
|
4469
|
+
var _sneakAccounts = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5(accounts, tokenAddresses, dust) {
|
|
4470
4470
|
var _this3 = this;
|
|
4471
4471
|
|
|
4472
|
-
var _1E18,
|
|
4472
|
+
var _1E18, oracle, tokens, prices, exrate, res, _iterator2, _step2, addr, infos, _i, snapshot, bal, bor, balR, borR;
|
|
4473
4473
|
|
|
4474
4474
|
return runtime_1.wrap(function _callee5$(_context5) {
|
|
4475
4475
|
while (1) {
|
|
4476
4476
|
switch (_context5.prev = _context5.next) {
|
|
4477
4477
|
case 0:
|
|
4478
|
+
if (dust === void 0) {
|
|
4479
|
+
dust = /*#__PURE__*/new BigNumber(0.1);
|
|
4480
|
+
}
|
|
4481
|
+
|
|
4478
4482
|
_1E18 = ethers.BigNumber.from(10).pow(18);
|
|
4479
|
-
dust = new BigNumber(0.1);
|
|
4480
4483
|
oracle = this.env.getContract(networkAddresses.misc.oracle, AuriOracleABI.abi);
|
|
4481
4484
|
tokens = tokenAddresses.map(function (addr) {
|
|
4482
4485
|
return _this3.env.getContract(addr, abis$5.abi);
|
|
@@ -4520,7 +4523,7 @@ var MiscRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
4520
4523
|
balR = new BigNumber(bal.toString()).dividedBy(_1E18.toString());
|
|
4521
4524
|
borR = new BigNumber(bor.toString()).dividedBy(_1E18.toString());
|
|
4522
4525
|
|
|
4523
|
-
if (!(balR.
|
|
4526
|
+
if (!(balR.lte(dust) && borR.lte(dust))) {
|
|
4524
4527
|
_context5.next = 26;
|
|
4525
4528
|
break;
|
|
4526
4529
|
}
|
|
@@ -4560,7 +4563,7 @@ var MiscRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
4560
4563
|
}, _callee5, this);
|
|
4561
4564
|
}));
|
|
4562
4565
|
|
|
4563
|
-
function sneakAccounts(_x4, _x5) {
|
|
4566
|
+
function sneakAccounts(_x4, _x5, _x6) {
|
|
4564
4567
|
return _sneakAccounts.apply(this, arguments);
|
|
4565
4568
|
}
|
|
4566
4569
|
|
|
@@ -5239,14 +5242,18 @@ var SdkRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
5239
5242
|
}();
|
|
5240
5243
|
|
|
5241
5244
|
_proto.sneakAccounts = /*#__PURE__*/function () {
|
|
5242
|
-
var _sneakAccounts = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee9(accounts, tokenAddresses) {
|
|
5245
|
+
var _sneakAccounts = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee9(accounts, tokenAddresses, dust) {
|
|
5243
5246
|
return runtime_1.wrap(function _callee9$(_context9) {
|
|
5244
5247
|
while (1) {
|
|
5245
5248
|
switch (_context9.prev = _context9.next) {
|
|
5246
5249
|
case 0:
|
|
5247
|
-
|
|
5250
|
+
if (dust === void 0) {
|
|
5251
|
+
dust = /*#__PURE__*/new BigNumber(0.1);
|
|
5252
|
+
}
|
|
5248
5253
|
|
|
5249
|
-
|
|
5254
|
+
return _context9.abrupt("return", this._misc.sneakAccounts(accounts, tokenAddresses, dust));
|
|
5255
|
+
|
|
5256
|
+
case 2:
|
|
5250
5257
|
case "end":
|
|
5251
5258
|
return _context9.stop();
|
|
5252
5259
|
}
|
|
@@ -5254,7 +5261,7 @@ var SdkRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
5254
5261
|
}, _callee9, this);
|
|
5255
5262
|
}));
|
|
5256
5263
|
|
|
5257
|
-
function sneakAccounts(_x7, _x8) {
|
|
5264
|
+
function sneakAccounts(_x7, _x8, _x9) {
|
|
5258
5265
|
return _sneakAccounts.apply(this, arguments);
|
|
5259
5266
|
}
|
|
5260
5267
|
|
|
@@ -5316,7 +5323,7 @@ var SdkReadWrite = /*#__PURE__*/function (_SdkRead) {
|
|
|
5316
5323
|
}, _callee11, this);
|
|
5317
5324
|
}));
|
|
5318
5325
|
|
|
5319
|
-
function stake(
|
|
5326
|
+
function stake(_x10) {
|
|
5320
5327
|
return _stake.apply(this, arguments);
|
|
5321
5328
|
}
|
|
5322
5329
|
|
|
@@ -5339,7 +5346,7 @@ var SdkReadWrite = /*#__PURE__*/function (_SdkRead) {
|
|
|
5339
5346
|
}, _callee12, this);
|
|
5340
5347
|
}));
|
|
5341
5348
|
|
|
5342
|
-
function unstake(
|
|
5349
|
+
function unstake(_x11) {
|
|
5343
5350
|
return _unstake.apply(this, arguments);
|
|
5344
5351
|
}
|
|
5345
5352
|
|