Implement UA encoding #18

Merged
pitmutt merged 5 commits from rav001 into dev040 2024-03-04 18:01:39 +00:00
1 changed files with 2 additions and 2 deletions
Showing only changes of commit 53a5b62b6b - Show all commits

View File

@ -326,8 +326,8 @@ pub extern "C" fn rust_wrapper_bech32decode(
out_len: &mut usize
) {
let input: String = marshall_from_haskell_var(input, input_len, RW);
let decodedBytes = bech32::decode(&input);
match decodedBytes {
let decoded_bytes = bech32::decode(&input);
match decoded_bytes {
Ok((hrp, bytes)) => {
let rd = RawData {hrp: hrp.as_bytes().to_vec(), bytes};
marshall_to_haskell_var(&rd, out, out_len, RW);