Skip to content

Commit

Permalink
refactor: adding grecaptcha to useFaucet v21 (#199)
Browse files Browse the repository at this point in the history
* refactor: adding grecaptcha to useFaucet inputs

* docs: reverting to un-linted docs
  • Loading branch information
CalicoNino authored Aug 11, 2023
1 parent 4a1546c commit 17c8039
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/nibijs/src/chain/useFaucet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Response> {
if (!amts) {
// default values
Expand All @@ -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}
`
Expand All @@ -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)
Expand Down

0 comments on commit 17c8039

Please sign in to comment.