Convert the FeaturedAddress tuple to a struct

Not only did we already have multiple booleans in it, yet it theoretically
could expand in the future. Not only is this more explicit, it actually cleans
some existing code.
This commit is contained in:
Luke Parker
2023-01-07 05:37:43 -05:00
parent 7b0b8a20ec
commit 4be3290e40
5 changed files with 93 additions and 33 deletions

View File

@@ -106,7 +106,10 @@ impl Monero {
spend: dfg::EdwardsPoint,
subaddress: Option<SubaddressIndex>,
) -> MoneroAddress {
self.view_pair(spend).address(Network::Mainnet, AddressSpec::Featured(subaddress, None, true))
self.view_pair(spend).address(
Network::Mainnet,
AddressSpec::Featured { subaddress, payment_id: None, guaranteed: true },
)
}
fn scanner(&self, spend: dfg::EdwardsPoint) -> Scanner {