@openocean.finance/openocean-sdk 1.6.8 → 1.6.9

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.
@@ -193,7 +193,7 @@ var Swap = /** @class */ (function () {
193
193
  Swap.prototype.sendSolanaTransaction = function () {
194
194
  var _a, _b;
195
195
  return __awaiter(this, void 0, void 0, function () {
196
- var res, transaction, signed, result, bytes, _c, msg, data, bytes, serializedTransaction, blockhashWithExpiryBlockHeight, blockhashInfo, lastValidBlockHeight, transactionResponse, e_1, sdf;
196
+ var res, transaction, signed, result, bytes, _c, msg, data, bytes, serializedTransaction, blockhashWithExpiryBlockHeight, blockhashInfo, lastValidBlockHeight, transactionResponse, e_1;
197
197
  return __generator(this, function (_d) {
198
198
  switch (_d.label) {
199
199
  case 0:
@@ -257,8 +257,8 @@ var Swap = /** @class */ (function () {
257
257
  case 10:
258
258
  lastValidBlockHeight = _d.sent();
259
259
  blockhashWithExpiryBlockHeight = {
260
- blockhash: blockhashInfo.blockhash,
261
- lastValidBlockHeight: lastValidBlockHeight + 150,
260
+ blockhash: transaction._message ? transaction._message.recentBlockhash : blockhashInfo.blockhash,
261
+ lastValidBlockHeight: lastValidBlockHeight + 300,
262
262
  };
263
263
  _d.label = 11;
264
264
  case 11: return [4 /*yield*/, (0, solanaTransactionSender_1.transactionSenderAndConfirmationWaiter)({
@@ -282,8 +282,6 @@ var Swap = /** @class */ (function () {
282
282
  return [3 /*break*/, 14];
283
283
  case 13:
284
284
  e_1 = _d.sent();
285
- sdf = e_1;
286
- debugger;
287
285
  this.errorCallback(e_1.message);
288
286
  return [3 /*break*/, 14];
289
287
  case 14: return [2 /*return*/];
@@ -134,7 +134,7 @@ function transactionSenderAndConfirmationWaiter(_a) {
134
134
  }); }),
135
135
  ];
136
136
  if (blockhashWithExpiryBlockHeight && blockhashWithExpiryBlockHeight.lastValidBlockHeight) {
137
- lastValidBlockHeight = blockhashWithExpiryBlockHeight.lastValidBlockHeight - 150;
137
+ lastValidBlockHeight = blockhashWithExpiryBlockHeight.lastValidBlockHeight - 300;
138
138
  races.push(connection.confirmTransaction(__assign(__assign({}, blockhashWithExpiryBlockHeight), { lastValidBlockHeight: lastValidBlockHeight, signature: txid, abortSignal: abortSignal }), "confirmed"));
139
139
  }
140
140
  // this would throw TransactionExpiredBlockheightExceededError
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openocean.finance/openocean-sdk",
3
- "version": "1.6.8",
3
+ "version": "1.6.9",
4
4
  "description": "Openocean sdk",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -49,7 +49,7 @@
49
49
  "dependencies": {
50
50
  "@ethersproject/bignumber": "^5.1.1",
51
51
  "@looksrare/sdk": "^0.12.1",
52
- "@openocean.finance/wallet": "^1.9.4",
52
+ "@openocean.finance/wallet": "^1.9.5",
53
53
  "@uniswap/v2-core": "^1.0.1",
54
54
  "@walletconnect/web3-provider": "^1.7.8",
55
55
  "aptos": "^1.3.17",