Skip to content

Commit 0c70e24

Browse files
committed
f
1 parent 06aaa6b commit 0c70e24

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

crates/erc20_payment_lib/src/transaction.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -940,11 +940,12 @@ pub async fn find_receipt_extended(
940940
chain_tx_dao.priority_fee = tx.max_priority_fee_per_gas.map(|x| x.to_string());
941941
chain_tx_dao.fee_paid = (gas_used * effective_gas_price).to_string();
942942

943-
chain_tx_dao.method = "N/A".to_string();
944-
if tx.input.0.len() >= 4 {
943+
chain_tx_dao.method = if tx.input.0.len() >= 4 {
945944
// extract method
946-
chain_tx_dao.method = format!("0x{}", hex::encode(&tx.input.0[0..4]));
947-
}
945+
format!("0x{}", hex::encode(&tx.input.0[0..4]))
946+
} else {
947+
"N/A".to_string()
948+
};
948949

949950
//todo: move to lazy static
950951
let erc20_transfer_event_signature: H256 =

0 commit comments

Comments
 (0)