diff --git a/CHANGELOG.md b/CHANGELOG.md index bf05a41c8..4eda90891 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ customers cannot upgrade their bootloader, its changes are recorded separately. ### [Unreleased] - Update manufacturer HID descriptor to bitbox.swiss +- Ethereum: remove deprecated Goerli network ### 9.21.0 - Bitcoin: add support for sending to silent payment (BIP-352) addresses diff --git a/src/rust/bitbox02-rust/src/hww/api/ethereum/params.rs b/src/rust/bitbox02-rust/src/hww/api/ethereum/params.rs index 23703d551..ba3e8cec0 100644 --- a/src/rust/bitbox02-rust/src/hww/api/ethereum/params.rs +++ b/src/rust/bitbox02-rust/src/hww/api/ethereum/params.rs @@ -42,13 +42,6 @@ const PARAMS: &[Params] = &[ name: "Ethereum", unit: "ETH", }, - Params { - coin: None, - bip44_coin: 1 + HARDENED, - chain_id: 5, - name: "Goerli", - unit: "GOETH", - }, Params { coin: None, bip44_coin: 1 + HARDENED, @@ -154,8 +147,8 @@ mod tests { assert_eq!(get(Some(EthCoin::Eth), 0).unwrap().name, "Ethereum"); assert_eq!(get(Some(EthCoin::Eth), 1).unwrap().name, "Ethereum"); assert_eq!(get(None, 1).unwrap().name, "Ethereum"); - assert_eq!(get(Some(EthCoin::Eth), 5).unwrap().name, "Goerli"); - assert_eq!(get(None, 5).unwrap().name, "Goerli"); + assert_eq!(get(Some(EthCoin::Eth), 11155111).unwrap().name, "Sepolia"); + assert_eq!(get(None, 11155111).unwrap().name, "Sepolia"); assert_eq!( get(Some(EthCoin::Eth), 56).unwrap().name, "Binance Smart Chain" diff --git a/src/rust/bitbox02-rust/src/hww/api/ethereum/pubrequest.rs b/src/rust/bitbox02-rust/src/hww/api/ethereum/pubrequest.rs index 61ec896f5..628a18ea7 100644 --- a/src/rust/bitbox02-rust/src/hww/api/ethereum/pubrequest.rs +++ b/src/rust/bitbox02-rust/src/hww/api/ethereum/pubrequest.rs @@ -207,11 +207,11 @@ mod tests { CONFIRM_COUNTER } { 1 => { - assert_eq!(params.title, "Goerli"); + assert_eq!(params.title, "Sepolia"); assert_eq!(params.body, "Warning: unusual keypath m/44'/60'/0'/0/0. Proceed only if you know what you are doing."); } 2 => { - assert_eq!(params.title, "Goerli"); + assert_eq!(params.title, "Sepolia"); assert_eq!(params.body, ADDRESS); } _ => panic!("too many user confirmations"), @@ -228,7 +228,7 @@ mod tests { coin: pb::EthCoin::Eth as _, display: true, contract_address: b"".to_vec(), - chain_id: 5, + chain_id: 11155111, })), Ok(Response::Pub(pb::PubResponse { r#pub: ADDRESS.into() diff --git a/src/rust/bitbox02-rust/src/hww/api/ethereum/sighash.rs b/src/rust/bitbox02-rust/src/hww/api/ethereum/sighash.rs index bf6c3cd6b..c5cc1b0a8 100644 --- a/src/rust/bitbox02-rust/src/hww/api/ethereum/sighash.rs +++ b/src/rust/bitbox02-rust/src/hww/api/ethereum/sighash.rs @@ -186,7 +186,6 @@ mod tests { var nets = []*params.ChainConfig{ params.MainnetChainConfig, params.SepoliaChainConfig, - params.GoerliChainConfig, ¶ms.ChainConfig{ ChainID: big.NewInt(200), LondonBlock: big.NewInt(12965000), diff --git a/src/rust/bitbox02-rust/src/hww/api/ethereum/sign.rs b/src/rust/bitbox02-rust/src/hww/api/ethereum/sign.rs index 2c2486d00..f86aa7694 100644 --- a/src/rust/bitbox02-rust/src/hww/api/ethereum/sign.rs +++ b/src/rust/bitbox02-rust/src/hww/api/ethereum/sign.rs @@ -630,7 +630,7 @@ mod tests { assert_eq!(unsafe { UI_COUNTER }, 1); } - /// Standard ETH transaction on an unusual keypath (Goerli on mainnet keypath) + /// Standard ETH transaction on an unusual keypath (Sepolia on mainnet keypath) #[test] pub fn test_process_warn_unusual_keypath() { const KEYPATH: &[u32] = &[44 + HARDENED, 60 + HARDENED, 0 + HARDENED, 0, 0]; @@ -643,7 +643,7 @@ mod tests { CONFIRM_COUNTER } { 1 => { - assert_eq!(params.title, "Goerli"); + assert_eq!(params.title, "Sepolia"); assert_eq!(params.body, "Warning: unusual keypath m/44'/60'/0'/0/0. Proceed only if you know what you are doing."); true } @@ -651,13 +651,13 @@ mod tests { } })), ui_transaction_address_create: Some(Box::new(|amount, address| { - assert_eq!(amount, "0.530564 GOETH"); + assert_eq!(amount, "0.530564 SEPETH"); assert_eq!(address, "0x04F264Cf34440313B4A0192A352814FBe927b885"); true })), ui_transaction_fee_create: Some(Box::new(|total, fee, longtouch| { - assert_eq!(total, "0.53069 GOETH"); - assert_eq!(fee, "0.000126 GOETH"); + assert_eq!(total, "0.53069 SEPETH"); + assert_eq!(fee, "0.000126 SEPETH"); assert!(longtouch); true })), @@ -677,7 +677,7 @@ mod tests { value: b"\x07\x5c\xf1\x25\x9e\x9c\x40\x00".to_vec(), data: b"".to_vec(), host_nonce_commitment: None, - chain_id: 5, + chain_id: 11155111, address_case: pb::EthAddressCase::Mixed as _, }))) .unwrap(); diff --git a/src/rust/bitbox02-rust/src/hww/api/ethereum/signmsg.rs b/src/rust/bitbox02-rust/src/hww/api/ethereum/signmsg.rs index 558e3584e..84598bacb 100644 --- a/src/rust/bitbox02-rust/src/hww/api/ethereum/signmsg.rs +++ b/src/rust/bitbox02-rust/src/hww/api/ethereum/signmsg.rs @@ -158,12 +158,12 @@ mod tests { CONFIRM_COUNTER } { 1 => { - assert_eq!(params.title, "Goerli"); + assert_eq!(params.title, "Sepolia"); assert_eq!(params.body, "Warning: unusual keypath m/44'/60'/0'/0/0. Proceed only if you know what you are doing."); true } 2 => { - assert_eq!(params.title, "Goerli"); + assert_eq!(params.title, "Sepolia"); assert_eq!(params.body, EXPECTED_ADDRESS); true } @@ -183,7 +183,7 @@ mod tests { keypath: KEYPATH.to_vec(), msg: MESSAGE.to_vec(), host_nonce_commitment: None, - chain_id: 5, + chain_id: 11155111, })) .unwrap(); assert_eq!(unsafe { CONFIRM_COUNTER }, 3);