From 6edd596b46ee79a5fef2932499349eba3a8cdc00 Mon Sep 17 00:00:00 2001 From: Michael Jeffrey Date: Tue, 3 Dec 2024 15:52:09 -0700 Subject: [PATCH] handle success case first --- mobile_packet_verifier/src/burner.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/mobile_packet_verifier/src/burner.rs b/mobile_packet_verifier/src/burner.rs index 661a5282a..120b8cda9 100644 --- a/mobile_packet_verifier/src/burner.rs +++ b/mobile_packet_verifier/src/burner.rs @@ -57,6 +57,16 @@ where tracing::info!(%total_dcs, %payer, "Burning DC"); let txn = self.solana.make_burn_transaction(&payer, total_dcs).await?; match self.solana.submit_transaction(&txn).await { + Ok(()) => { + handle_transaction_success( + pool, + payer, + total_dcs, + sessions, + &self.valid_sessions, + ) + .await?; + } Err(err) => { let span = tracing::info_span!( "txn_confirmation", @@ -73,16 +83,6 @@ where .instrument(span), ); } - Ok(()) => { - handle_transaction_success( - pool, - payer, - total_dcs, - sessions, - &self.valid_sessions, - ) - .await?; - } } }