diff --git a/bridges/snowbridge/pallets/outbound-queue-v2/src/lib.rs b/bridges/snowbridge/pallets/outbound-queue-v2/src/lib.rs index 85745101e2f5..a400193f3d27 100644 --- a/bridges/snowbridge/pallets/outbound-queue-v2/src/lib.rs +++ b/bridges/snowbridge/pallets/outbound-queue-v2/src/lib.rs @@ -185,7 +185,7 @@ pub mod pallet { /// Invalid Gateway InvalidGateway, /// No pending nonce - PendingNonceNotExist, + InvalidPendingNonce, } /// Messages to be committed in the current block. This storage value is killed in @@ -274,9 +274,8 @@ pub mod pallet { ensure!(T::GatewayAddress::get() == envelope.gateway, Error::::InvalidGateway); let nonce = envelope.nonce; - ensure!(>::contains_key(nonce), Error::::PendingNonceNotExist); - let order = >::get(nonce).ok_or(Error::::PendingNonceNotExist)?; + let order = >::get(nonce).ok_or(Error::::InvalidPendingNonce)?; // No fee for governance order if !order.fee.is_zero() {