Shawn Lu пре 1 година
родитељ
комит
6024f91fbe
1 измењених фајлова са 9 додато и 13 уклоњено
  1. 9 13
      src/faucet/faucet.ts

+ 9 - 13
src/faucet/faucet.ts

@@ -79,7 +79,7 @@ async function faucetLunch(concurrency: number = 8) {
         account.xrpPrivateKey = xrpl.Wallet.generate().seed
         account.xrpPrivateKey = xrpl.Wallet.generate().seed
       if (!account.duid) account.duid = uuidv4().toUpperCase()
       if (!account.duid) account.duid = uuidv4().toUpperCase()
       await polly()
       await polly()
-        .waitAndRetry(3)
+        .waitAndRetry(2)
         .executeForPromise(async () => {
         .executeForPromise(async () => {
           const key = new MnemonicKey({ mnemonic: account.mnemonic })
           const key = new MnemonicKey({ mnemonic: account.mnemonic })
           const evmWallet = new ethers.Wallet(key.privateKey.toString('hex'))
           const evmWallet = new ethers.Wallet(key.privateKey.toString('hex'))
@@ -120,18 +120,14 @@ async function faucetLunch(concurrency: number = 8) {
             },
             },
           )
           )
           console.log(`${index}: register done`)
           console.log(`${index}: register done`)
-          try {
-            const airdropResp = await client.post(
-              'https://api.lunchlunch.xyz/v1/dish/submit-action/airdrop',
-              {
-                dishId: 42,
-              },
-            )
-            console.log(`${index}: airdrop done`)
-          } catch (e) {
-            console.log('airdrop failed', e)
-            throw e
-          }
+
+          const airdropResp = await client.post(
+            'https://api.lunchlunch.xyz/v1/dish/submit-action/airdrop',
+            {
+              dishId: 42,
+            },
+          )
+          console.log(`${index}: airdrop done`)
         })
         })
       await DBClient.instance.account.update({
       await DBClient.instance.account.update({
         where: { id: account.id },
         where: { id: account.id },