|
@@ -28,19 +28,23 @@ async function startCheck(concurrency) {
|
|
|
// const account = chunked[0]
|
|
|
const toAddress = account[3].address
|
|
|
console.log(`toAddress:`, toAddress, concurrency)
|
|
|
- for (let i = 0; i < 3; i++) {
|
|
|
- const client = new InitiaClient(account[i].mnemonic, true)
|
|
|
- await client.transferAllGas(toAddress)
|
|
|
+ try {
|
|
|
+ for (let i = 0; i < 3; i++) {
|
|
|
+ const client = new InitiaClient(account[i].mnemonic, true)
|
|
|
+ await client.transferAllGas(toAddress)
|
|
|
+ }
|
|
|
+ // const client = new InitiaClient(account.mnemonic, true)
|
|
|
+ // const gasGot = await client.gasGot()
|
|
|
+ // if (!gasGot) {
|
|
|
+ // console.log(`gas got:`, gasGot)
|
|
|
+ await DBClient.instance.account.updateMany({
|
|
|
+ where: { id: { in: account.map(item => item.id) } },
|
|
|
+ data: { status: 900 },
|
|
|
+ //可能领过还没到账的
|
|
|
+ })
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e.response)
|
|
|
}
|
|
|
- // const client = new InitiaClient(account.mnemonic, true)
|
|
|
- // const gasGot = await client.gasGot()
|
|
|
- // if (!gasGot) {
|
|
|
- // console.log(`gas got:`, gasGot)
|
|
|
- await DBClient.instance.account.updateMany({
|
|
|
- where: { id: { in: account.map(item => item.id) } },
|
|
|
- data: { status: 900 },
|
|
|
- //可能领过还没到账的
|
|
|
- })
|
|
|
// return
|
|
|
})
|
|
|
}
|