Skip to content

Commit

Permalink
fix: map size of btc sign request
Browse files Browse the repository at this point in the history
  • Loading branch information
renfengshi committed Mar 18, 2024
1 parent 2f46ed0 commit 54e0aab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libs/ur-registry-ffi/src/bitcoin/btc_sign_request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ mod tests {
"#;
let origin = "BTC Wallet";

let expect_result = "{\"cbor\":\"a401d825507afd5e09926743fba02e08c4a09417ec025348656c6c6f2063727970746f20776f726c642103010481d90130a2018a182cf500f500f500f400f4021af23f9fd2058178213158357674663446654b3865386e76685675764267374b686b657a375370336264066a4254432057616c6c6574\",\"type\":\"btc-sign-request\"}";
let expect_result = "{\"cbor\":\"a601d825507afd5e09926743fba02e08c4a09417ec025348656c6c6f2063727970746f20776f726c642103010481d90130a2018a182cf500f500f500f400f4021af23f9fd2058178213158357674663446654b3865386e76685675764267374b686b657a375370336264066a4254432057616c6c6574\",\"type\":\"btc-sign-request\"}";

assert_eq!(
expect_result,
Expand Down
2 changes: 1 addition & 1 deletion libs/ur-registry/src/bitcoin/btc_sign_request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl RegistryItem for BtcSignRequest {

impl MapSize for BtcSignRequest {
fn map_size(&self) -> u64 {
let mut size = 2;
let mut size = 4;
if self.addresses.is_some() {
size += 1;
}
Expand Down

0 comments on commit 54e0aab

Please sign in to comment.