File tree Expand file tree Collapse file tree 2 files changed +5
-21
lines changed Expand file tree Collapse file tree 2 files changed +5
-21
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ describe("useFaucet", () => {
7878 test ( "should request funds from faucet with default amounts" , async ( ) => {
7979 await useFaucet ( { address, chain, grecaptcha } )
8080
81- const expectedCoins = [ "11000000unibi" , "100000000unusd" , "100000000uusdt "]
81+ const expectedCoins = [ "10000000unibi " ]
8282
8383 expect ( fetch ) . toHaveBeenCalledWith ( expectedUrl , {
8484 method : "POST" ,
@@ -91,10 +91,9 @@ describe("useFaucet", () => {
9191 } )
9292
9393 test ( "should request funds from faucet with custom amounts" , async ( ) => {
94- const amts = { nibi : 5 , nusd : 50 , usdt : 50 }
95- await useFaucet ( { address, chain, amts, grecaptcha } )
94+ await useFaucet ( { address, chain, grecaptcha } )
9695
97- const expectedCoins = [ "5000000unibi" , "50000000unusd" , "50000000uusdt "]
96+ const expectedCoins = [ "10000000unibi " ]
9897
9998 expect ( fetch ) . toHaveBeenCalledWith ( expectedUrl , {
10099 method : "POST" ,
Original file line number Diff line number Diff line change @@ -2,33 +2,18 @@ import { fetch } from "cross-fetch"
22import { Chain , chainToParts } from "."
33
44/**
5- * Sends 11 NIBI, 100 NUSD, and 100 USDT to the given address from the testnet faucet.
5+ * Sends 10 NIBI to the given address from the testnet faucet.
66 */
77export async function useFaucet ( {
88 address,
99 chain,
10- amts,
1110 grecaptcha,
1211} : {
1312 address : string
1413 chain : Chain
15- amts ?: { nibi : number ; nusd : number ; usdt : number }
1614 grecaptcha : string
1715} ) : Promise < Response | undefined > {
18- if ( ! amts ) {
19- // default values
20- amts = {
21- nibi : 11 ,
22- nusd : 100 ,
23- usdt : 100 ,
24- }
25- }
26-
27- const coins : string [ ] = [
28- `${ amts . nibi * 1e6 } unibi` ,
29- `${ amts . nusd * 1e6 } unusd` ,
30- `${ amts . usdt * 1e6 } uusdt` ,
31- ]
16+ const coins : string [ ] = [ `${ 10e6 } unibi` ]
3217 const faucetUrl = faucetUrlFromChain ( chain )
3318
3419 // Execute faucet request
You can’t perform that action at this time.
0 commit comments