MCPcopy Create free account
hub / github.com/BitVM/BitVM / interpret_withdrawer_status

Method interpret_withdrawer_status

bridge/src/graphs/peg_out.rs:1376–1389  ·  view source on GitHub ↗
(
        &self,
        peg_out_status: Option<&Result<TxStatus, esplora_client::Error>>,
    )

Source from the content-addressed store, hash-verified

1374 }
1375
1376 pub fn interpret_withdrawer_status(
1377 &self,
1378 peg_out_status: Option<&Result<TxStatus, esplora_client::Error>>,
1379 ) -> PegOutWithdrawerStatus {
1380 if let Some(peg_out_status) = peg_out_status {
1381 if peg_out_status.as_ref().is_ok_and(|status| status.confirmed) {
1382 PegOutWithdrawerStatus::PegOutComplete
1383 } else {
1384 PegOutWithdrawerStatus::PegOutWait
1385 }
1386 } else {
1387 PegOutWithdrawerStatus::PegOutNotStarted
1388 }
1389 }
1390
1391 pub async fn withdrawer_status(&self, client: &AsyncClient) -> PegOutWithdrawerStatus {
1392 let peg_out_status = match self.peg_out_transaction {

Callers 2

get_withdrawer_statusMethod · 0.80
withdrawer_statusMethod · 0.80

Calls 1

as_refMethod · 0.80

Tested by

no test coverage detected