Skip to content

Commit

Permalink
review fix: add display to all variants of CustomTokenError
Browse files Browse the repository at this point in the history
  • Loading branch information
shamardy committed Nov 11, 2024
1 parent 2ff5448 commit 36e28b5
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions mm2src/coins/lp_coins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4259,21 +4259,22 @@ pub enum CoinProtocol {

#[derive(Clone, Debug, Deserialize, Display, PartialEq, Serialize)]
pub enum CustomTokenError {
DuplicateTickerInConfig {
ticker_in_config: String,
},
DuplicateContractInConfig {
ticker_in_config: String,
},
#[display(
fmt = "Token with the same ticker already exists in coins configs, ticker in config: {}",
ticker_in_config
)]
DuplicateTickerInConfig { ticker_in_config: String },
#[display(
fmt = "Token with the same contract address already exists in coins configs, ticker in config: {}",
ticker_in_config
)]
DuplicateContractInConfig { ticker_in_config: String },
#[display(
fmt = "Token is already activated, ticker: {}, contract address: {}",
ticker,
contract_address
)]
TokenWithSameContractAlreadyActivated {
ticker: String,
contract_address: String,
},
TokenWithSameContractAlreadyActivated { ticker: String, contract_address: String },
}

impl CoinProtocol {
Expand Down

0 comments on commit 36e28b5

Please sign in to comment.