Add comment when tx is undefined
We createContributionFor() simply returns if no contributor is found.
This commit is contained in:
parent
7f653f23ce
commit
60ed697460
@ -74,12 +74,11 @@ module.exports = async function(robot, kredits) {
|
||||
}
|
||||
const names = Array.from(new Set(participants.map(p => p.name)));
|
||||
for(const displayName of names) {
|
||||
await createContributionFor(displayName, meetingDetails)
|
||||
.then(tx => {
|
||||
if (tx) {
|
||||
robot.logger.info(`[hubot-kredits] Contribution created: ${tx.hash}`);
|
||||
}
|
||||
});
|
||||
const tx = createContributionFor(displayName, meetingDetails)
|
||||
// if the contributor is not found we do not get a transaction object here
|
||||
if (tx) {
|
||||
robot.logger.info(`[hubot-kredits] Contribution created: ${tx.hash}`);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user