Refactor transaction 'id' property to 'txid'

This commit is contained in:
thunderbiscuit 2021-11-12 12:29:53 -05:00
parent a68a8bee7d
commit d53eb793ea
2 changed files with 3 additions and 3 deletions

View File

@ -70,7 +70,7 @@ dictionary TransactionDetails {
u64? fees; u64? fees;
u64 received; u64 received;
u64 sent; u64 sent;
string id; string txid;
}; };
dictionary Confirmation { dictionary Confirmation {

View File

@ -66,7 +66,7 @@ pub struct TransactionDetails {
pub fees: Option<u64>, pub fees: Option<u64>,
pub received: u64, pub received: u64,
pub sent: u64, pub sent: u64,
pub id: String, pub txid: String,
} }
type Confirmation = ConfirmationTime; type Confirmation = ConfirmationTime;
@ -86,7 +86,7 @@ impl From<&bdk::TransactionDetails> for TransactionDetails {
fn from(x: &bdk::TransactionDetails) -> TransactionDetails { fn from(x: &bdk::TransactionDetails) -> TransactionDetails {
TransactionDetails { TransactionDetails {
fees: x.fee, fees: x.fee,
id: x.txid.to_string(), txid: x.txid.to_string(),
received: x.received, received: x.received,
sent: x.sent, sent: x.sent,
} }