From e336ab2e5e1e6d6cbfbe9c4072f2c3b141c2dacc Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs Date: Mon, 14 Sep 2026 11:55:59 +0300 Subject: [PATCH] feat: add Flare and Songbird native currency metadata MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit native_token_meta fell through to the ETH default for Flare (14), Songbird (19) and their Coston testnets, so every `amount` field on those chains rendered as ETH instead of FLR/SGB. Symbols and names match chainid.network, which the Sourcify runner already resolves against — this brings the Rust runner in line. Co-Authored-By: Claude Opus 5 (1M context) --- crates/clear-signing/src/render_shared.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crates/clear-signing/src/render_shared.rs b/crates/clear-signing/src/render_shared.rs index 374c773..fbaf6b1 100644 --- a/crates/clear-signing/src/render_shared.rs +++ b/crates/clear-signing/src/render_shared.rs @@ -23,6 +23,8 @@ pub(crate) fn chain_name(chain_id: u64) -> String { 42161 => "Arbitrum One".to_string(), 42170 => "Arbitrum Nova".to_string(), 43114 => "Avalanche".to_string(), + 14 => "Flare".to_string(), + 19 => "Songbird".to_string(), 59144 => "Linea".to_string(), 534352 => "Scroll".to_string(), 7777777 => "Zora".to_string(), @@ -81,6 +83,10 @@ pub(crate) fn native_token_meta(chain_id: u64) -> TokenMeta { 56 | 97 => ("BNB", "BNB"), 43114 | 43113 => ("AVAX", "Avalanche"), 250 => ("FTM", "Fantom"), + 14 => ("FLR", "Flare"), + 19 => ("SGB", "Songbird"), + 114 => ("C2FLR", "Coston2 Flare"), + 16 => ("CFLR", "Coston Flare"), 42161 | 421613 => ("ETH", "Ether"), 10 | 420 => ("ETH", "Ether"), 8453 | 84531 => ("ETH", "Ether"), @@ -432,6 +438,8 @@ mod tests { assert_eq!(native_token_meta(1).symbol, "ETH"); assert_eq!(native_token_meta(137).symbol, "MATIC"); assert_eq!(native_token_meta(56).symbol, "BNB"); + assert_eq!(native_token_meta(14).symbol, "FLR"); + assert_eq!(native_token_meta(19).symbol, "SGB"); assert_eq!(native_token_meta(99999).symbol, "ETH"); } @@ -439,6 +447,8 @@ mod tests { fn test_chain_name() { assert_eq!(chain_name(1), "Ethereum"); assert_eq!(chain_name(137), "Polygon"); + assert_eq!(chain_name(14), "Flare"); + assert_eq!(chain_name(19), "Songbird"); assert_eq!(chain_name(99999), "Chain 99999"); }