Skip to content

Commit ec2a25b

Browse files
cgilbe27k-yangsemantic-release-bot
authored
chore: develop -> main (#370)
* revert: cosmos submodule only (#362) * revert: cosmos submodule only * fix: rem * fix: rem * fix: update * feat: add msg client * fix: paths * fix: try chaosnet ibc * fix: path again * fix: try hm * fix: fixes to pass * feat: eth protos (#366) * fix: eth protos * fix: client * fix: fixes * fix: try older nibiru * fix: index * fix: mainnet * fix: import * revert: build change * chore: tests (#367) * fix: all query tests * chore: final tests * fix: buf * fix: fix * fix: pull latest * fix: build * fix: build * refactor(faucet)!: set default tokens (#369) * chore: develop -> main (#368) * revert: cosmos submodule only (#362) * revert: cosmos submodule only * fix: rem * fix: rem * fix: update * feat: add msg client * fix: paths * fix: try chaosnet ibc * fix: path again * fix: try hm * fix: fixes to pass * feat: eth protos (#366) * fix: eth protos * fix: client * fix: fixes * fix: try older nibiru * fix: index * fix: mainnet * fix: import * revert: build change * chore: tests (#367) * fix: all query tests * chore: final tests * fix: buf * fix: fix * fix: pull latest * fix: build * fix: build * chore(release): 4.5.1 ### [4.5.1](v4.5.0...v4.5.1) (2024-08-09) ### Miscellaneous Chores * develop -> main ([#368](#368)) ([c6d6570](c6d6570)), closes [#362](#362) [#366](#366) [#367](#367) [skip ci] * fix(faucet): remove unused tokens from default faucet request * fix: bump test --------- Co-authored-by: Cameron Gilbert <[email protected]> Co-authored-by: semantic-release-bot <[email protected]> --------- Co-authored-by: Kevin Yang <[email protected]> Co-authored-by: semantic-release-bot <[email protected]>
1 parent ead8b15 commit ec2a25b

File tree

2 files changed

+5
-21
lines changed

2 files changed

+5
-21
lines changed

src/sdk/utils/faucet.test.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff 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",

src/sdk/utils/faucet.ts

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,18 @@ import { fetch } from "cross-fetch"
22
import { 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
*/
77
export 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

0 commit comments

Comments
 (0)