Skip to content

Commit

Permalink
revert to remove stale transaction_reord.rs code
Browse files Browse the repository at this point in the history
  • Loading branch information
zancas committed Apr 11, 2024
1 parent 9385e69 commit 29a3ffa
Showing 1 changed file with 1 addition and 39 deletions.
40 changes: 1 addition & 39 deletions zingolib/src/wallet/transaction_record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ use crate::wallet::notes;

use super::{
data::{OutgoingTxData, PoolNullifier},
notes::NoteRecordIdentifier,
traits::{DomainWalletExt, Recipient},
traits::DomainWalletExt,
*,
};

Expand Down Expand Up @@ -172,43 +171,6 @@ impl TransactionRecord {
self.total_orchard_value_spent,
]
}
pub fn get_received_note<D>(
&self,
index: u32,
) -> Option<
zcash_client_backend::wallet::ReceivedNote<
NoteRecordIdentifier,
zcash_client_backend::wallet::Note,
>,
>
where
D: DomainWalletExt + Sized,
D::Note: PartialEq + Clone,
D::Recipient: Recipient,
{
let note = D::to_notes_vec(self)
.iter()
.find(|note| *note.output_index() == Some(index));
note.and_then(|note| {
let txid = self.txid;
let zcb_note = note.to_zcb_note();
let note_record_reference = NoteRecordIdentifier {
txid,
pool: zcash_client_backend::PoolType::Shielded(zcb_note.protocol()),
index,
};
note.witnessed_position().map(|pos| {
zcash_client_backend::wallet::ReceivedNote::from_parts(
note_record_reference,
txid,
index as u16,
zcb_note,
zcash_primitives::zip32::Scope::External,
pos,
)
})
})
}
}
// read/write
impl TransactionRecord {
Expand Down

0 comments on commit 29a3ffa

Please sign in to comment.