Skip to content

Commit

Permalink
Merge branch 'multisig-pkscript'
Browse files Browse the repository at this point in the history
  • Loading branch information
benma committed Nov 2, 2023
2 parents 488b123 + 4f7a1e3 commit 0b92aca
Show file tree
Hide file tree
Showing 12 changed files with 204 additions and 439 deletions.
3 changes: 0 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ set(DBB-FIRMWARE-SOURCES
${CMAKE_SOURCE_DIR}/src/workflow/blocking.c
${CMAKE_SOURCE_DIR}/src/workflow/idle_workflow.c
${CMAKE_SOURCE_DIR}/src/workflow/orientation_screen.c
${CMAKE_SOURCE_DIR}/src/apps/btc/btc_common.c
${CMAKE_SOURCE_DIR}/src/queue.c
${CMAKE_SOURCE_DIR}/src/usb/usb_processing.c
)
Expand Down Expand Up @@ -389,8 +388,6 @@ add_custom_target(rust-bindgen
--rustified-enum simple_type_t
--rustified-enum multisig_script_type_t
--rustified-enum output_type_t
--allowlist-function btc_common_pkscript_from_payload
--allowlist-function btc_common_pkscript_from_multisig
--allowlist-var MAX_VARINT_SIZE
--allowlist-var MAX_PK_SCRIPT_SIZE
--allowlist-function reboot
Expand Down
71 changes: 0 additions & 71 deletions src/apps/btc/btc_common.c

This file was deleted.

61 changes: 0 additions & 61 deletions src/apps/btc/btc_common.h

This file was deleted.

6 changes: 1 addition & 5 deletions src/rust/bitbox02-rust/src/hww/api/bitcoin/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,7 @@ impl Payload {
let script_type =
pb::btc_script_config::multisig::ScriptType::from_i32(multisig.script_type)
.ok_or(Error::InvalidInput)?;
let script = bitbox02::app_btc::pkscript_from_multisig(
&multisig::convert_multisig(multisig)?,
keypath_change,
keypath_address,
)?;
let script = multisig::pkscript(multisig, keypath_change, keypath_address)?;
let payload_p2wsh = Payload {
data: Sha256::digest(&script).to_vec(),
output_type: BtcOutputType::P2wsh,
Expand Down
Loading

0 comments on commit 0b92aca

Please sign in to comment.