|
@@ -4,7 +4,7 @@ import { DBClient } from '../singletons'
|
|
|
import { Status } from '../models/Status'
|
|
|
|
|
|
export async function faucetAccount(address: string) {
|
|
|
- const client = getAxiosClient(false)
|
|
|
+ const client = getAxiosClient(true)
|
|
|
const altcha = await getAltchaPayload(client)
|
|
|
const hCaptcha = await solveHCaptcha(address)
|
|
|
try {
|
|
@@ -25,11 +25,13 @@ export async function faucetAccount(address: string) {
|
|
|
}
|
|
|
|
|
|
async function startFaucet(concurrency = 10) {
|
|
|
- const accounts = await DBClient.instance.account.findMany({
|
|
|
+ const accountsRaw = await DBClient.instance.account.findMany({
|
|
|
where: {
|
|
|
status: Status.Inited,
|
|
|
},
|
|
|
})
|
|
|
+ const accounts = accountsRaw
|
|
|
+ // .filter(account => account.id)
|
|
|
await forEachAsync(accounts, concurrency, async (account, index) => {
|
|
|
console.log(`${index}/${accounts.length}: processing ${account.address}`)
|
|
|
try {
|