Skip to content

Commit

Permalink
Merge pull request #308 from paritytech/yuri/subscan-links
Browse files Browse the repository at this point in the history
Reintroducing subscan links, for supported networks
  • Loading branch information
mutantcornholio authored Jun 20, 2023
2 parents ef23c76 + 5d85ac6 commit e702811
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/bot/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,14 @@ bot.on("Room.timeline", (event: mSDK.MatrixEvent) => {
return;
}

sendMessage(
roomId,
`Sent ${sender} ${convertBnAmountToNumber(dripAmount)} ${networkData.currency}s. Extrinsic hash: [${
res.hash
}]()`,
);
let message = `Sent ${sender} ${convertBnAmountToNumber(dripAmount)} ${networkData.currency}s. `;
if (networkData.explorer !== null) {
message += `Extrinsic hash: [${res.hash}](${networkData.explorer}/${res.hash})`;
} else {
message += `Extrinsic hash: ${res.hash}`;
}

sendMessage(roomId, message);
})
.catch((e) => {
sendMessage(roomId, "An unexpected error occurred, please check the server logs");
Expand Down

0 comments on commit e702811

Please sign in to comment.