Skip to content

Commit

Permalink
Edit epoch number and title for discord
Browse files Browse the repository at this point in the history
  • Loading branch information
MicroProofs committed Sep 8, 2024
1 parent d79afdf commit f00eca0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/discord.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub async fn send_webhook(url: &str, block: &TunaBlock, tx_hash: &str) -> miette

let embed = CreateEmbed::new()
.description(format!(
"# [New Block Mined: #{}](https://cexplorer.io/tx/{})",
"### [New Block Mined: #{}](https://cexplorer.io/tx/{})",
block.number, tx_hash
))
.field("Epoch", epoch.to_string(), true)
Expand All @@ -37,6 +37,6 @@ fn calculate_epoch(block_number: u64) -> u64 {
if block_number <= 15 * 2016 {
block_number / 2016 + 1
} else {
(block_number - (15 * 2016)) / 504 + 16
(block_number - (15 * 2016 + 1)) / 504 + 16
}
}

0 comments on commit f00eca0

Please sign in to comment.