From 9f04e9ccbcaa87b93394a80bb269898cbb802c02 Mon Sep 17 00:00:00 2001 From: StefanV Date: Wed, 1 Apr 2026 23:12:31 +0300 Subject: [PATCH 1/2] 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 +} From ea669dcd34387f8534df1002ff0d7415f679de3c Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Thu, 1 Oct 2026 19:47:23 +0000 Subject: [PATCH 2/2] test(store): expect undefined signOptions from ChainWalletStore offline signer --- packages/store/__tests__/chain-wallet-store.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/store/__tests__/chain-wallet-store.test.ts b/packages/store/__tests__/chain-wallet-store.test.ts index c506a5a6d..7f005171b 100644 --- a/packages/store/__tests__/chain-wallet-store.test.ts +++ b/packages/store/__tests__/chain-wallet-store.test.ts @@ -507,7 +507,7 @@ describe('ChainWalletStore', () => { 'cosmoshub-4', 'cosmos1abc123', mockSignDoc, - {} + undefined ); }); @@ -546,7 +546,7 @@ describe('ChainWalletStore', () => { 'cosmoshub-4', 'cosmos1abc123', mockSignDoc, - {} + undefined ); }); });