Browse Source

contract/money: Add missing error to the error enum

parazyd 2 years ago
parent
commit
b498847676
1 changed files with 5 additions and 1 deletions
  1. 5 1
      src/contract/money/src/error.rs

+ 5 - 1
src/contract/money/src/error.rs

@@ -136,6 +136,9 @@ pub enum MoneyError {
     #[error("No inputs in fee call")]
     #[error("No inputs in fee call")]
     FeeMissingInputs,
     FeeMissingInputs,
 
 
+    #[error("Insufficient fee paid")]
+    InsufficientFee,
+
     // TODO: This should catch-all (TransferMerkle../SwapMerkle...)
     // TODO: This should catch-all (TransferMerkle../SwapMerkle...)
     #[error("Coin merkle root not found")]
     #[error("Coin merkle root not found")]
     CoinMerkleRootNotFound,
     CoinMerkleRootNotFound,
@@ -182,7 +185,8 @@ impl From<MoneyError> for ContractError {
             MoneyError::PoWRewardExtendsUnknownFork => Self::Custom(36),
             MoneyError::PoWRewardExtendsUnknownFork => Self::Custom(36),
             MoneyError::PoWRewardErroneousVrfProof => Self::Custom(37),
             MoneyError::PoWRewardErroneousVrfProof => Self::Custom(37),
             MoneyError::FeeMissingInputs => Self::Custom(38),
             MoneyError::FeeMissingInputs => Self::Custom(38),
-            MoneyError::CoinMerkleRootNotFound => Self::Custom(39),
+            MoneyError::InsufficientFee => Self::Custom(39),
+            MoneyError::CoinMerkleRootNotFound => Self::Custom(40),
         }
         }
     }
     }
 }
 }