@openocean.finance/openocean-sdk 1.7.68 → 1.7.70

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.
@@ -523,6 +523,14 @@ var Swap = /** @class */ (function () {
523
523
  receiverId: t.receiverId,
524
524
  nonceOffset: i + 1,
525
525
  actions: t.functionCalls.map(function (fc) {
526
+ if (fc.methodName === 'transfer') {
527
+ return {
528
+ type: "Transfer",
529
+ params: {
530
+ deposit: wallet_2.utils.format.parseNearAmount(fc.deposit)
531
+ }
532
+ };
533
+ }
526
534
  var actions = wallet_2.functionCall(fc.methodName, fc.args, fc.gas ? fc.gas : '100000000000000',
527
535
  // fc.deposit ? new BN8(fc.deposit) : new BN8('0')
528
536
  fc.deposit ? wallet_2.utils.format.parseNearAmount(fc.deposit) : '0');
@@ -544,6 +552,7 @@ var Swap = /** @class */ (function () {
544
552
  transaction_1 = txResult[txResult.length - 1].transaction || {};
545
553
  }
546
554
  else if (txResult && txResult.length > 1) {
555
+ debugger;
547
556
  transaction_1 = txResult.filter(function (item) {
548
557
  var _a = (item && item.transaction || {}).actions, actions = _a === void 0 ? [] : _a;
549
558
  var _actions = actions.filter(function (fc) {
@@ -556,6 +565,9 @@ var Swap = /** @class */ (function () {
556
565
  if (transaction_1 && transaction_1.length) {
557
566
  transaction_1 = transaction_1[0].transaction;
558
567
  }
568
+ else {
569
+ transaction_1 = txResult[txResult.length - 1].transaction || {};
570
+ }
559
571
  }
560
572
  console.log('signAndSendTransactions', transaction_1);
561
573
  hash = transaction_1.hash;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openocean.finance/openocean-sdk",
3
- "version": "1.7.68",
3
+ "version": "1.7.70",
4
4
  "description": "Openocean sdk",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -28,7 +28,7 @@
28
28
  "@looksrare/sdk": "^0.12.1",
29
29
  "@mysten/sui": "^1.17.0",
30
30
  "@ont-dev/ontology-dapi": "^0.7.3",
31
- "@openocean.finance/wallet": "^1.10.61",
31
+ "@openocean.finance/wallet": "^1.10.62",
32
32
  "@solana/web3.js": "^1.98.0",
33
33
  "@terra-money/terra.js": "^3.1.10",
34
34
  "@uniswap/v2-core": "^1.0.1",