Skip to content

Commit

Permalink
chore: increase the Cosmos gas estimate multiplier
Browse files Browse the repository at this point in the history
  • Loading branch information
tkporter committed Nov 5, 2024
1 parent 99d8bf0 commit 719be34
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/features/wallet/hooks/cosmos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export function useCosmosDisconnectFn(): () => Promise<void> {
}

export function useCosmosActiveChain(): ActiveChainInfo {
return useMemo(() => ({}) as ActiveChainInfo, []);
return useMemo(() => ({} as ActiveChainInfo), []);
}

export function useCosmosTransactionFns(): ChainTransactionFns {
Expand Down Expand Up @@ -108,8 +108,8 @@ export function useCosmosTransactionFns(): ChainTransactionFns {
// The fee param of 'auto' here stopped working for Neutron-based IBC transfers
// It seems the signAndBroadcast method uses a default fee multiplier of 1.4
// https://github.com/cosmos/cosmjs/blob/e819a1fc0e99a3e5320d8d6667a08d3b92e5e836/packages/stargate/src/signingstargateclient.ts#L115
// Bumping to 1.6 fixes the insufficient gas issue
result = await client.signAndBroadcast(chainContext.address, [tx.transaction], 1.6);
// A multiplier of 1.6 was insufficient for Celestia -> Neutron|Cosmos -> XXX transfers, but 2 worked.
result = await client.signAndBroadcast(chainContext.address, [tx.transaction], 2);
txDetails = await client.getTx(result.transactionHash);
} else {
throw new Error(`Invalid cosmos provider type ${tx.type}`);
Expand Down

0 comments on commit 719be34

Please sign in to comment.