@@ -11,11 +11,11 @@ import { Button } from "$lib/components/ui/button/index.ts"
11
11
import SpinnerSVG from " $lib/components/spinner-svg.svelte"
12
12
import { cosmosStore } from " $/lib/wallet/cosmos/config.ts"
13
13
import { derived , writable , type Writable } from " svelte/store"
14
- import { strideFaucetMutation } from " $lib/graphql/queries/faucet"
15
14
import { getCosmosChainBalances } from " $lib/queries/balance/cosmos"
16
15
import { createCosmosSdkAddressRegex } from " $lib/utilities/address.ts"
17
16
import { bech32ToBech32Address , isValidBech32Address } from " @unionlabs/client"
18
17
import type { AwaitedReturnType , DiscriminatedUnion } from " $lib/utilities/types.ts"
18
+ import { faucetUnoMutation2 } from " $lib/graphql/queries/faucet.ts"
19
19
20
20
type DydxFaucetState = DiscriminatedUnion <
21
21
" kind" ,
@@ -74,24 +74,26 @@ const requestStrdFromFaucet = async () => {
74
74
75
75
if ($strideFaucetState .kind === " SUBMITTING" ) {
76
76
try {
77
- const result = await request (URLS ().GRAPHQL , strideFaucetMutation , {
77
+ const result = await request (URLS ().GRAPHQL , faucetUnoMutation2 , {
78
+ chainId: " stride-internal-1" ,
79
+ denom: " ustrd" ,
78
80
address: $strideAddress ,
79
81
captchaToken: $strideFaucetState .captchaToken
80
82
})
81
83
82
- if (! result .stride_faucet ) {
84
+ if (! result .send ) {
83
85
strideFaucetState .set ({
84
86
kind: " RESULT_ERR" ,
85
87
error: " Empty faucet response"
86
88
})
87
89
return
88
90
}
89
91
90
- if (result .stride_faucet . send .startsWith (" ERROR" )) {
91
- console .error (result .stride_faucet . send )
92
+ if (result .send .startsWith (" ERROR" )) {
93
+ console .error (result .send )
92
94
strideFaucetState .set ({
93
95
kind: " RESULT_ERR" ,
94
- error: result .stride_faucet . send .endsWith (" ratelimited" )
96
+ error: result .send .endsWith (" ratelimited" )
95
97
? " You already got STRD from the faucet today. Try again in 24 hours."
96
98
: " Error from faucet"
97
99
})
@@ -100,7 +102,7 @@ const requestStrdFromFaucet = async () => {
100
102
101
103
strideFaucetState .set ({
102
104
kind: " RESULT_OK" ,
103
- message: result .stride_faucet . send
105
+ message: result .send
104
106
})
105
107
} catch (error ) {
106
108
console .error (error )
0 commit comments