@aurigami/sdk 1.8.1 → 1.8.3

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
@@ -4691,6 +4691,8 @@ var ReferralRead = /*#__PURE__*/function (_BlockchainEntityRead) {
4691
4691
  case 2:
4692
4692
  result = _context5.sent;
4693
4693
  items = result.items.map(function (item, i) {
4694
+ var _item$transactionHash;
4695
+
4694
4696
  return {
4695
4697
  campaign: item.campaign,
4696
4698
  userAddr: userAddr,
@@ -4698,7 +4700,7 @@ var ReferralRead = /*#__PURE__*/function (_BlockchainEntityRead) {
4698
4700
  rewardTokenAmount: TokenAmount.fromAddressAndAmount(item.token, item.amount),
4699
4701
  startTime: REFERRAL_CAMPAIGNS[item.campaign].start,
4700
4702
  endTime: REFERRAL_CAMPAIGNS[item.campaign].end,
4701
- transactionHash: item == null ? void 0 : item.transactionHash
4703
+ transactionHash: (_item$transactionHash = item.transactionHash) != null ? _item$transactionHash : null
4702
4704
  };
4703
4705
  });
4704
4706
  return _context5.abrupt("return", items);
@@ -5186,7 +5188,7 @@ var SdkReadWrite = /*#__PURE__*/function (_SdkRead) {
5186
5188
  var _proto2 = SdkReadWrite.prototype;
5187
5189
 
5188
5190
  /**
5189
- * Claim PLY reward in all markets + staking pools
5191
+ * Claim rewards in all markets + staking pools
5190
5192
  */
5191
5193
  _proto2.claim =
5192
5194
  /*#__PURE__*/
@@ -5196,15 +5198,9 @@ var SdkReadWrite = /*#__PURE__*/function (_SdkRead) {
5196
5198
  while (1) {
5197
5199
  switch (_context10.prev = _context10.next) {
5198
5200
  case 0:
5199
- _context10.t0 = this.env.comptroller.connect(this._networkConnection.signer);
5200
- _context10.next = 3;
5201
- return this._networkConnection.signer.getAddress();
5201
+ return _context10.abrupt("return", this.env.auriLens.connect(this._networkConnection.signer).claimRewards(this.env.comptroller.address, this.env.auriFairLaunch.address, ALL_STAKING_POOLS));
5202
5202
 
5203
- case 3:
5204
- _context10.t1 = _context10.sent;
5205
- return _context10.abrupt("return", _context10.t0['claimReward(uint8,address)'].call(_context10.t0, 0, _context10.t1));
5206
-
5207
- case 5:
5203
+ case 1:
5208
5204
  case "end":
5209
5205
  return _context10.stop();
5210
5206
  }
@@ -5219,22 +5215,15 @@ var SdkReadWrite = /*#__PURE__*/function (_SdkRead) {
5219
5215
  return claim;
5220
5216
  }();
5221
5217
 
5222
- _proto2.claimLpRewards = /*#__PURE__*/function () {
5223
- var _claimLpRewards = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11() {
5218
+ _proto2.stake = /*#__PURE__*/function () {
5219
+ var _stake = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11(amount) {
5224
5220
  return runtime_1.wrap(function _callee11$(_context11) {
5225
5221
  while (1) {
5226
5222
  switch (_context11.prev = _context11.next) {
5227
5223
  case 0:
5228
- _context11.t0 = this.env.auriFairLaunch.connect(this._networkConnection.signer);
5229
- _context11.next = 3;
5230
- return this._networkConnection.signer.getAddress();
5231
-
5232
- case 3:
5233
- _context11.t1 = _context11.sent;
5234
- _context11.t2 = INF;
5235
- return _context11.abrupt("return", _context11.t0.harvest.call(_context11.t0, _context11.t1, 0, _context11.t2));
5224
+ return _context11.abrupt("return", new StakingReadWrite(this._networkConnection).stake(amount));
5236
5225
 
5237
- case 6:
5226
+ case 1:
5238
5227
  case "end":
5239
5228
  return _context11.stop();
5240
5229
  }
@@ -5242,29 +5231,6 @@ var SdkReadWrite = /*#__PURE__*/function (_SdkRead) {
5242
5231
  }, _callee11, this);
5243
5232
  }));
5244
5233
 
5245
- function claimLpRewards() {
5246
- return _claimLpRewards.apply(this, arguments);
5247
- }
5248
-
5249
- return claimLpRewards;
5250
- }();
5251
-
5252
- _proto2.stake = /*#__PURE__*/function () {
5253
- var _stake = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee12(amount) {
5254
- return runtime_1.wrap(function _callee12$(_context12) {
5255
- while (1) {
5256
- switch (_context12.prev = _context12.next) {
5257
- case 0:
5258
- return _context12.abrupt("return", new StakingReadWrite(this._networkConnection).stake(amount));
5259
-
5260
- case 1:
5261
- case "end":
5262
- return _context12.stop();
5263
- }
5264
- }
5265
- }, _callee12, this);
5266
- }));
5267
-
5268
5234
  function stake(_x9) {
5269
5235
  return _stake.apply(this, arguments);
5270
5236
  }
@@ -5273,19 +5239,19 @@ var SdkReadWrite = /*#__PURE__*/function (_SdkRead) {
5273
5239
  }();
5274
5240
 
5275
5241
  _proto2.unstake = /*#__PURE__*/function () {
5276
- var _unstake = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee13(amount) {
5277
- return runtime_1.wrap(function _callee13$(_context13) {
5242
+ var _unstake = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee12(amount) {
5243
+ return runtime_1.wrap(function _callee12$(_context12) {
5278
5244
  while (1) {
5279
- switch (_context13.prev = _context13.next) {
5245
+ switch (_context12.prev = _context12.next) {
5280
5246
  case 0:
5281
- return _context13.abrupt("return", new StakingReadWrite(this._networkConnection).unstake(amount));
5247
+ return _context12.abrupt("return", new StakingReadWrite(this._networkConnection).unstake(amount));
5282
5248
 
5283
5249
  case 1:
5284
5250
  case "end":
5285
- return _context13.stop();
5251
+ return _context12.stop();
5286
5252
  }
5287
5253
  }
5288
- }, _callee13, this);
5254
+ }, _callee12, this);
5289
5255
  }));
5290
5256
 
5291
5257
  function unstake(_x10) {