From 5a4ad295e6d31fafa41baa89d9d5ec6602cbd5c0 Mon Sep 17 00:00:00 2001 From: Atif Nazir Date: Mon, 12 Oct 2026 18:41:27 -0700 Subject: [PATCH] Write MWEB peg-in and fee-bumped as on sochain.com --- CHANGELOG.md | 3 ++- src/commands.rs | 10 ++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 112a3fd..6c2ef77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,8 @@ names, environment variables, exit codes, error codes, and the shape of ### Changed -- Transaction kinds use their usual names: CoinJoin, Lightning and MWEB. +- Transaction kinds are written as on sochain.com, such as CoinJoin, + Lightning close, MWEB peg-in and fee-bumped. ## [0.1.1] - 2026-10-12 diff --git a/src/commands.rs b/src/commands.rs index 4c8508b..081f7bb 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -1207,9 +1207,14 @@ fn show_chart(out: &mut dyn Write, n: Network, r: Chart, last: usize) -> Result< Ok(()) } -/// A transaction kind as words, with names in their usual casing: +/// A transaction kind as words, written as sochain.com writes it: /// `coinjoin` is `CoinJoin`, `lightning_close` is `Lightning close`. fn kind_name(kind: &str) -> String { + match kind { + "mweb_peg_in" => return "MWEB peg-in".into(), + "fee_bumped" => return "fee-bumped".into(), + _ => {} + } kind.split('_') .map(|w| match w { "coinjoin" => "CoinJoin", @@ -1549,7 +1554,8 @@ mod tests { fn names_transaction_kinds() { assert_eq!(kind_name("coinjoin"), "CoinJoin"); assert_eq!(kind_name("lightning_close"), "Lightning close"); - assert_eq!(kind_name("mweb_peg_in"), "MWEB peg in"); + assert_eq!(kind_name("mweb_peg_in"), "MWEB peg-in"); + assert_eq!(kind_name("fee_bumped"), "fee-bumped"); assert_eq!(kind_name("batch_payout"), "batch payout"); assert_eq!(kind_name("payment"), "payment"); }