Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bridge-proxy:Only failed transactions are returned #164

Merged
merged 12 commits into from
Feb 13, 2024
13 changes: 11 additions & 2 deletions bridge-proxy/src/bridge-proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,17 @@ pub trait BridgeProxyContract: config::ConfigModule {
}

#[callback]
fn failed_execution_callback(&self, tx: &EthTransactionPayment<Self::Api>) {
self.eth_failed_transaction_list().push_back(tx.clone());
fn failed_execution_callback(
&self,
#[call_result] result: ManagedAsyncCallResult<()>,
tx: &EthTransactionPayment<Self::Api>,
) {
match result {
ManagedAsyncCallResult::Ok(_) => {}
ManagedAsyncCallResult::Err(_) => {
self.eth_failed_transaction_list().push_back(tx.clone());
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if ManagedAsyncCallResult::Err(_) = result {
self.eth_failed_transaction_list().push_back(tx.clone());
}

}

#[endpoint(refundTransactions)]
Expand Down
Loading