From d5ab77ba2f72798a8e1072f96e361a745edd0c8d Mon Sep 17 00:00:00 2001 From: ron Date: Tue, 19 Nov 2024 21:23:55 +0800 Subject: [PATCH] Rename to InvalidPendingNonce & Cleanup --- bridges/snowbridge/pallets/outbound-queue-v2/src/lib.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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() {