hel 1 year ago
parent
commit
23990c4f05
1 changed files with 10 additions and 10 deletions
  1. 10 10
      src/onchain/week3/randomWeek3.ts

+ 10 - 10
src/onchain/week3/randomWeek3.ts

@@ -49,7 +49,16 @@ async function startCheck(concurrency) {
       const randomPick = notDone[Math.floor(Math.random() * notDone.length)]
 
       const client = new InitiaClient(account.mnemonic, true)
-      if (randomPick === 2) {
+      if (randomPick === 1) {
+        console.log(`task6`)
+        const bool = await client.newBridge2BlackWings()
+        if (bool) {
+          await DBClient.instance.randomTask2.update({
+            where: { id: account.id },
+            data: { task1: 1 },
+          })
+        }
+      } else if (randomPick === 2) {
         console.log(`task2`)
         const bool = await client.newBridge2Noon()
         if (bool) {
@@ -97,15 +106,6 @@ async function startCheck(concurrency) {
             data: { task6: 1 },
           })
         }
-      } else if (randomPick === 1) {
-        console.log(`task6`)
-        const bool = await client.newBridge2BlackWings()
-        if (bool == `done`) {
-          await DBClient.instance.randomTask2.update({
-            where: { id: account.id },
-            data: { task1: 1 },
-          })
-        }
       }
     } catch (e) {
       console.log(e.message)