Skip to content

Commit c0bad22

Browse files
authored
Merge pull request #91 from tcharding/03-11-backport-89
backport: Add missing transaction categories
2 parents f81fec1 + 72f80e2 commit c0bad22

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

types/src/model/wallet.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,16 @@ pub enum AddressPurpose {
2727
/// The category of a transaction.
2828
#[derive(Copy, Clone, PartialEq, Eq, Debug, Deserialize, Serialize)]
2929
pub enum TransactionCategory {
30-
/// Transaction is a send.
30+
/// Transactions sent.
3131
Send,
32-
/// Transactions is a receive.
32+
/// Non-coinbase transactions received.
3333
Receive,
34+
/// Coinbase transactions received with more than 100 confirmations.
35+
Generate,
36+
/// Coinbase transactions received with 100 or fewer confirmations.
37+
Immature,
38+
/// Orphaned coinbase transactions received.
39+
Orphan,
3440
}
3541

3642
/// Whether this transaction can be RBF'ed.

types/src/v17/wallet/into.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ impl TransactionCategory {
3737
match self {
3838
V::Send => M::Send,
3939
V::Receive => M::Receive,
40+
V::Generate => M::Generate,
41+
V::Immature => M::Immature,
42+
V::Orphan => M::Orphan,
4043
}
4144
}
4245
}

types/src/v17/wallet/mod.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,16 @@ pub enum AddressPurpose {
3838
#[derive(Copy, Clone, PartialEq, Eq, Debug, Deserialize, Serialize)]
3939
#[serde(rename_all = "lowercase")]
4040
pub enum TransactionCategory {
41-
/// Transaction is a send.
41+
/// Transactions sent.
4242
Send,
43-
/// Transactions is a receive.
43+
/// Non-coinbase transactions received.
4444
Receive,
45+
/// Coinbase transactions received with more than 100 confirmations.
46+
Generate,
47+
/// Coinbase transactions received with 100 or fewer confirmations.
48+
Immature,
49+
/// Orphaned coinbase transactions received.
50+
Orphan,
4551
}
4652

4753
/// Whether this transaction can be RBF'ed.

0 commit comments

Comments
 (0)