@openocean.finance/openocean-sdk 1.3.18 → 1.4.0
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 +14 -11
- package/package.json +2 -2
package/lib/swapSdk/Swap.js
CHANGED
|
@@ -191,7 +191,7 @@ var Swap = /** @class */ (function () {
|
|
|
191
191
|
};
|
|
192
192
|
Swap.prototype.sendSolanaTransaction = function () {
|
|
193
193
|
return __awaiter(this, void 0, void 0, function () {
|
|
194
|
-
var res, transaction, signed,
|
|
194
|
+
var res, transaction, signed, result, bytes, _a, msg, data, bytes, connection, txId, e_1;
|
|
195
195
|
return __generator(this, function (_b) {
|
|
196
196
|
switch (_b.label) {
|
|
197
197
|
case 0:
|
|
@@ -207,7 +207,6 @@ var Swap = /** @class */ (function () {
|
|
|
207
207
|
transaction = web3_js_1.Transaction.from(Buffer.from(res.transaction, "hex"));
|
|
208
208
|
}
|
|
209
209
|
signed = null;
|
|
210
|
-
signature = null;
|
|
211
210
|
if (!this.wallet.sdk.isCoin98) return [3 /*break*/, 3];
|
|
212
211
|
return [4 /*yield*/, this.wallet.sdk.request({
|
|
213
212
|
method: "sol_sign",
|
|
@@ -237,17 +236,21 @@ var Swap = /** @class */ (function () {
|
|
|
237
236
|
case 6:
|
|
238
237
|
signed = _b.sent();
|
|
239
238
|
_b.label = 7;
|
|
240
|
-
case 7:
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
239
|
+
case 7:
|
|
240
|
+
connection = new web3_js_1.Connection("https://solana-mainnet.rpc.grove.city/v1/77cfcdf5");
|
|
241
|
+
return [4 /*yield*/, connection.sendRawTransaction(
|
|
242
|
+
// let txId = await this.wallet.connection.sendRawTransaction(
|
|
243
|
+
signed.serialize({
|
|
244
|
+
verifySignatures: false,
|
|
245
|
+
requireAllSignatures: false
|
|
246
|
+
}), {
|
|
247
|
+
skipPreflight: true,
|
|
248
|
+
preflightCommitment: "confirmed",
|
|
249
|
+
})];
|
|
247
250
|
case 8:
|
|
248
|
-
|
|
251
|
+
txId = _b.sent();
|
|
249
252
|
// this.receiptCallback(signature)
|
|
250
|
-
this.transactionHashCallback(
|
|
253
|
+
this.transactionHashCallback(txId);
|
|
251
254
|
return [3 /*break*/, 10];
|
|
252
255
|
case 9:
|
|
253
256
|
e_1 = _b.sent();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openocean.finance/openocean-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Openocean sdk",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@ethersproject/bignumber": "^5.1.1",
|
|
50
50
|
"@looksrare/sdk": "^0.12.1",
|
|
51
|
-
"@openocean.finance/wallet": "^1.
|
|
51
|
+
"@openocean.finance/wallet": "^1.7.0",
|
|
52
52
|
"@uniswap/v2-core": "^1.0.1",
|
|
53
53
|
"@walletconnect/web3-provider": "^1.7.8",
|
|
54
54
|
"aptos": "^1.3.17",
|