Skip to content

Commit

Permalink
add missing await and check receipt status
Browse files Browse the repository at this point in the history
  • Loading branch information
yuetloo committed Jan 25, 2024
1 parent b70134e commit 6dd80f6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions contracts/cli/addRecipients.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,16 @@ async function main(args: any) {
JSON.stringify({
name: `recipient ${i}`,
description: `recipient ${i}`,
bannerImageHash: 'QmPAZJkV2TH2hmudpSwj8buxwiG1ckNa2ZbrPFop3Td5oD',
thumbnailImageHash: 'QmPAZJkV2TH2hmudpSwj8buxwiG1ckNa2ZbrPFop3Td5oD',
})
)
addRecipientTx.wait()
numAdded++
const receipt = await addRecipientTx.wait()
if (receipt.status === 1) {
numAdded++
} else {
console.log('Failed to add recipient', i)
}
}

console.log(`Added ${numAdded} test recipients`)
Expand Down

0 comments on commit 6dd80f6

Please sign in to comment.