@openocean.finance/openocean-sdk 1.7.24 → 1.7.26
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/lib/swapSdk/Swap.js +8 -3
- package/package.json +1 -1
package/lib/swapSdk/Swap.js
CHANGED
|
@@ -278,16 +278,20 @@ var Swap = /** @class */ (function () {
|
|
|
278
278
|
};
|
|
279
279
|
Swap.prototype.sendSuiTransaction = function () {
|
|
280
280
|
return __awaiter(this, void 0, void 0, function () {
|
|
281
|
-
var transaction,
|
|
281
|
+
var transaction, tx, signature, e_2;
|
|
282
282
|
return __generator(this, function (_a) {
|
|
283
283
|
switch (_a.label) {
|
|
284
284
|
case 0:
|
|
285
285
|
_a.trys.push([0, 2, , 3]);
|
|
286
286
|
transaction = this.res.transaction;
|
|
287
287
|
console.log('sendSuiTransaction 1', transaction, this.res);
|
|
288
|
-
|
|
288
|
+
tx = transactions_1.Transaction.from(transaction);
|
|
289
289
|
return [4 /*yield*/, this.wallet.sdk.features['sui:signAndExecuteTransaction']
|
|
290
|
-
.signAndExecuteTransaction({
|
|
290
|
+
.signAndExecuteTransaction({
|
|
291
|
+
transaction: tx,
|
|
292
|
+
account: this.wallet.sdk.accounts[0],
|
|
293
|
+
chain: 'sui:mainnet',
|
|
294
|
+
})];
|
|
291
295
|
case 1:
|
|
292
296
|
signature = _a.sent();
|
|
293
297
|
console.log('sendSuiTransaction 2', signature);
|
|
@@ -295,6 +299,7 @@ var Swap = /** @class */ (function () {
|
|
|
295
299
|
return [3 /*break*/, 3];
|
|
296
300
|
case 2:
|
|
297
301
|
e_2 = _a.sent();
|
|
302
|
+
console.log('sendSuiTransaction 3', e_2);
|
|
298
303
|
this.errorCallback(e_2.message);
|
|
299
304
|
return [3 /*break*/, 3];
|
|
300
305
|
case 3: return [2 /*return*/];
|