@injectivelabs/wallet-magic 1.20.64 → 1.20.65
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/dist/cjs/index.cjs +1 -14
- package/dist/esm/index.js +2 -15
- package/package.json +5 -5
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
let magic_sdk = require("magic-sdk");
|
|
2
2
|
let __magic_ext_oauth2 = require("@magic-ext/oauth2");
|
|
3
3
|
let __magic_ext_cosmos = require("@magic-ext/cosmos");
|
|
4
|
-
let __injectivelabs_sdk_ts_core_tx = require("@injectivelabs/sdk-ts/core/tx");
|
|
5
4
|
let __injectivelabs_sdk_ts_utils = require("@injectivelabs/sdk-ts/utils");
|
|
6
5
|
let __injectivelabs_wallet_base = require("@injectivelabs/wallet-base");
|
|
7
6
|
let __injectivelabs_exceptions = require("@injectivelabs/exceptions");
|
|
@@ -123,19 +122,7 @@ var Magic = class extends __injectivelabs_wallet_base.BaseConcreteStrategy {
|
|
|
123
122
|
});
|
|
124
123
|
}
|
|
125
124
|
async sendTransaction(transaction, options) {
|
|
126
|
-
|
|
127
|
-
if (!endpoints) throw new __injectivelabs_exceptions.WalletException(/* @__PURE__ */ new Error("You have to pass endpoints.grpc within the options for using Magic wallet"));
|
|
128
|
-
const response = await new __injectivelabs_sdk_ts_core_tx.TxGrpcApi(endpoints.grpc).broadcast(transaction, {
|
|
129
|
-
txTimeout,
|
|
130
|
-
...txInclusion,
|
|
131
|
-
onBroadcast
|
|
132
|
-
});
|
|
133
|
-
if (response.code !== 0) throw new __injectivelabs_exceptions.TransactionException(new Error(response.rawLog), {
|
|
134
|
-
code: __injectivelabs_exceptions.UnspecifiedErrorCode,
|
|
135
|
-
contextCode: response.code,
|
|
136
|
-
contextModule: response.codespace
|
|
137
|
-
});
|
|
138
|
-
return response;
|
|
125
|
+
return (0, __injectivelabs_wallet_base.broadcastTxRaw)(transaction, options);
|
|
139
126
|
}
|
|
140
127
|
async signEip712TypedData(eip712json, _address) {
|
|
141
128
|
return `0x${await (await this.getMagicWallet()).cosmos.signTypedData(eip712json)}`;
|
package/dist/esm/index.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Magic as Magic$1 } from "magic-sdk";
|
|
2
2
|
import { OAuthExtension } from "@magic-ext/oauth2";
|
|
3
3
|
import { CosmosExtension } from "@magic-ext/cosmos";
|
|
4
|
-
import { TxGrpcApi } from "@injectivelabs/sdk-ts/core/tx";
|
|
5
4
|
import { stringToUint8Array, uint8ArrayToHex } from "@injectivelabs/sdk-ts/utils";
|
|
6
|
-
import { BaseConcreteStrategy, MagicProvider, WalletAction, WalletDeviceType } from "@injectivelabs/wallet-base";
|
|
5
|
+
import { BaseConcreteStrategy, MagicProvider, WalletAction, WalletDeviceType, broadcastTxRaw } from "@injectivelabs/wallet-base";
|
|
7
6
|
import { CosmosWalletException, ErrorType, TransactionException, UnspecifiedErrorCode, WalletException } from "@injectivelabs/exceptions";
|
|
8
7
|
|
|
9
8
|
//#region \0@oxc-project+runtime@0.99.0/helpers/typeof.js
|
|
@@ -123,19 +122,7 @@ var Magic = class extends BaseConcreteStrategy {
|
|
|
123
122
|
});
|
|
124
123
|
}
|
|
125
124
|
async sendTransaction(transaction, options) {
|
|
126
|
-
|
|
127
|
-
if (!endpoints) throw new WalletException(/* @__PURE__ */ new Error("You have to pass endpoints.grpc within the options for using Magic wallet"));
|
|
128
|
-
const response = await new TxGrpcApi(endpoints.grpc).broadcast(transaction, {
|
|
129
|
-
txTimeout,
|
|
130
|
-
...txInclusion,
|
|
131
|
-
onBroadcast
|
|
132
|
-
});
|
|
133
|
-
if (response.code !== 0) throw new TransactionException(new Error(response.rawLog), {
|
|
134
|
-
code: UnspecifiedErrorCode,
|
|
135
|
-
contextCode: response.code,
|
|
136
|
-
contextModule: response.codespace
|
|
137
|
-
});
|
|
138
|
-
return response;
|
|
125
|
+
return broadcastTxRaw(transaction, options);
|
|
139
126
|
}
|
|
140
127
|
async signEip712TypedData(eip712json, _address) {
|
|
141
128
|
return `0x${await (await this.getMagicWallet()).cosmos.signTypedData(eip712json)}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@injectivelabs/wallet-magic",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.65",
|
|
4
4
|
"description": "Magic wallet strategy for use with @injectivelabs/wallet-core.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"@magic-ext/cosmos": "^26.2.0",
|
|
46
46
|
"@magic-ext/oauth2": "^13.2.0",
|
|
47
47
|
"magic-sdk": "^31.2.0",
|
|
48
|
-
"@injectivelabs/
|
|
49
|
-
"@injectivelabs/
|
|
50
|
-
"@injectivelabs/ts-types": "1.20.
|
|
51
|
-
"@injectivelabs/wallet-base": "1.20.
|
|
48
|
+
"@injectivelabs/sdk-ts": "1.20.65",
|
|
49
|
+
"@injectivelabs/exceptions": "1.20.65",
|
|
50
|
+
"@injectivelabs/ts-types": "1.20.65",
|
|
51
|
+
"@injectivelabs/wallet-base": "1.20.65"
|
|
52
52
|
},
|
|
53
53
|
"publishConfig": {
|
|
54
54
|
"access": "public"
|