@openocean.finance/openocean-sdk 1.6.7 → 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.
@@ -250,15 +250,15 @@ var Swap = /** @class */ (function () {
250
250
  lastValidBlockHeight: res.lastValidBlockHeight,
251
251
  };
252
252
  return [3 /*break*/, 11];
253
- case 8: return [4 /*yield*/, this.wallet.connection.wallet.connection.getRecentBlockhash()];
253
+ case 8: return [4 /*yield*/, this.wallet.connection.getRecentBlockhash()];
254
254
  case 9:
255
255
  blockhashInfo = _d.sent();
256
256
  return [4 /*yield*/, this.wallet.connection.getBlockHeight()];
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)({
@@ -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.7",
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",