@@ -17,7 +17,7 @@ use std::collections::HashSet;
1717/// capabilities can send this action to the eth provider.
1818///
1919/// Will be serialized and deserialized using `serde_json::to_vec` and `serde_json::from_slice`.
20- #[ derive( Debug , Serialize , Deserialize ) ]
20+ #[ derive( Clone , Debug , Serialize , Deserialize ) ]
2121pub enum EthAction {
2222 /// Subscribe to logs with a custom filter. ID is to be used to unsubscribe.
2323 /// Logs come in as alloy_rpc_types::pubsub::SubscriptionResults
@@ -70,7 +70,7 @@ pub enum EthResponse {
7070 Err ( EthError ) ,
7171}
7272
73- #[ derive( Debug , Serialize , Deserialize ) ]
73+ #[ derive( Debug , Serialize , Deserialize , PartialEq ) ]
7474pub enum EthError {
7575 /// provider module cannot parse message
7676 MalformedRequest ,
@@ -157,14 +157,17 @@ pub struct ProviderConfig {
157157
158158#[ derive( Clone , Debug , Deserialize , Serialize ) ]
159159pub enum NodeOrRpcUrl {
160- Node ( crate :: kernel_types:: KnsUpdate ) ,
160+ Node {
161+ kns_update : crate :: kernel_types:: KnsUpdate ,
162+ use_as_provider : bool , // for routers inside saved config
163+ } ,
161164 RpcUrl ( String ) ,
162165}
163166
164167impl std:: cmp:: PartialEq < str > for NodeOrRpcUrl {
165168 fn eq ( & self , other : & str ) -> bool {
166169 match self {
167- NodeOrRpcUrl :: Node ( kns ) => kns . name == other,
170+ NodeOrRpcUrl :: Node { kns_update , .. } => kns_update . name == other,
168171 NodeOrRpcUrl :: RpcUrl ( url) => url == other,
169172 }
170173 }
0 commit comments