From 17c8039eb560d7f19bcc66a7812afe66fb97923f Mon Sep 17 00:00:00 2001 From: Karim El Shenawy <54007257+elshenak@users.noreply.github.com> Date: Fri, 11 Aug 2023 10:49:21 -0400 Subject: [PATCH] refactor: adding grecaptcha to useFaucet v21 (#199) * refactor: adding grecaptcha to useFaucet inputs * docs: reverting to un-linted docs --- packages/nibijs/src/chain/useFaucet.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/nibijs/src/chain/useFaucet.ts b/packages/nibijs/src/chain/useFaucet.ts index b76af596..063b5c83 100644 --- a/packages/nibijs/src/chain/useFaucet.ts +++ b/packages/nibijs/src/chain/useFaucet.ts @@ -7,10 +7,12 @@ export async function useFaucet({ address, chain, amts, + grecaptcha, }: { address: string chain: Chain amts?: { nibi: number; nusd: number; usdt: number } + grecaptcha: string }): Promise { if (!amts) { // default values @@ -30,7 +32,7 @@ export async function useFaucet({ // Execute faucet request console.info( - `Requesting funds from faucet @ ${faucetUrl}: + `Requesting funds from faucet @ ${faucetUrl}: Coins: ${coins} Address: ${address} ` @@ -43,7 +45,7 @@ export async function useFaucet({ Accept: "application/json", "Content-Type": "application/json", }, - body: JSON.stringify({ address, coins }), + body: JSON.stringify({ address, coins, grecaptcha }), }) .catch((err) => { console.error(err)