diff --git a/packages/faucet/src/faucet.ts b/packages/faucet/src/faucet.ts index 8df97e29..354a5d06 100644 --- a/packages/faucet/src/faucet.ts +++ b/packages/faucet/src/faucet.ts @@ -5,6 +5,7 @@ import { } from "@cosmjs/launchpad"; import { assertIsBroadcastTxSuccess as assertIsBroadcastTxSuccessStargate, + calculateFee, SigningStargateClient, StargateClient, } from "@cosmjs/stargate"; @@ -88,7 +89,8 @@ export class Faucet { const result = await client.sendTokens(job.recipient, [job.amount], constants.memo); return assertIsBroadcastTxSuccessLaunchpad(result); } - const result = await client.sendTokens(job.sender, job.recipient, [job.amount], constants.memo); + const fee = calculateFee(constants.gasLimits.send, constants.gasPrice); + const result = await client.sendTokens(job.sender, job.recipient, [job.amount], fee, constants.memo); assertIsBroadcastTxSuccessStargate(result); } diff --git a/packages/faucet/src/profile.ts b/packages/faucet/src/profile.ts index eccac4f9..60ba24e1 100644 --- a/packages/faucet/src/profile.ts +++ b/packages/faucet/src/profile.ts @@ -43,10 +43,7 @@ export async function createClients( > => [ senderAddress, isOfflineDirectSigner(wallet) - ? await SigningStargateClient.connectWithSigner(apiUrl, wallet, { - gasLimits: constants.gasLimits, - gasPrice: constants.gasPrice, - }) + ? await SigningStargateClient.connectWithSigner(apiUrl, wallet) : new SigningCosmosClient(apiUrl, senderAddress, wallet, constants.gasPrice, constants.gasLimits), ], ),