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)));
|
const names = Array.from(new Set(participants.map(p => p.name)));
|
||||||
for(const displayName of names) {
|
for(const displayName of names) {
|
||||||
await createContributionFor(displayName, meetingDetails)
|
const tx = createContributionFor(displayName, meetingDetails)
|
||||||
.then(tx => {
|
// if the contributor is not found we do not get a transaction object here
|
||||||
if (tx) {
|
if (tx) {
|
||||||
robot.logger.info(`[hubot-kredits] Contribution created: ${tx.hash}`);
|
robot.logger.info(`[hubot-kredits] Contribution created: ${tx.hash}`);
|
||||||
}
|
}
|
||||||
});
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user