diff --git a/packages/wallets/wallet-core/src/broadcaster/MsgBroadcaster.ts b/packages/wallets/wallet-core/src/broadcaster/MsgBroadcaster.ts index 6e3c459cc..976e4754b 100644 --- a/packages/wallets/wallet-core/src/broadcaster/MsgBroadcaster.ts +++ b/packages/wallets/wallet-core/src/broadcaster/MsgBroadcaster.ts @@ -838,6 +838,9 @@ export class MsgBroadcaster { } const cosmosWallet = walletStrategy.getCosmosWallet(chainId) + const canDisableCosmosGasCheck = [Wallet.Keplr, Wallet.OWallet].includes( + walletStrategy.wallet, + ) const feePayerPubKey = await this.fetchFeePayerPubKey( options.feePayerPubKey, ) @@ -888,10 +891,7 @@ export class MsgBroadcaster { }) // Temporary remove tx gas check because Keplr doesn't recognize feePayer - if ( - walletStrategy.wallet === Wallet.Keplr && - cosmosWallet.disableGasCheck - ) { + if (canDisableCosmosGasCheck && cosmosWallet.disableGasCheck) { cosmosWallet.disableGasCheck(chainId) } @@ -916,7 +916,7 @@ export class MsgBroadcaster { }) // Re-enable tx gas check removed above - if (walletStrategy.wallet === Wallet.Keplr && cosmosWallet.enableGasCheck) { + if (canDisableCosmosGasCheck && cosmosWallet.enableGasCheck) { cosmosWallet.enableGasCheck(chainId) } diff --git a/packages/wallets/wallet-core/src/strategy/BaseWalletStrategy.ts b/packages/wallets/wallet-core/src/strategy/BaseWalletStrategy.ts index a09c11e4b..3fa53015b 100644 --- a/packages/wallets/wallet-core/src/strategy/BaseWalletStrategy.ts +++ b/packages/wallets/wallet-core/src/strategy/BaseWalletStrategy.ts @@ -207,12 +207,6 @@ export default class BaseWalletStrategy implements WalletStrategyInterface { } public getCosmosWallet(chainId: ChainId): CosmosWalletAbstraction { - if (![Wallet.Keplr, Wallet.Leap].includes(this.getWallet())) { - throw new WalletException( - new Error(`You can't use this method outside of Keplr/Leap wallet`), - ) - } - const strategy = this.getStrategy() if (strategy.getCosmosWallet == undefined) {