From 9f04e9ccbcaa87b93394a80bb269898cbb802c02 Mon Sep 17 00:00:00 2001 From: StefanV Date: Wed, 1 Apr 2026 23:12:31 +0300 Subject: [PATCH] fix: pass undefined instead of empty object for signOptions in ChainWalletStore Fix `ChainWalletStore.getOfflineSigner()` passing `{}` instead of `undefined` as `signOptions` to `cosmosWallet.signAmino()` and `cosmosWallet.signDirect()`. Problem CosmosWallet in core defines defaultSignOptions = { preferNoSetFee: true } and applies them via signOptions || this.defaultSignOptions. Since {} is truthy, the fallback never triggers and the defaults are silently dropped. Without preferNoSetFee: true, Keplr overrides the application-provided fee with its own calculation using the chain's native denom. This breaks any app that pays fees in a non-native denomination. Fix Pass undefined instead of {} for both signAmino and signDirect so the defaults in core are respected. --- packages/store/src/wallet-manager/chain-wallet-store.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/store/src/wallet-manager/chain-wallet-store.ts b/packages/store/src/wallet-manager/chain-wallet-store.ts index a41bd06c1..9dada020f 100644 --- a/packages/store/src/wallet-manager/chain-wallet-store.ts +++ b/packages/store/src/wallet-manager/chain-wallet-store.ts @@ -112,13 +112,13 @@ export class ChainWalletStore extends BaseWallet { const aminoOfflineSigner = { getAccounts: async () => [account], signAmino: async (signer: string, signDoc: StdSignDoc) => { - return cosmosWallet.signAmino(this.chain.chainId, signer, signDoc, {}); + return cosmosWallet.signAmino(this.chain.chainId, signer, signDoc, undefined); } }; const directOfflineSigner = { getAccounts: async () => [account], signDirect: async (signer: string, signDoc: DirectSignDoc) => { - return cosmosWallet.signDirect(this.chain.chainId, signer, signDoc, {}); + return cosmosWallet.signDirect(this.chain.chainId, signer, signDoc, undefined); } }; @@ -135,4 +135,4 @@ export class ChainWalletStore extends BaseWallet { getWalletOfType(WalletClass: new (...args: any[]) => T) { return getWalletByType(this.wallet, WalletClass); } -} \ No newline at end of file +}