Add logs to on-create-bet

This commit is contained in:
Ian Philips 2022-09-15 08:07:42 -06:00
parent 733d206517
commit ada9fac343

View File

@ -127,6 +127,8 @@ const updateBettingStreak = async (
}) })
if (!result.txn) { if (!result.txn) {
log("betting streak bonus txn couldn't be made") log("betting streak bonus txn couldn't be made")
log('status:', result.status)
log('message:', result.message)
return return
} }
@ -214,7 +216,8 @@ const updateUniqueBettorsAndGiveCreatorBonus = async (
}) })
if (result.status != 'success' || !result.txn) { if (result.status != 'success' || !result.txn) {
log(`No bonus for user: ${contract.creatorId} - reason:`, result.status) log(`No bonus for user: ${contract.creatorId} - status:`, result.status)
log('message:', result.message)
} else { } else {
log(`Bonus txn for user: ${contract.creatorId} completed:`, result.txn?.id) log(`Bonus txn for user: ${contract.creatorId} completed:`, result.txn?.id)
await createUniqueBettorBonusNotification( await createUniqueBettorBonusNotification(