Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ const getAllChallenges = async (

console.log(`Found ${toDisburse.length} trending challenges to disburse`)
let possibleNodeSet: string[] = []
let possibleChallenges = []
let impossibleChallenges = []
let setToChallengeMap = new Map<string, any[]>()
const possibleChallenges = []
const impossibleChallenges = []
const setToChallengeMap = new Map<string, any[]>()

for (const challenge of toDisburse) {
console.log(`Trying challenge: ${JSON.stringify(challenge)}`)
Expand Down Expand Up @@ -287,7 +287,18 @@ const getAllChallenges = async (

const encodedUserId = challenge.user_id.toString()
const rewards = libs.Rewards
if (rewards === null) throw new Error('rewards object null')
if (rewards === null) {
throw new Error('rewards object null')
}
const solanaWeb3Manager = libs.solanaWeb3Manager
if (solanaWeb3Manager === null) {
throw new Error('solana web3manager not defined')
}

await solanaWeb3Manager.createUserBankIfNeeded({
feePayerOverride,
ethAddress: challenge.wallet
})

const args = {
challengeId: challenge.challenge_id,
Expand Down