Shawn Lu 1 gadu atpakaļ
vecāks
revīzija
3fe2ad1b9a
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      src/faucet/faucet.ts

+ 2 - 2
src/faucet/faucet.ts

@@ -20,7 +20,7 @@ https://faucet-api.initiation-1.initia.xyz/status/${passportWallet.address}`)
         availableFrom: new Date(new Date().getTime() + 24 * 60 * 60 * 1000),
       },
     })
-    throw new Error('score not qualified')
+    throw new Error(`score ${statusResp.data.passport_score} not qualified`)
   }
   if (statusResp.data.ms_before_next > 0) {
     // 在 cd 中重置 cd 时间
@@ -32,7 +32,7 @@ https://faucet-api.initiation-1.initia.xyz/status/${passportWallet.address}`)
         ),
       },
     })
-    throw new Error('still in cooldown')
+    throw new Error(`still in cooldown: ${statusResp.data.ms_before_next}`)
   }
 
   const passportChallengeResp = await client.post(