Transaction creation updates #78

Merged
pitmutt merged 10 commits from rav001 into dev040 2024-05-02 19:59:26 +00:00
Showing only changes of commit c7f2bca2c4 - Show all commits

View file

@ -1779,12 +1779,13 @@ pub extern "C" fn rust_wrapper_create_transaction(
} }
}, },
4 => { 4 => {
let sk = SpendingKey::from_bytes(output.ovk[0..32].try_into().unwrap()).unwrap(); //let sk = SpendingKey::from_bytes(output.ovk[0..32].try_into().unwrap()).unwrap();
let ovk = if output.chg { //let ovk = if output.chg {
Some(FullViewingKey::from(&sk).to_ovk(Scope::Internal)) //Some(FullViewingKey::from(&sk).to_ovk(Scope::Internal))
}else { //} else {
Some(FullViewingKey::from(&sk).to_ovk(Scope::External)) //Some(FullViewingKey::from(&sk).to_ovk(Scope::External))
}; //};
let ovk = None;
let recipient = OrchardAddress::from_raw_address_bytes(&to_array(output.to)).unwrap(); let recipient = OrchardAddress::from_raw_address_bytes(&to_array(output.to)).unwrap();
let val = output.amt; let val = output.amt;
let memo = MemoBytes::from_bytes(&output.memo).unwrap(); let memo = MemoBytes::from_bytes(&output.memo).unwrap();