Skip to content

Commit 3ac9630

Browse files
committed
fix: units
1 parent 6f37405 commit 3ac9630

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/components/faucet/FaucetDetail.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ const requestFaucet = async (address: string, amount: number, secret: string) =>
6060
const minTimer = new Promise((resolve) => setTimeout(resolve, 2000))
6161
console.log(secret)
6262
63-
const displayError = (e) => {
63+
const displayError = (e: string) => {
6464
store.status = 'error'
65-
console.error(e)
66-
error.value = e as string
65+
error.value = e
6766
store.contentStep = 0
67+
console.error(e)
6868
}
6969
try {
7070
const response = await fetch(store.selectedFaucet.url, {
@@ -74,7 +74,7 @@ const requestFaucet = async (address: string, amount: number, secret: string) =>
7474
},
7575
body: JSON.stringify({
7676
to: address,
77-
amount: amount.toString(),
77+
amount: amount * 1000000 + 'ugnot',
7878
captcha: secret,
7979
}),
8080
})
@@ -93,7 +93,7 @@ const requestFaucet = async (address: string, amount: number, secret: string) =>
9393
}
9494
} catch (e) {
9595
await minTimer
96-
displayError(e)
96+
displayError(e as string)
9797
}
9898
}
9999

src/components/ui/Recaptcha.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const siteKey = ref(import.meta.env.VITE_reCAPTCHA_SITE_KEY ?? '')
1010
const emit = defineEmits(['validation'])
1111
1212
const handleError = (res: string) => {
13-
emit('validation', { code: 'error', secret: res })
13+
emit('validation', { code: 'error', secret: res ?? 'error' })
1414
}
1515
1616
const handleSuccess = (res: string) => {

0 commit comments

Comments
 (0)