File tree Expand file tree Collapse file tree 2 files changed +5
-11
lines changed
packages/wallets/wallet-core/src Expand file tree Collapse file tree 2 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -838,6 +838,9 @@ export class MsgBroadcaster {
838838 }
839839
840840 const cosmosWallet = walletStrategy . getCosmosWallet ( chainId )
841+ const canDisableCosmosGasCheck = [ Wallet . Keplr , Wallet . OWallet ] . includes (
842+ walletStrategy . wallet ,
843+ )
841844 const feePayerPubKey = await this . fetchFeePayerPubKey (
842845 options . feePayerPubKey ,
843846 )
@@ -888,10 +891,7 @@ export class MsgBroadcaster {
888891 } )
889892
890893 // Temporary remove tx gas check because Keplr doesn't recognize feePayer
891- if (
892- walletStrategy . wallet === Wallet . Keplr &&
893- cosmosWallet . disableGasCheck
894- ) {
894+ if ( canDisableCosmosGasCheck && cosmosWallet . disableGasCheck ) {
895895 cosmosWallet . disableGasCheck ( chainId )
896896 }
897897
@@ -916,7 +916,7 @@ export class MsgBroadcaster {
916916 } )
917917
918918 // Re-enable tx gas check removed above
919- if ( walletStrategy . wallet === Wallet . Keplr && cosmosWallet . enableGasCheck ) {
919+ if ( canDisableCosmosGasCheck && cosmosWallet . enableGasCheck ) {
920920 cosmosWallet . enableGasCheck ( chainId )
921921 }
922922
Original file line number Diff line number Diff line change @@ -207,12 +207,6 @@ export default class BaseWalletStrategy implements WalletStrategyInterface {
207207 }
208208
209209 public getCosmosWallet ( chainId : ChainId ) : CosmosWalletAbstraction {
210- if ( ! [ Wallet . Keplr , Wallet . Leap ] . includes ( this . getWallet ( ) ) ) {
211- throw new WalletException (
212- new Error ( `You can't use this method outside of Keplr/Leap wallet` ) ,
213- )
214- }
215-
216210 const strategy = this . getStrategy ( )
217211
218212 if ( strategy . getCosmosWallet == undefined ) {
You can’t perform that action at this time.
0 commit comments