mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-12-02 03:43:55 +01:00
Onion V3 address consistency (#309)
* initial addition of ov3 * move libwallet address functions into OnionV3Address type * incorporate OnionV3 type where possible * factor out manual dalek pubkey manipulations * corrections due to test failures * change json-rpc example to use ov3 for payment proof recipient address
This commit is contained in:
@@ -24,6 +24,8 @@ use libwallet::{InitTxArgs, Slate};
|
||||
use std::thread;
|
||||
use std::time::Duration;
|
||||
|
||||
use grin_wallet_util::OnionV3Address;
|
||||
|
||||
#[macro_use]
|
||||
mod common;
|
||||
use common::{clean_output_dir, create_wallet_proxy, setup};
|
||||
@@ -80,7 +82,7 @@ fn payment_proofs_test_impl(test_dir: &'static str) -> Result<(), libwallet::Err
|
||||
Ok(())
|
||||
})?;
|
||||
|
||||
let address = address.unwrap();
|
||||
let address = OnionV3Address::from_bytes(address.as_ref().unwrap().to_bytes());
|
||||
println!("Public address is: {:?}", address);
|
||||
let amount = 60_000_000_000;
|
||||
let mut slate = Slate::blank(1);
|
||||
@@ -93,14 +95,14 @@ fn payment_proofs_test_impl(test_dir: &'static str) -> Result<(), libwallet::Err
|
||||
max_outputs: 500,
|
||||
num_change_outputs: 1,
|
||||
selection_strategy_is_use_all: true,
|
||||
payment_proof_recipient_address: Some(address),
|
||||
payment_proof_recipient_address: Some(address.clone()),
|
||||
..Default::default()
|
||||
};
|
||||
let slate_i = sender_api.init_send_tx(m, args)?;
|
||||
|
||||
assert_eq!(
|
||||
slate_i.payment_proof.as_ref().unwrap().receiver_address,
|
||||
address
|
||||
address.to_ed25519()?,
|
||||
);
|
||||
println!(
|
||||
"Sender addr: {:?}",
|
||||
|
||||
Reference in New Issue
Block a user