diff --git a/src/messaging/component.cairo b/src/messaging/component.cairo index acf517f..136067c 100644 --- a/src/messaging/component.cairo +++ b/src/messaging/component.cairo @@ -270,7 +270,9 @@ mod messaging_cpt { ); assert( - self.sn_to_appc_messages.read(message_hash) == MessageToAppchainStatus::Pending(nonce), + self + .sn_to_appc_messages + .read(message_hash) == MessageToAppchainStatus::Pending(nonce), errors::NO_MESSAGE_TO_CANCEL ); @@ -312,12 +314,15 @@ mod messaging_cpt { // We can't have the detail of the message here, so we emit a dummy event // with at least the message hash. - self.emit(MessageToStarknetReceived { - message_hash: msg_hash, - from: 0.try_into().unwrap(), - to: 0.try_into().unwrap(), - payload: array![].span() - }); + self + .emit( + MessageToStarknetReceived { + message_hash: msg_hash, + from: 0.try_into().unwrap(), + to: 0.try_into().unwrap(), + payload: array![].span() + } + ); i += 1; }; @@ -398,7 +403,9 @@ mod messaging_cpt { // On the L1, they use the Fee in front of the message hash, not the nonce. // Here, we have an enum to explicitly indicate that the message is sealed. - self.sn_to_appc_messages.write(message_hash, MessageToAppchainStatus::Sealed); + self + .sn_to_appc_messages + .write(message_hash, MessageToAppchainStatus::Sealed); self .emit( diff --git a/src/messaging/tests/test_messaging.cairo b/src/messaging/tests/test_messaging.cairo index 2df7d84..ca7707e 100644 --- a/src/messaging/tests/test_messaging.cairo +++ b/src/messaging/tests/test_messaging.cairo @@ -193,10 +193,7 @@ fn sn_to_appchain_messages_ok() { from_address: from, to_address: to, :selector, payload: payload.span(), nonce: 0 ); let is_pending_before = mock.sn_to_appchain_messages(message_hash); - assert( - is_pending_before == MessageToAppchainStatus::NotSent, - 'Should not be pending before' - ); + assert(is_pending_before == MessageToAppchainStatus::NotSent, 'Should not be pending before'); snf::start_cheat_caller_address(from, from); let (message_hash, nonce) = mock.send_message_to_appchain(to, selector, payload.span());