Skip to content

Commit 978ca23

Browse files
committed
Merge pull request #92 from 'murisi/expose-input-addresses'
2 parents 5670109 + e9ca8d9 commit 978ca23

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
run: echo "MASP_PARAMS=$(cargo run --release --example get-params-path --features directories)" >> $GITHUB_ENV
3030
- name: Cache MASP parameters
3131
id: cache-params
32-
uses: actions/cache@v3.3.2
32+
uses: actions/cache@v4
3333
with:
3434
path: ${{ env.MASP_PARAMS }}
3535
key: ${{ runner.os }}-params
@@ -131,6 +131,8 @@ jobs:
131131
image: rustlang/rust:nightly
132132
steps:
133133
- uses: actions/checkout@v3
134+
- name: Add target
135+
run: rustup toolchain install 1.81.0-x86_64-unknown-linux-gnu
134136
- name: Install cargo-audit
135137
run: cargo install cargo-audit
136138
- name: Cargo Audit

masp_primitives/src/transaction/components/sapling/builder.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,10 @@ impl<K> fees::InputView<(), K> for SpendDescriptionInfo<K> {
483483
fn key(&self) -> &K {
484484
&self.extsk
485485
}
486+
487+
fn address(&self) -> Option<PaymentAddress> {
488+
PaymentAddress::from_parts(self.diversifier, self.note.pk_d)
489+
}
486490
}
487491

488492
/// A struct containing the information required in order to construct a

masp_primitives/src/transaction/components/sapling/fees.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ pub trait InputView<NoteRef, Key> {
1616
fn asset_type(&self) -> AssetType;
1717
/// The spend/view key of the input being spent.
1818
fn key(&self) -> &Key;
19+
/// The payment address of this input
20+
fn address(&self) -> Option<PaymentAddress>;
1921
}
2022

2123
/// A trait that provides a minimized view of a Sapling conversion suitable for use in

0 commit comments

Comments
 (0)