port zcashlc_is_valid_transparent_address

This commit is contained in:
Francisco Gindre 2020-11-24 19:52:13 -03:00
parent 4ddbe52f5d
commit 0af6c3c968
1 changed files with 2 additions and 2 deletions

View File

@ -457,7 +457,7 @@ pub unsafe extern "C" fn zcashlc_is_valid_shielded_address(address: *const c_cha
let res = catch_panic(|| {
let addr = CStr::from_ptr(address).to_str()?;
match RecipientAddress::from_str(&addr) {
match RecipientAddress::decode(&NETWORK, &addr) {
Some(addr) => match addr {
RecipientAddress::Shielded(_) => Ok(true),
RecipientAddress::Transparent(_) => Ok(false),
@ -475,7 +475,7 @@ pub unsafe extern "C" fn zcashlc_is_valid_transparent_address(address: *const c_
let res = catch_panic(|| {
let addr = CStr::from_ptr(address).to_str()?;
match RecipientAddress::from_str(&addr) {
match RecipientAddress::decode(&NETWORK, &addr) {
Some(addr) => match addr {
RecipientAddress::Shielded(_) => Ok(false),
RecipientAddress::Transparent(_) => Ok(true),