Add display for SystemChain
@@ -2,6 +2,8 @@ use crate::wg_key::WgKey;
use arrayvec::ArrayString;
use clarity::Address;
use num256::Uint256;
+use std::fmt;
+use std::fmt::Display;
use std::hash::{Hash, Hasher};
use std::net::IpAddr;
use std::str::FromStr;
@@ -64,6 +66,16 @@ pub enum SystemChain {
Xdai,
}
+impl Display for SystemChain {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+ match self {
+ SystemChain::Ethereum => write!(f, "Ethereum"),
+ SystemChain::Rinkeby => write!(f, "Rinkeby"),
+ SystemChain::Xdai => write!(f, "Xday"),
+ }
+ }
+}
+
impl Default for SystemChain {
fn default() -> SystemChain {
SystemChain::Ethereum
