Skip to content

Commit bc08408

Browse files
committed
fix: default to nonzero fee
1 parent c13262a commit bc08408

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

packages/web-components/src/wallet-connection/makeAgoricSigner.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import { fromBech32, toBase64 } from '@cosmjs/encoding';
22
import { assertIsDeliverTxSuccess } from '@cosmjs/stargate';
33
import { stakeCurrency } from './chainInfo.js';
44
import { AgoricMsgs } from './signerOptions.js';
5-
import type { StdFee } from '@keplr-wallet/types';
6-
import type { SigningStargateClient } from '@cosmjs/stargate';
5+
import type { SigningStargateClient, StdFee } from '@cosmjs/stargate';
76

87
const toAccAddress = (address: string): Uint8Array => {
98
return fromBech32(address).data;
@@ -19,10 +18,10 @@ const PowerFlags = {
1918
SMART_WALLET: 'SMART_WALLET',
2019
};
2120

22-
const zeroFee = (): StdFee => {
21+
const defaultFee = (): StdFee => {
2322
const { coinMinimalDenom: denom } = stakeCurrency;
2423
const fee = {
25-
amount: [{ amount: '0', denom }],
24+
amount: [{ amount: '1', denom }],
2625
gas: '300000', // TODO: estimate gas?
2726
};
2827
return fee;
@@ -38,7 +37,7 @@ export const makeAgoricSigner = (
3837
signingClient: SigningStargateClient,
3938
address: string,
4039
) => {
41-
const fee = zeroFee();
40+
const fee = defaultFee();
4241

4342
return harden({
4443
/**

0 commit comments

Comments
 (0)