diff --git a/CHANGELOG.md b/CHANGELOG.md index 033d1ba..37c89cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ ### Improvements +- (command) [#45](https://github.com/evmos/proposer/pull/45) Update testnet Mintscan link and allow non-rc versions. - (all) [#44](https://github.com/evmos/proposer/pull/44) Minor improvements and updated README. - (command) [#40](https://github.com/evmos/proposer/pull/40) Improve handling of Commonwealth info. - (block) [#39](https://github.com/evmos/proposer/pull/39) Round upgrade height to nearest 500. diff --git a/src/proposal.rs b/src/proposal.rs index a606c4c..f6b059d 100644 --- a/src/proposal.rs +++ b/src/proposal.rs @@ -44,15 +44,15 @@ fn get_height_with_link(network: Network, height: u64) -> String { let height_with_commas = height.to_formatted_string(&num_format::Locale::en); match network { Network::LocalNode => format!( - "[{}](https://www.mintscan.io/evmos/blocks/{})", + "[{}](https://mintscan.io/evmos/blocks/{})", height_with_commas, height ), Network::Mainnet => format!( - "[{}](https://www.mintscan.io/evmos/blocks/{})", + "[{}](https://mintscan.io/evmos/blocks/{})", height_with_commas, height ), Network::Testnet => format!( - "[{}](https://testnet.mintscan.io/evmos-testnet/blocks/{})", + "[{}](https://mintscan.io/evmos-testnet/blocks/{})", height_with_commas, height ), } diff --git a/src/version.rs b/src/version.rs index a49d8b6..47a4194 100644 --- a/src/version.rs +++ b/src/version.rs @@ -16,7 +16,7 @@ pub fn is_valid_version(version: &str) -> bool { pub fn is_valid_version_for_network(network: Network, target_version: &str) -> bool { let re = match network { Network::LocalNode => Regex::new(r"^v\d+\.\d{1}\.\d+(-rc\d+)*$").unwrap(), - Network::Testnet => Regex::new(r"^v\d+\.\d{1}\.\d+-rc\d+$").unwrap(), + Network::Testnet => Regex::new(r"^v\d+\.\d{1}\.\d+(-rc\d+)*$").unwrap(), Network::Mainnet => Regex::new(r"^v\d+\.\d{1}\.\d+$").unwrap(), }; @@ -67,7 +67,7 @@ mod tests { #[test] fn test_is_valid_target_version_testnet_fail() { assert_eq!( - is_valid_version_for_network(network::Network::Testnet, "v14.0.0",), + is_valid_version_for_network(network::Network::Testnet, "v14.00",), false ); }