@injectivelabs/wallet-core 1.20.11 → 1.20.13
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/{broadcaster-CPCJe4Al.cjs → broadcaster-DNVJLucC.cjs} +4 -5
- package/dist/cjs/broadcaster.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/esm/{broadcaster-CA8Ix8IA.js → broadcaster-Daq1JY2t.js} +4 -5
- package/dist/esm/broadcaster.js +1 -1
- package/dist/esm/index.js +1 -1
- package/package.json +7 -7
|
@@ -502,7 +502,7 @@ var MsgBroadcaster = class {
|
|
|
502
502
|
* always runs out of gas for some reason, temporary solution
|
|
503
503
|
* to just broadcast the transaction twice
|
|
504
504
|
**/
|
|
505
|
-
if (
|
|
505
|
+
if ([__injectivelabs_wallet_base.Wallet.PrivateKey, __injectivelabs_wallet_base.Wallet.PrivateKeyCosmos].includes(walletStrategy.wallet) && checkIfTxRunOutOfGas(exception)) {
|
|
506
506
|
const { baseAccount } = await new __injectivelabs_sdk_ts_client_chain.ChainGrpcAuthApi(endpoints.grpc).fetchAccount(tx.injectiveAddress);
|
|
507
507
|
/** We only do it on the first account tx fail */
|
|
508
508
|
if (baseAccount.sequence > 1) throw e;
|
|
@@ -743,8 +743,7 @@ var MsgBroadcaster = class {
|
|
|
743
743
|
if (walletStrategy.getWallet() === __injectivelabs_wallet_base.Wallet.Keplr) {
|
|
744
744
|
if (await walletStrategy.getWalletDeviceType() === __injectivelabs_wallet_base.WalletDeviceType.Hardware) throw new __injectivelabs_exceptions.GeneralException(/* @__PURE__ */ new Error("Keplr + Ledger is not available with fee delegation. Connect with Ledger directly."));
|
|
745
745
|
}
|
|
746
|
-
const cosmosWallet = walletStrategy.getCosmosWallet(chainId);
|
|
747
|
-
const canDisableCosmosGasCheck = [__injectivelabs_wallet_base.Wallet.Keplr, __injectivelabs_wallet_base.Wallet.OWallet].includes(walletStrategy.wallet);
|
|
746
|
+
const cosmosWallet = await walletStrategy.getCosmosWallet(chainId);
|
|
748
747
|
const feePayerPubKey = await this.fetchFeePayerPubKey(options.feePayerPubKey);
|
|
749
748
|
const feePayerPublicKey = __injectivelabs_sdk_ts_core_accounts.PublicKey.fromBase64(feePayerPubKey);
|
|
750
749
|
const feePayer = feePayerPublicKey.toAddress().address;
|
|
@@ -805,7 +804,7 @@ var MsgBroadcaster = class {
|
|
|
805
804
|
payer: feePayer
|
|
806
805
|
})
|
|
807
806
|
});
|
|
808
|
-
if (
|
|
807
|
+
if (cosmosWallet === null || cosmosWallet === void 0 ? void 0 : cosmosWallet.disableGasCheck) cosmosWallet.disableGasCheck(chainId);
|
|
809
808
|
walletStrategy.emit(__injectivelabs_wallet_base.WalletStrategyEmitterEventType.TransactionPreparationStart);
|
|
810
809
|
const directSignResponse = await walletStrategy.signCosmosTransaction({
|
|
811
810
|
txRaw,
|
|
@@ -839,7 +838,7 @@ var MsgBroadcaster = class {
|
|
|
839
838
|
throw e;
|
|
840
839
|
}
|
|
841
840
|
walletStrategy.emit(__injectivelabs_wallet_base.WalletStrategyEmitterEventType.TransactionBroadcastSynced);
|
|
842
|
-
if (
|
|
841
|
+
if (cosmosWallet === null || cosmosWallet === void 0 ? void 0 : cosmosWallet.enableGasCheck) cosmosWallet.enableGasCheck(chainId);
|
|
843
842
|
const confirmedTx = await this.waitForPreparedTxInclusion({
|
|
844
843
|
tx,
|
|
845
844
|
inclusionWaiter,
|
package/dist/cjs/broadcaster.cjs
CHANGED
package/dist/cjs/index.cjs
CHANGED
|
@@ -502,7 +502,7 @@ var MsgBroadcaster = class {
|
|
|
502
502
|
* always runs out of gas for some reason, temporary solution
|
|
503
503
|
* to just broadcast the transaction twice
|
|
504
504
|
**/
|
|
505
|
-
if (
|
|
505
|
+
if ([Wallet.PrivateKey, Wallet.PrivateKeyCosmos].includes(walletStrategy.wallet) && checkIfTxRunOutOfGas(exception)) {
|
|
506
506
|
const { baseAccount } = await new ChainGrpcAuthApi(endpoints.grpc).fetchAccount(tx.injectiveAddress);
|
|
507
507
|
/** We only do it on the first account tx fail */
|
|
508
508
|
if (baseAccount.sequence > 1) throw e;
|
|
@@ -743,8 +743,7 @@ var MsgBroadcaster = class {
|
|
|
743
743
|
if (walletStrategy.getWallet() === Wallet.Keplr) {
|
|
744
744
|
if (await walletStrategy.getWalletDeviceType() === WalletDeviceType.Hardware) throw new GeneralException(/* @__PURE__ */ new Error("Keplr + Ledger is not available with fee delegation. Connect with Ledger directly."));
|
|
745
745
|
}
|
|
746
|
-
const cosmosWallet = walletStrategy.getCosmosWallet(chainId);
|
|
747
|
-
const canDisableCosmosGasCheck = [Wallet.Keplr, Wallet.OWallet].includes(walletStrategy.wallet);
|
|
746
|
+
const cosmosWallet = await walletStrategy.getCosmosWallet(chainId);
|
|
748
747
|
const feePayerPubKey = await this.fetchFeePayerPubKey(options.feePayerPubKey);
|
|
749
748
|
const feePayerPublicKey = PublicKey.fromBase64(feePayerPubKey);
|
|
750
749
|
const feePayer = feePayerPublicKey.toAddress().address;
|
|
@@ -805,7 +804,7 @@ var MsgBroadcaster = class {
|
|
|
805
804
|
payer: feePayer
|
|
806
805
|
})
|
|
807
806
|
});
|
|
808
|
-
if (
|
|
807
|
+
if (cosmosWallet === null || cosmosWallet === void 0 ? void 0 : cosmosWallet.disableGasCheck) cosmosWallet.disableGasCheck(chainId);
|
|
809
808
|
walletStrategy.emit(WalletStrategyEmitterEventType.TransactionPreparationStart);
|
|
810
809
|
const directSignResponse = await walletStrategy.signCosmosTransaction({
|
|
811
810
|
txRaw,
|
|
@@ -839,7 +838,7 @@ var MsgBroadcaster = class {
|
|
|
839
838
|
throw e;
|
|
840
839
|
}
|
|
841
840
|
walletStrategy.emit(WalletStrategyEmitterEventType.TransactionBroadcastSynced);
|
|
842
|
-
if (
|
|
841
|
+
if (cosmosWallet === null || cosmosWallet === void 0 ? void 0 : cosmosWallet.enableGasCheck) cosmosWallet.enableGasCheck(chainId);
|
|
843
842
|
const confirmedTx = await this.waitForPreparedTxInclusion({
|
|
844
843
|
tx,
|
|
845
844
|
inclusionWaiter,
|
package/dist/esm/broadcaster.js
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as MsgBroadcaster, r as checkIfTxRunOutOfGas, t as Web3Broadcaster } from "./broadcaster-
|
|
1
|
+
import { n as MsgBroadcaster, r as checkIfTxRunOutOfGas, t as Web3Broadcaster } from "./broadcaster-Daq1JY2t.js";
|
|
2
2
|
import "./defineProperty-D4YE9KXX.js";
|
|
3
3
|
import { t as BaseWalletStrategy } from "./strategy-DU-V-GfI.js";
|
|
4
4
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@injectivelabs/wallet-core",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.13",
|
|
4
4
|
"description": "Core wallet strategy",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -84,12 +84,12 @@
|
|
|
84
84
|
"dependencies": {
|
|
85
85
|
"@keplr-wallet/types": "^0.12.296",
|
|
86
86
|
"eventemitter3": "^5.0.1",
|
|
87
|
-
"@injectivelabs/exceptions": "1.20.
|
|
88
|
-
"@injectivelabs/
|
|
89
|
-
"@injectivelabs/
|
|
90
|
-
"@injectivelabs/
|
|
91
|
-
"@injectivelabs/
|
|
92
|
-
"@injectivelabs/
|
|
87
|
+
"@injectivelabs/exceptions": "1.20.13",
|
|
88
|
+
"@injectivelabs/networks": "1.20.13",
|
|
89
|
+
"@injectivelabs/ts-types": "1.20.13",
|
|
90
|
+
"@injectivelabs/utils": "1.20.13",
|
|
91
|
+
"@injectivelabs/wallet-base": "1.20.13",
|
|
92
|
+
"@injectivelabs/sdk-ts": "1.20.13"
|
|
93
93
|
},
|
|
94
94
|
"publishConfig": {
|
|
95
95
|
"access": "public"
|