Skip to content

Commit 11fac8a

Browse files
committed
Merge branch 'rust-1.80'
2 parents a717448 + 961dad6 commit 11fac8a

38 files changed

+431
-727
lines changed

.ci/run-container-ci

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
# Copyright 2019 Shift Cryptosecurity AG
3-
# Copyright 2020 Shift Crypto AG
3+
# Copyright 2020-2024 Shift Crypto AG
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -25,7 +25,7 @@
2525
set -e
2626
set -x
2727

28-
CONTAINER=shiftcrypto/firmware_v2:39
28+
CONTAINER=shiftcrypto/firmware_v2:40
2929

3030
if [ "$1" == "pull" ] ; then
3131
docker pull "$CONTAINER"

src/rust/Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/rust/bitbox02-rust/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ bitcoin_hashes = { version = "0.14.0", default-features = false, features = ["sm
5757

5858
[dependencies.prost]
5959
# keep version in sync with tools/prost-build/Cargo.toml.
60-
version = "0.12.1"
60+
version = "0.13.1"
6161
default-features = false
62-
features = ["prost-derive"]
62+
features = ["derive"]
6363

6464
[features]
6565
ed25519 = [

src/rust/bitbox02-rust/src/backup.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ fn compute_checksum(
9292
if data.seed.len() != 32 {
9393
return Err(());
9494
}
95-
hasher.update(&padded_seed(&data.seed));
95+
hasher.update(padded_seed(&data.seed));
9696
hasher.update(data.birthdate.to_le_bytes());
9797
let padded_generator: [u8; 20] = {
9898
let mut result = [0u8; 20];

src/rust/bitbox02-rust/src/hww/api/bitcoin/bip143.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pub fn sighash(args: &Args) -> [u8; 32] {
4848
ctx.update(args.outpoint_hash);
4949
ctx.update(args.outpoint_index.to_le_bytes());
5050
// 5.
51-
ctx.update(&serialize_varint(args.sighash_script.len() as u64));
51+
ctx.update(serialize_varint(args.sighash_script.len() as u64));
5252
ctx.update(args.sighash_script);
5353
// 6.
5454
ctx.update(args.prevout_value.to_le_bytes());

src/rust/bitbox02-rust/src/hww/api/bitcoin/multisig.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,8 @@ pub async fn confirm_extended(
249249
/// - our designated xpub is actually ours (corresponds to the xpub of the currenty unlocked
250250
/// keystore).
251251
/// - no two xpubs are the same.
252+
///
252253
/// keypath: account-level keypath, e.g. m/48'/0'/10'/2'
253-
/// expected:_coin expected bip44 coin in the keypath.
254254
pub fn validate(multisig: &Multisig, keypath: &[u32]) -> Result<(), Error> {
255255
if multisig.xpubs.len() < 2 || multisig.xpubs.len() > MAX_SIGNERS {
256256
return Err(Error::InvalidInput);

src/rust/bitbox02-rust/src/hww/api/bitcoin/payment_request.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ fn compute_sighash(
125125
// recipientName
126126
hash_data_lenprefixed(&mut sighash, payment_request.recipient_name.as_bytes());
127127
// memos
128-
sighash.update(&serialize_varint(payment_request.memos.len() as u64));
128+
sighash.update(serialize_varint(payment_request.memos.len() as u64));
129129
for memo in payment_request.memos.iter() {
130130
match memo {
131131
Memo {

src/rust/bitbox02-rust/src/hww/api/error.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Shift Crypto AG
1+
// Copyright 2020-2024 Shift Crypto AG
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -113,8 +113,8 @@ impl core::convert::From<UnlockError> for Error {
113113
}
114114
}
115115

116-
impl core::convert::From<prost::DecodeError> for Error {
117-
fn from(_error: prost::DecodeError) -> Self {
116+
impl core::convert::From<prost::UnknownEnumValue> for Error {
117+
fn from(_error: prost::UnknownEnumValue) -> Self {
118118
Error::InvalidInput
119119
}
120120
}

src/rust/bitbox02-rust/src/workflow/cancel.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub fn set_result<R>(result_cell: &ResultCell<R>, result: R) {
4141
/// * `title` - title to show in the cancel confirm prompt.
4242
/// * `component` - component to process
4343
/// * `result_cell` - result var to synchronize the result on. Pass the same to `cancel` and
44-
/// `set_result`.
44+
/// `set_result`.
4545
pub async fn with_cancel<R>(
4646
title: &str,
4747
component: &mut bitbox02::ui::Component<'_>,

src/rust/rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[toolchain]
2-
channel = "1.79.0"
2+
channel = "1.80.0"

0 commit comments

Comments
 (0)