@injectivelabs/wallet-cosmostation 1.20.6 → 1.20.8
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 +5 -1
- package/dist/cjs/index.d.cts +2 -5
- package/dist/esm/index.d.ts +2 -5
- package/dist/esm/index.js +5 -1
- package/package.json +5 -5
package/dist/cjs/index.cjs
CHANGED
|
@@ -242,7 +242,7 @@ var Cosmostation = class extends __injectivelabs_wallet_base.BaseConcreteStrateg
|
|
|
242
242
|
context: __injectivelabs_wallet_base.WalletAction.SendEvmTransaction
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
|
-
async sendTransaction(transaction,
|
|
245
|
+
async sendTransaction(transaction, options) {
|
|
246
246
|
const provider = this.getProvider();
|
|
247
247
|
const txRaw = (0, __injectivelabs_sdk_ts_core_tx.createTxRawFromSigResponse)(transaction);
|
|
248
248
|
const txBytes = (0, __injectivelabs_sdk_ts_utils.uint8ArrayToBase64)(__injectivelabs_sdk_ts.CosmosTxV1Beta1TxPb.TxRaw.toBinary(txRaw));
|
|
@@ -255,6 +255,10 @@ var Cosmostation = class extends __injectivelabs_wallet_base.BaseConcreteStrateg
|
|
|
255
255
|
mode: SEND_TRANSACTION_MODE.SYNC
|
|
256
256
|
}
|
|
257
257
|
});
|
|
258
|
+
if (Number(response.tx_response.code || 0) === 0) {
|
|
259
|
+
var _options$onBroadcast;
|
|
260
|
+
(_options$onBroadcast = options.onBroadcast) === null || _options$onBroadcast === void 0 || _options$onBroadcast.call(options, response.tx_response.txhash);
|
|
261
|
+
}
|
|
258
262
|
return {
|
|
259
263
|
...response.tx_response,
|
|
260
264
|
gasUsed: parseInt(response.tx_response.gas_used || "0", 10),
|
package/dist/cjs/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AccountAddress, ChainId, CosmosChainId, EvmChainId, TestnetCosmosChainId } from "@injectivelabs/ts-types";
|
|
2
2
|
import { CosmosTxV1Beta1TxPb } from "@injectivelabs/sdk-ts";
|
|
3
|
-
import { BaseConcreteStrategy, ConcreteWalletStrategy, StdSignDoc, WalletDeviceType, onAccountChangeCallback } from "@injectivelabs/wallet-base";
|
|
3
|
+
import { BaseConcreteStrategy, ConcreteWalletStrategy, SendTransactionOptions, StdSignDoc, WalletDeviceType, onAccountChangeCallback } from "@injectivelabs/wallet-base";
|
|
4
4
|
import { OfflineSigner } from "@cosmjs/proto-signing";
|
|
5
5
|
import { TxResponse } from "@injectivelabs/sdk-ts/core/tx";
|
|
6
6
|
import { AminoSignResponse, DirectSignResponse } from "@injectivelabs/sdk-ts/types";
|
|
@@ -161,10 +161,7 @@ declare class Cosmostation extends BaseConcreteStrategy implements ConcreteWalle
|
|
|
161
161
|
address: AccountAddress;
|
|
162
162
|
evmChainId: EvmChainId;
|
|
163
163
|
}): Promise<string>;
|
|
164
|
-
sendTransaction(transaction: DirectSignResponse | CosmosTxV1Beta1TxPb.TxRaw,
|
|
165
|
-
address: AccountAddress;
|
|
166
|
-
chainId: ChainId;
|
|
167
|
-
}): Promise<TxResponse>;
|
|
164
|
+
sendTransaction(transaction: DirectSignResponse | CosmosTxV1Beta1TxPb.TxRaw, options: Pick<SendTransactionOptions, 'address' | 'chainId' | 'onBroadcast'>): Promise<TxResponse>;
|
|
168
165
|
signAminoCosmosTransaction(_transaction: {
|
|
169
166
|
address: string;
|
|
170
167
|
signDoc: StdSignDoc;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AccountAddress, ChainId, CosmosChainId, EvmChainId, TestnetCosmosChainId } from "@injectivelabs/ts-types";
|
|
2
2
|
import { CosmosTxV1Beta1TxPb } from "@injectivelabs/sdk-ts";
|
|
3
3
|
import { TxResponse } from "@injectivelabs/sdk-ts/core/tx";
|
|
4
|
-
import { BaseConcreteStrategy, ConcreteWalletStrategy, StdSignDoc, WalletDeviceType, onAccountChangeCallback } from "@injectivelabs/wallet-base";
|
|
4
|
+
import { BaseConcreteStrategy, ConcreteWalletStrategy, SendTransactionOptions, StdSignDoc, WalletDeviceType, onAccountChangeCallback } from "@injectivelabs/wallet-base";
|
|
5
5
|
import { OfflineSigner } from "@cosmjs/proto-signing";
|
|
6
6
|
import { AminoSignResponse, DirectSignResponse } from "@injectivelabs/sdk-ts/types";
|
|
7
7
|
|
|
@@ -161,10 +161,7 @@ declare class Cosmostation extends BaseConcreteStrategy implements ConcreteWalle
|
|
|
161
161
|
address: AccountAddress;
|
|
162
162
|
evmChainId: EvmChainId;
|
|
163
163
|
}): Promise<string>;
|
|
164
|
-
sendTransaction(transaction: DirectSignResponse | CosmosTxV1Beta1TxPb.TxRaw,
|
|
165
|
-
address: AccountAddress;
|
|
166
|
-
chainId: ChainId;
|
|
167
|
-
}): Promise<TxResponse>;
|
|
164
|
+
sendTransaction(transaction: DirectSignResponse | CosmosTxV1Beta1TxPb.TxRaw, options: Pick<SendTransactionOptions, 'address' | 'chainId' | 'onBroadcast'>): Promise<TxResponse>;
|
|
168
165
|
signAminoCosmosTransaction(_transaction: {
|
|
169
166
|
address: string;
|
|
170
167
|
signDoc: StdSignDoc;
|
package/dist/esm/index.js
CHANGED
|
@@ -242,7 +242,7 @@ var Cosmostation = class extends BaseConcreteStrategy {
|
|
|
242
242
|
context: WalletAction.SendEvmTransaction
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
|
-
async sendTransaction(transaction,
|
|
245
|
+
async sendTransaction(transaction, options) {
|
|
246
246
|
const provider = this.getProvider();
|
|
247
247
|
const txRaw = createTxRawFromSigResponse(transaction);
|
|
248
248
|
const txBytes = uint8ArrayToBase64(CosmosTxV1Beta1TxPb.TxRaw.toBinary(txRaw));
|
|
@@ -255,6 +255,10 @@ var Cosmostation = class extends BaseConcreteStrategy {
|
|
|
255
255
|
mode: SEND_TRANSACTION_MODE.SYNC
|
|
256
256
|
}
|
|
257
257
|
});
|
|
258
|
+
if (Number(response.tx_response.code || 0) === 0) {
|
|
259
|
+
var _options$onBroadcast;
|
|
260
|
+
(_options$onBroadcast = options.onBroadcast) === null || _options$onBroadcast === void 0 || _options$onBroadcast.call(options, response.tx_response.txhash);
|
|
261
|
+
}
|
|
258
262
|
return {
|
|
259
263
|
...response.tx_response,
|
|
260
264
|
gasUsed: parseInt(response.tx_response.gas_used || "0", 10),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@injectivelabs/wallet-cosmostation",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.8",
|
|
4
4
|
"description": "Cosmostation strategy for use with @injectivelabs/wallet-core.",
|
|
5
5
|
"deprecated": "Use @injectivelabs/wallet-cosmos with Wallet.Cosmostation instead",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
],
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@cosmjs/proto-signing": "0.33.0",
|
|
47
|
-
"@injectivelabs/exceptions": "1.20.
|
|
48
|
-
"@injectivelabs/sdk-ts": "1.20.
|
|
49
|
-
"@injectivelabs/
|
|
50
|
-
"@injectivelabs/
|
|
47
|
+
"@injectivelabs/exceptions": "1.20.8",
|
|
48
|
+
"@injectivelabs/sdk-ts": "1.20.8",
|
|
49
|
+
"@injectivelabs/wallet-base": "1.20.8",
|
|
50
|
+
"@injectivelabs/ts-types": "1.20.8"
|
|
51
51
|
},
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public"
|