Skip to content

Commit

Permalink
feat: add From derive to Currency enum
Browse files Browse the repository at this point in the history
This update adds the `From` derive to the `Currency` enum to enable more convenient type conversions. It facilitates smoother integration by allowing conversions directly from component types.
  • Loading branch information
shuhuiluo committed Nov 6, 2024
1 parent f94c2a1 commit e2c0b6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/entities/currency.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::prelude::*;
use alloy_primitives::ChainId;
use derive_more::Deref;
use derive_more::{Deref, From};

#[derive(Clone, Debug, Hash, PartialEq, Eq)]
#[derive(Clone, Debug, Hash, PartialEq, Eq, From)]
pub enum Currency {
NativeCurrency(Ether),
Token(Token),
Expand Down

0 comments on commit e2c0b6f

Please sign in to comment.