@aurigami/sdk 1.8.2 → 1.8.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.esm.js CHANGED
@@ -161,6 +161,24 @@ var REFERRAL_CAMPAIGNS = /*#__PURE__*/Object.fromEntries([['referral-2505', {
161
161
  }], ['referrer-2505', {
162
162
  start: 1652882400,
163
163
  end: 1653487199
164
+ }], ['referral-0106', {
165
+ start: 1653487200,
166
+ end: 1654091999
167
+ }], ['referrer-0106', {
168
+ start: 1653487200,
169
+ end: 1654091999
170
+ }], ['referral-0806', {
171
+ start: 1654092000,
172
+ end: 1654696799
173
+ }], ['referrer-0806', {
174
+ start: 1654092000,
175
+ end: 1654696799
176
+ }], ['referral-1506', {
177
+ start: 1654696800,
178
+ end: 1655301599
179
+ }], ['referrer-1506', {
180
+ start: 1654696800,
181
+ end: 1655301599
164
182
  }]]);
165
183
 
166
184
  var decimalRecords = {
@@ -4435,7 +4453,7 @@ var MiscRead = /*#__PURE__*/function (_BlockchainEntityRead) {
4435
4453
  balR = new BigNumber(bal.toString()).dividedBy(_1E18.toString());
4436
4454
  borR = new BigNumber(bor.toString()).dividedBy(_1E18.toString());
4437
4455
 
4438
- if (!(balR.lt(dust) || borR.lt(dust))) {
4456
+ if (!(balR.lt(dust) && borR.lt(dust))) {
4439
4457
  _context5.next = 26;
4440
4458
  break;
4441
4459
  }
@@ -5188,7 +5206,7 @@ var SdkReadWrite = /*#__PURE__*/function (_SdkRead) {
5188
5206
  var _proto2 = SdkReadWrite.prototype;
5189
5207
 
5190
5208
  /**
5191
- * Claim PLY reward in all markets + staking pools
5209
+ * Claim rewards in all markets + staking pools
5192
5210
  */
5193
5211
  _proto2.claim =
5194
5212
  /*#__PURE__*/
@@ -5198,15 +5216,9 @@ var SdkReadWrite = /*#__PURE__*/function (_SdkRead) {
5198
5216
  while (1) {
5199
5217
  switch (_context10.prev = _context10.next) {
5200
5218
  case 0:
5201
- _context10.t0 = this.env.comptroller.connect(this._networkConnection.signer);
5202
- _context10.next = 3;
5203
- return this._networkConnection.signer.getAddress();
5204
-
5205
- case 3:
5206
- _context10.t1 = _context10.sent;
5207
- return _context10.abrupt("return", _context10.t0['claimReward(uint8,address)'].call(_context10.t0, 0, _context10.t1));
5219
+ return _context10.abrupt("return", this.env.auriLens.connect(this._networkConnection.signer).claimRewards(this.env.comptroller.address, this.env.auriFairLaunch.address, ALL_STAKING_POOLS));
5208
5220
 
5209
- case 5:
5221
+ case 1:
5210
5222
  case "end":
5211
5223
  return _context10.stop();
5212
5224
  }
@@ -5221,22 +5233,15 @@ var SdkReadWrite = /*#__PURE__*/function (_SdkRead) {
5221
5233
  return claim;
5222
5234
  }();
5223
5235
 
5224
- _proto2.claimLpRewards = /*#__PURE__*/function () {
5225
- var _claimLpRewards = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11() {
5236
+ _proto2.stake = /*#__PURE__*/function () {
5237
+ var _stake = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11(amount) {
5226
5238
  return runtime_1.wrap(function _callee11$(_context11) {
5227
5239
  while (1) {
5228
5240
  switch (_context11.prev = _context11.next) {
5229
5241
  case 0:
5230
- _context11.t0 = this.env.auriFairLaunch.connect(this._networkConnection.signer);
5231
- _context11.next = 3;
5232
- return this._networkConnection.signer.getAddress();
5242
+ return _context11.abrupt("return", new StakingReadWrite(this._networkConnection).stake(amount));
5233
5243
 
5234
- case 3:
5235
- _context11.t1 = _context11.sent;
5236
- _context11.t2 = INF;
5237
- return _context11.abrupt("return", _context11.t0.harvest.call(_context11.t0, _context11.t1, 0, _context11.t2));
5238
-
5239
- case 6:
5244
+ case 1:
5240
5245
  case "end":
5241
5246
  return _context11.stop();
5242
5247
  }
@@ -5244,29 +5249,6 @@ var SdkReadWrite = /*#__PURE__*/function (_SdkRead) {
5244
5249
  }, _callee11, this);
5245
5250
  }));
5246
5251
 
5247
- function claimLpRewards() {
5248
- return _claimLpRewards.apply(this, arguments);
5249
- }
5250
-
5251
- return claimLpRewards;
5252
- }();
5253
-
5254
- _proto2.stake = /*#__PURE__*/function () {
5255
- var _stake = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee12(amount) {
5256
- return runtime_1.wrap(function _callee12$(_context12) {
5257
- while (1) {
5258
- switch (_context12.prev = _context12.next) {
5259
- case 0:
5260
- return _context12.abrupt("return", new StakingReadWrite(this._networkConnection).stake(amount));
5261
-
5262
- case 1:
5263
- case "end":
5264
- return _context12.stop();
5265
- }
5266
- }
5267
- }, _callee12, this);
5268
- }));
5269
-
5270
5252
  function stake(_x9) {
5271
5253
  return _stake.apply(this, arguments);
5272
5254
  }
@@ -5275,19 +5257,19 @@ var SdkReadWrite = /*#__PURE__*/function (_SdkRead) {
5275
5257
  }();
5276
5258
 
5277
5259
  _proto2.unstake = /*#__PURE__*/function () {
5278
- var _unstake = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee13(amount) {
5279
- return runtime_1.wrap(function _callee13$(_context13) {
5260
+ var _unstake = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee12(amount) {
5261
+ return runtime_1.wrap(function _callee12$(_context12) {
5280
5262
  while (1) {
5281
- switch (_context13.prev = _context13.next) {
5263
+ switch (_context12.prev = _context12.next) {
5282
5264
  case 0:
5283
- return _context13.abrupt("return", new StakingReadWrite(this._networkConnection).unstake(amount));
5265
+ return _context12.abrupt("return", new StakingReadWrite(this._networkConnection).unstake(amount));
5284
5266
 
5285
5267
  case 1:
5286
5268
  case "end":
5287
- return _context13.stop();
5269
+ return _context12.stop();
5288
5270
  }
5289
5271
  }
5290
- }, _callee13, this);
5272
+ }, _callee12, this);
5291
5273
  }));
5292
5274
 
5293
5275
  function unstake(_x10) {