What changed, and why it matters
This commit is a routine version-bump release (3.2.0) for the Keystone 3 firmware. The visible changes are almost entirely code formatting/indentation, removal of unused imports and dead code, adding 'deprecated' annotations to legacy Bitcoin raw-transaction helpers, and minor UI layout tweaks. The changelog only mentions 'UI performance optimization'. No security fixes, vulnerability descriptions, or functional behavior changes are evident in the diff.
No security action required based on this commit alone. Treat as a normal release update. If reviewing for security, focus on the preceding commits that actually changed transaction parsing or cryptographic logic, since this release commit only bundles and reformats them.
Security signals we found
No security-relevant signals detected in the diff.
No mention of CVE, security fix, vulnerability, audit, or bug bounty in commit message or changelog.
Changes are cosmetic, dead-code removal, feature gating, and version bump.
Evidence from the diff
The diff is dominated by whitespace/indentation reformatting across C and Rust files, plus minor cleanups: removing the ‘fuzzing’ feature guard from Aptos identifier code, deleting unused TON PBKDF2/SHA-512 utilities, removing an unused OsRng import in Monero, gating TON MnemonicError and Zcash PCZT helpers behind test/cypherpunk feature flags, and marking legacy Bitcoin raw_tx functions as deprecated. The Avalanche changes add #[allow(dead_code)] annotations and reduce visibility of some struct fields, but do not change parsing or signing logic. Version numbers are bumped from 13.1.4 to 13.2.0. No patches to memory safety, cryptography, authentication, or transaction validation logic are visible.
Changed components
Firmware release metadata (CHANGELOG, version headers)Rust app layer (Aptos, Avalanche, Bitcoin, Monero, TON, Zcash)C UI layer (multiple gui_chain/gui_widgets files)Core managers (keystore, account_manager, se_backend_gen1)MPU sandbox and task codeInspect captured patch +674 / −515
### CHANGELOG-ZH.md
@@ -1,3 +1,24 @@
+## 3.2.0(2026-10-21)
+
+**Web3:**
+
+### 优化
+
+1. UI 性能优化
+
+**Cypherpunk:**
+
+### 优化
+
+1. UI 性能优化
+
+**BTC Only:**
+
+### 优化
+
+1. UI 性能优化
+
+
## 3.1.4(2026-10-15)
**Web3:**
### CHANGELOG.md
@@ -1,3 +1,24 @@
+## 3.2.0(2026-10-21)
+
+**Web3:**
+
+### Improvements
+
+1. Improved UI performance
+
+**Cypherpunk:**
+
+### Improvements
+
+1. Improved UI performance
+
+**BTC Only:**
+
+### Improvements
+
+1. Improved UI performance
+
+
## 3.1.4(2026-10-15)
**Web3:**
### rust/apps/aptos/src/aptos_type/identifier.rs
@@ -36,16 +36,15 @@ pub const fn is_valid(s: &str) -> bool {
}
}
-#[cfg(any(test, feature = "fuzzing"))]
+#[cfg(test)]
#[allow(dead_code)]
pub(crate) static ALLOWED_IDENTIFIERS: &str =
r"(?:[a-zA-Z][a-zA-Z0-9_]*)|(?:_[a-zA-Z0-9_]+)|(?:<SELF>)";
-#[cfg(any(test, feature = "fuzzing"))]
+#[cfg(test)]
pub(crate) static ALLOWED_NO_SELF_IDENTIFIERS: &str =
r"(?:[a-zA-Z][a-zA-Z0-9_]*)|(?:_[a-zA-Z0-9_]+)";
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize, Deserialize)]
-#[cfg_attr(feature = "fuzzing", derive(arbitrary::Arbitrary))]
pub struct Identifier(Box<str>);
impl Identifier {
### rust/apps/avalanche/src/address.rs
@@ -53,9 +53,6 @@ pub fn get_address(
Network::AvaxMainNet => "avax",
#[cfg(feature = "testnet")]
Network::AvaxTestNet => "fuji",
- _ => {
- return Err(AvaxError::UnsupportedNetwork(format!("{network:?}")));
- }
};
let root_path = if !root_path.ends_with('/') {
### rust/apps/avalanche/src/transactions/base_tx.rs
@@ -17,6 +17,10 @@ use cryptoxide::hashing::sha256;
#[derive(Debug, Clone)]
pub struct BaseTx {
+ #[allow(
+ dead_code,
+ reason = "Retained as part of the parsed wire format and debug representation"
+ )]
codec_id: u16,
pub type_id: TypeId,
pub tx_header: Header,
@@ -73,8 +77,6 @@ pub fn avax_base_sign(
paths: Vec<String>,
unsigned_data: Vec<u8>,
) -> Result<Vec<[u8; 65]>> {
- let mut bytes: [u8; 65] = [0; 65];
-
let msg = Message::from_digest_slice(&sha256(unsigned_data.as_slice()))
.map_err(|_| AvaxError::InvalidHex("invalid sha256 length".to_string()))?;
### rust/apps/avalanche/src/transactions/c_chain/evm_export.rs
@@ -18,9 +18,17 @@ use core::convert::TryFrom;
#[derive(Debug, Clone)]
pub struct EvmInput {
+ #[allow(
+ dead_code,
+ reason = "Retained as part of the parsed wire format and debug representation"
+ )]
address: Address,
amount: u64,
asset_id: AssetId,
+ #[allow(
+ dead_code,
+ reason = "Retained as part of the parsed wire format and debug representation"
+ )]
nonce: u64,
}
@@ -55,6 +63,10 @@ impl EvmInput {
#[derive(Debug, Clone)]
pub struct ExportTx {
+ #[allow(
+ dead_code,
+ reason = "Retained as part of the parsed wire format and debug representation"
+ )]
codec_id: u16,
type_id: TypeId,
tx_header: Header,
### rust/apps/avalanche/src/transactions/c_chain/evm_import.rs
@@ -45,7 +45,15 @@ impl ParsedSizeAble for EvmOutput {
#[derive(Debug, Clone)]
pub struct ImportTx {
+ #[allow(
+ dead_code,
+ reason = "Retained as part of the parsed wire format and debug representation"
+ )]
codec_id: u16,
+ #[allow(
+ dead_code,
+ reason = "Retained as part of the parsed wire format and debug representation"
+ )]
type_id: TypeId,
tx_header: Header,
source_chain: [u8; BLOCKCHAIN_ID_LEN],
### rust/apps/avalanche/src/transactions/export.rs
@@ -79,18 +79,11 @@ impl AvaxTxInfo for ExportTx {
}
}
+#[cfg(test)]
impl ExportTx {
- fn get_base_tx(&self) -> &BaseTx {
- &self.base_tx
- }
-
fn get_dest_chain(&self) -> [u8; BLOCKCHAIN_ID_LEN] {
self.dest_chain
}
-
- fn get_transfer_out(&self) -> &LengthPrefixedVec<TransferableOutput> {
- &self.transfer_out
- }
}
impl TryFrom<Bytes> for ExportTx {
### rust/apps/avalanche/src/transactions/outputs/secp256k1_transfer_output.rs
@@ -1,6 +1,6 @@
use crate::address::Address;
use crate::errors::{AvaxError, Result};
-use crate::transactions::structs::{LengthPrefixedVec, ParsedSizeAble};
+use crate::transactions::structs::LengthPrefixedVec;
use crate::transactions::transferable::OutputTrait;
use alloc::string::{String, ToString};
use alloc::vec::Vec;
### rust/apps/avalanche/src/transactions/p_chain/add_permissionless_delegator.rs
@@ -18,6 +18,10 @@ use core::convert::TryFrom;
pub struct AddPermissionlessDelegatorTx {
base_tx: BaseTx,
validator: Validator,
+ #[allow(
+ dead_code,
+ reason = "Retained as part of the parsed wire format and debug representation"
+ )]
subnet_id: SubnetId,
stake_out: LengthPrefixedVec<TransferableOutput>,
delegator_owner: OutputOwner,
### rust/apps/avalanche/src/transactions/p_chain/add_permissionless_validator.rs
@@ -20,11 +20,23 @@ use core::convert::TryFrom;
pub struct AddPermissionlessValidatorTx {
base_tx: BaseTx,
validator: Validator,
+ #[allow(
+ dead_code,
+ reason = "Retained as part of the parsed wire format and debug representation"
+ )]
subnet_id: SubnetId,
+ #[allow(
+ dead_code,
+ reason = "Retained as part of the parsed wire format and debug representation"
+ )]
signer: Signer,
stake_out: LengthPrefixedVec<TransferableOutput>,
validator_owner: OutputOwner,
delegator_owner: OutputOwner,
+ #[allow(
+ dead_code,
+ reason = "Retained as part of the parsed wire format and debug representation"
+ )]
delegator_share: u32,
}
### rust/apps/avalanche/src/transactions/p_chain/output_owner.rs
@@ -9,8 +9,20 @@ use core::convert::TryFrom;
#[derive(Debug, Clone)]
pub struct OutputOwner {
+ #[allow(
+ dead_code,
+ reason = "Retained as part of the parsed wire format and debug representation"
+ )]
type_id: TypeId,
+ #[allow(
+ dead_code,
+ reason = "Retained as part of the parsed wire format and debug representation"
+ )]
locktime: u64,
+ #[allow(
+ dead_code,
+ reason = "Retained as part of the parsed wire format and debug representation"
+ )]
threshold: u32,
pub addresses: LengthPrefixedVec<Address>,
}
### rust/apps/avalanche/src/transactions/p_chain/signer.rs
@@ -5,7 +5,15 @@ use core::convert::TryFrom;
#[derive(Debug, Clone)]
pub struct Signer {
+ #[allow(
+ dead_code,
+ reason = "Retained as part of the parsed wire format and debug representation"
+ )]
pubkey: [u8; PROOF_OF_POSESSION_PUBKEY_LEN],
+ #[allow(
+ dead_code,
+ reason = "Retained as part of the parsed wire format and debug representation"
+ )]
signature: [u8; PROOF_OF_POSESSION_SIGNATURE_LEN],
}
### rust/apps/avalanche/src/transactions/p_chain/validator.rs
@@ -6,9 +6,17 @@ use core::convert::TryFrom;
#[derive(Debug, Clone)]
pub struct Validator {
+ #[allow(
+ dead_code,
+ reason = "Retained as part of the parsed wire format and debug representation"
+ )]
pub node_id: NodeId,
pub start_time: i64,
pub end_time: i64,
+ #[allow(
+ dead_code,
+ reason = "Retained as part of the parsed wire format and debug representation"
+ )]
pub weight: u64,
}
### rust/apps/avalanche/src/transactions/subnet_auth.rs
@@ -5,6 +5,10 @@ use core::convert::TryFrom;
#[derive(Debug, Clone)]
pub struct SubnetAuth {
+ #[allow(
+ dead_code,
+ reason = "Retained as part of the parsed wire format and debug representation"
+ )]
subnet_auth: [u8; SUBNET_AUTH_LEN],
}
### rust/apps/avalanche/src/transactions/subnet_id.rs
@@ -5,6 +5,10 @@ use core::convert::TryFrom;
#[derive(Debug, Clone)]
pub struct SubnetId {
+ #[allow(
+ dead_code,
+ reason = "Retained as part of the parsed wire format and debug representation"
+ )]
subnet_id: [u8; SUBNET_ID_LEN],
}
### rust/apps/avalanche/src/transactions/transferable.rs
@@ -73,7 +73,7 @@ pub trait OutputTrait {
#[derive(Debug, Clone)]
pub struct TransferableOutput {
asset_id: AssetId,
- pub output: OutputType,
+ output: OutputType,
}
impl TransferableOutput {
@@ -118,7 +118,7 @@ pub struct TransferableInput {
pub tx_id: TxId,
pub utxo_index: u32,
pub asset_id: AssetId,
- pub input: InputType,
+ input: InputType,
}
impl TransferableInput {
### rust/apps/bitcoin/src/lib.rs
@@ -157,11 +157,19 @@ pub fn check_psbt(psbt_hex: Vec<u8>, context: ParseContext) -> Result<()> {
wpsbt.check(Left(&context))
}
+#[allow(
+ deprecated,
+ reason = "Retain the legacy raw-transaction compatibility entry point"
+)]
pub fn parse_raw_tx(raw_tx: protoc::Payload, context: keystone::ParseContext) -> Result<ParsedTx> {
let tx_data = TxData::from_payload(raw_tx, &context)?;
tx_data.parse(None)
}
+#[allow(
+ deprecated,
+ reason = "Retain the legacy raw-transaction compatibility entry point"
+)]
pub fn sign_raw_tx(
raw_tx: protoc::Payload,
context: keystone::ParseContext,
@@ -175,6 +183,10 @@ pub fn sign_raw_tx(
))
}
+#[allow(
+ deprecated,
+ reason = "Retain the legacy raw-transaction compatibility entry point"
+)]
pub fn check_raw_tx(raw_tx: protoc::Payload, context: keystone::ParseContext) -> Result<()> {
let tx_data = TxData::from_payload(raw_tx, &context)?;
tx_data.check(Right(&context))
### rust/apps/bitcoin/src/transactions/psbt/wrapped_psbt.rs
@@ -1203,7 +1203,7 @@ impl WrappedPsbt {
)));
}
None => {
- for (_i, (parent_path, xpub)) in
+ for (_i, (parent_path, _xpub)) in
context.extended_public_keys.iter().enumerate()
{
if child.starts_with(&parent_path.to_string()) {
### rust/apps/bitcoin/src/transactions/tx_checker.rs
@@ -29,6 +29,10 @@ pub mod psbt {
}
}
+#[allow(
+ deprecated,
+ reason = "Compatibility checker for legacy raw transactions"
+)]
pub mod raw_tx {
use super::*;
use crate::transactions::legacy::TxData;
### rust/apps/monero/src/transfer.rs
@@ -1201,9 +1201,7 @@ impl UnsignedTx {
let msg = tx.signature_hash().ok_or(MoneroError::FormatError)?;
let clsags_and_pseudo_outs = Clsag::sign(&mut OsRng, clsag_signs, mask_sum, msg)
- .map_err(|_| {
- MoneroError::FormatError
- })?;
+ .map_err(|_| MoneroError::FormatError)?;
let mut tx = tx.clone();
let inputs_len = tx.prefix().inputs.len();
### rust/apps/monero/src/utils/mod.rs
@@ -14,7 +14,7 @@ use curve25519_dalek::edwards::EdwardsPoint;
use curve25519_dalek::scalar::Scalar;
use curve25519_dalek::traits::{IsIdentity, MultiscalarMul};
use monero_serai::transaction::Input;
-use rand_core::{CryptoRng, OsRng, RngCore};
+use rand_core::{CryptoRng, RngCore};
pub mod constants;
pub mod hash;
### rust/apps/ton/src/errors.rs
@@ -1,4 +1,6 @@
-use alloc::string::{String, ToString};
+use alloc::string::String;
+#[cfg(test)]
+use alloc::string::ToString;
use thiserror;
use thiserror::Error;
@@ -24,6 +26,7 @@ pub enum TonError {
TransactionJsonError(String),
}
+#[cfg(test)]
#[derive(Debug, Error)]
pub(crate) enum MnemonicError {
#[error("Invalid mnemonic word count (count: {0})")]
@@ -39,6 +42,7 @@ pub(crate) enum MnemonicError {
InvalidPasswordlessMenmonicFirstByte(u8),
}
+#[cfg(test)]
impl From<MnemonicError> for TonError {
fn from(value: MnemonicError) -> Self {
TonError::MnemonicError(value.to_string())
### rust/apps/ton/src/utils.rs
@@ -1,15 +1,5 @@
use alloc::{string::String, vec::Vec};
-use cryptoxide::{
- digest::Digest,
- hmac::Hmac,
- pbkdf2,
- sha2::{Sha256, Sha512},
-};
-
-pub(crate) fn pbkdf2_sha512(key: &[u8], salt: &[u8], iterations: u32, output: &mut [u8]) {
- let mut hmac = Hmac::new(Sha512::new(), key);
- pbkdf2::pbkdf2(&mut hmac, salt, iterations, output)
-}
+use cryptoxide::{digest::Digest, sha2::Sha256};
pub(crate) fn sha256(data: &[u8]) -> Vec<u8> {
let mut hasher = Sha256::new();
### rust/apps/zcash/src/pczt/check.rs
@@ -1,6 +1,8 @@
// checking logic for PCZT
-use alloc::{format, string::ToString, vec};
+#[cfg(feature = "cypherpunk")]
+use alloc::vec;
+use alloc::{format, string::ToString};
use crate::errors::ZcashError;
### rust/apps/zcash/src/pczt/mod.rs
@@ -131,6 +131,7 @@ pub(crate) fn pczt_is_v6(pczt: &Pczt) -> bool {
&& *pczt.global().version_group_id() == constants::V6_VERSION_GROUP_ID
}
+#[cfg(feature = "cypherpunk")]
pub(crate) fn pczt_should_process_ironwood(pczt: &Pczt) -> bool {
pczt_is_v6(pczt) || pczt_has_ironwood_actions(pczt)
}
### rust/rust_c/src/lib.rs
@@ -1,4 +1,3 @@
-#![feature(vec_into_raw_parts)]
#![cfg_attr(feature = "use-allocator", no_std)]
#![cfg_attr(feature = "use-allocator", feature(alloc_error_handler))]
### rust/rust_c/src/tron/mod.rs
@@ -154,6 +154,10 @@ pub unsafe extern "C" fn tron_sign_request(
let signed_tx_bytes = hex::decode(signed_tx_hex)
.map_err(|_| KeystoneError::SignTxFailed("Invalid Hex output".to_string()))?;
let sig_obj = TronSignature::new(request_id, signed_tx_bytes);
+ #[allow(
+ deprecated,
+ reason = "ur-registry 1.0.9 TronSignature only implements To"
+ )]
sig_obj
.to_bytes()
.map_err(|e| KeystoneError::SignTxFailed(e.to_string()))
### src/config/version.c
@@ -86,9 +86,9 @@ void GetBootVersionNumber(char *version)
#ifndef COMPILE_SIMULATOR
bool NeedUpdateBoot(void)
{
- #ifndef BUILD_PRODUCTION
- return false;
- #endif
+#ifndef BUILD_PRODUCTION
+ return false;
+#endif
uint32_t major, minor, build;
if (GetBootSoftwareVersion(&major, &minor, &build) == false) {
return true;
### src/config/version.h
@@ -6,8 +6,8 @@
#define SOFTWARE_VERSION_MAX_LEN (32)
#define SOFTWARE_VERSION_MAJOR 13
#define SOFTWARE_VERSION_MAJOR_OFFSET 10
-#define SOFTWARE_VERSION_MINOR 1
-#define SOFTWARE_VERSION_BUILD 4
+#define SOFTWARE_VERSION_MINOR 2
+#define SOFTWARE_VERSION_BUILD 0
#define SOFTWARE_VERSION_BETA 0
#define SOFTWARE_VERSION (SOFTWARE_VERSION_MAJOR * 10000 + SOFTWARE_VERSION_MINOR * 100 + SOFTWARE_VERSION_BUILD)
#ifdef WEB3_VERSION
### src/crypto/account_public_info.c
@@ -931,7 +931,7 @@ int32_t AccountPublicSavePublicInfo(uint8_t accountIndex, const char *password,
break;
}
ledgerBitbox02Response = get_ledger_bitbox02_master_key(
- mnemonic, GetPassphrase(accountIndex));
+ mnemonic, GetPassphrase(accountIndex));
if (ledgerBitbox02Response == NULL || ledgerBitbox02Response->error_code != 0) {
ret = ledgerBitbox02Response == NULL ? ERR_GENERAL_FAIL : ledgerBitbox02Response->error_code;
break;
@@ -1167,15 +1167,15 @@ int32_t FindAccountByPasswordAndDeriveZcashCacheKey(
uint8_t cacheKey[AES_KEY_LEN])
{
return FindAccountByPasswordAndDeriveSubkey(
- matchedAccountIndex, password, ZCASH_CACHE_V3_DOMAIN, cacheKey);
+ matchedAccountIndex, password, ZCASH_CACHE_V3_DOMAIN, cacheKey);
}
int32_t VerifyAccountPasswordAndDeriveZcashCacheKey(
uint8_t accountIndex, const char *password,
uint8_t cacheKey[AES_KEY_LEN])
{
return VerifyAccountPasswordAndDeriveSubkey(
- accountIndex, password, ZCASH_CACHE_V3_DOMAIN, cacheKey);
+ accountIndex, password, ZCASH_CACHE_V3_DOMAIN, cacheKey);
}
/// @brief Check a stored Zcash UFVK blob has an acceptable layout.
@@ -1202,15 +1202,15 @@ static SimpleResponse_c_char *DeriveEncryptedZcashUFVKV3WithCacheKey(
uint32_t ufvkOutLen)
{
SimpleResponse_c_char *ufvkResponse = derive_zcash_ufvk(
- (uint8_t *)seed, seedLen, g_chainTable[ZCASH_UFVK_ENCRYPTED_0].path);
+ (uint8_t *)seed, seedLen, g_chainTable[ZCASH_UFVK_ENCRYPTED_0].path);
if (ufvkResponse == NULL || ufvkResponse->error_code != 0) {
return ufvkResponse;
}
uint8_t ivBytes[16];
TrngGet(ivBytes, sizeof(ivBytes));
SimpleResponse_c_char *encryptResult = rust_encrypt_ufvk_blob_v3(
- ufvkResponse->data, (uint8_t *)cacheKey, AES_KEY_LEN, ivBytes, sizeof(ivBytes));
+ ufvkResponse->data, (uint8_t *)cacheKey, AES_KEY_LEN, ivBytes, sizeof(ivBytes));
CLEAR_ARRAY(ivBytes);
if (ufvkOut != NULL && encryptResult != NULL && encryptResult->error_code == 0) {
strcpy_s(ufvkOut, ufvkOutLen, ufvkResponse->data);
@@ -1228,13 +1228,13 @@ static SimpleResponse_c_char *DeriveEncryptedZcashUFVKV3(
{
uint8_t cacheKey[AES_KEY_LEN] = {0};
int32_t ret = VerifyAccountPasswordAndDeriveZcashCacheKey(
- accountIndex, password, cacheKey);
+ accountIndex, password, cacheKey);
if (ret != SUCCESS_CODE) {
CLEAR_ARRAY(cacheKey);
return NULL;
}
SimpleResponse_c_char *encryptResult = DeriveEncryptedZcashUFVKV3WithCacheKey(
- seed, seedLen, cacheKey, ufvkOut, ufvkOutLen);
+ seed, seedLen, cacheKey, ufvkOut, ufvkOutLen);
CLEAR_ARRAY(cacheKey);
return encryptResult;
}
@@ -1268,16 +1268,16 @@ static int32_t ReplaceStoredZcashUFVK(uint8_t accountIndex, const SimpleResponse
}
int32_t MigrateLegacyZcashPublicInfoToV3(uint8_t accountIndex, uint8_t *seed, int seedLen,
- const uint8_t *cacheKey, char *ufvkOut,
- uint32_t ufvkOutLen)
+ const uint8_t *cacheKey, char *ufvkOut,
+ uint32_t ufvkOutLen)
{
ASSERT(accountIndex <= 2);
if (GetIsTempAccount()) {
return ERR_GENERAL_FAIL;
}
SimpleResponse_c_char *encryptResult = DeriveEncryptedZcashUFVKV3WithCacheKey(
- seed, seedLen, cacheKey, ufvkOut, ufvkOutLen);
+ seed, seedLen, cacheKey, ufvkOut, ufvkOutLen);
int32_t ret = ERR_GENERAL_FAIL;
if (encryptResult != NULL && encryptResult->error_code == 0) {
ret = CalculateAndStoreZcashSFP(seed, seedLen);
@@ -1302,7 +1302,7 @@ int32_t RegenerateZcashUFVKV3(uint8_t accountIndex, const uint8_t *seed, int see
}
SimpleResponse_c_char *encryptResult = DeriveEncryptedZcashUFVKV3(
- accountIndex, seed, seedLen, password, NULL, 0);
+ accountIndex, seed, seedLen, password, NULL, 0);
int32_t ret = ReplaceStoredZcashUFVK(accountIndex, encryptResult);
if (encryptResult != NULL) {
free_simple_response_c_char(encryptResult);
@@ -1364,13 +1364,13 @@ int32_t TempAccountPublicInfo(uint8_t accountIndex, const char *password, bool s
ret = bip39_mnemonic_from_bytes(NULL, entropy, entropyLen, &mnemonic);
CHECK_ERRCODE_BREAK("derive temp account mnemonic", ret);
cip3Response = get_icarus_master_key(
- entropy, entropyLen, GetPassphrase(accountIndex));
+ entropy, entropyLen, GetPassphrase(accountIndex));
if (cip3Response == NULL || cip3Response->error_code != 0) {
ret = cip3Response == NULL ? ERR_GENERAL_FAIL : cip3Response->error_code;
break;
}
ledgerBitbox02Response = get_ledger_bitbox02_master_key(
- mnemonic, GetPassphrase(accountIndex));
+ mnemonic, GetPassphrase(accountIndex));
if (ledgerBitbox02Response == NULL || ledgerBitbox02Response->error_code != 0) {
ret = ledgerBitbox02Response == NULL ? ERR_GENERAL_FAIL : ledgerBitbox02Response->error_code;
break;
@@ -1396,7 +1396,7 @@ int32_t TempAccountPublicInfo(uint8_t accountIndex, const char *password, bool s
#ifdef CYPHERPUNK_VERSION
if (g_chainTable[i].cryptoKey == ZCASH_UFVK_ENCRYPTED) {
xPubResult = DeriveEncryptedZcashUFVKV3(
- accountIndex, seed, seedLen, password, NULL, 0);
+ accountIndex, seed, seedLen, password, NULL, 0);
} else {
xPubResult = ProcessKeyType(seed, seedLen, g_chainTable[i].cryptoKey,
g_chainTable[i].path, icarusMasterKey,
@@ -1430,7 +1430,7 @@ int32_t TempAccountPublicInfo(uint8_t accountIndex, const char *password, bool s
}
ASSERT(xPubResult->data);
uint32_t valueLen = strnlen_s(
- xPubResult->data, SIMPLERESPONSE_C_CHAR_MAX_LEN) + 1;
+ xPubResult->data, SIMPLERESPONSE_C_CHAR_MAX_LEN) + 1;
g_accountPublicInfo[i].value = SRAM_MALLOC(valueLen);
if (g_accountPublicInfo[i].value == NULL) {
ret = ERR_GENERAL_FAIL;
### src/crypto/account_public_info.h
@@ -282,8 +282,8 @@ int32_t VerifyAccountPasswordAndDeriveZcashCacheKey(
uint8_t accountIndex, const char *password,
uint8_t cacheKey[32]);
int32_t MigrateLegacyZcashPublicInfoToV3(uint8_t accountIndex, uint8_t *seed, int seedLen,
- const uint8_t *cacheKey, char *ufvkOut,
- uint32_t ufvkOutLen);
+ const uint8_t *cacheKey, char *ufvkOut,
+ uint32_t ufvkOutLen);
int32_t RegenerateZcashUFVKV3(uint8_t accountIndex, const uint8_t *seed, int seedLen,
const char *password);
#endif
### src/device_settings.c
@@ -226,14 +226,14 @@ int SaveBootParam(void)
}
if (Gd25FlashWriteBuffer(BOOT_SECURE_PARAM_FLAG, cipher, sizeof(cipher)) !=
- (int32_t)sizeof(cipher)) {
+ (int32_t)sizeof(cipher)) {
ret = ERR_GD25_BAD_PARAM;
goto cleanup;
}
if (Gd25FlashReadBuffer(BOOT_SECURE_PARAM_FLAG, verifyBuffer,
- sizeof(verifyBuffer)) !=
- (int32_t)sizeof(verifyBuffer)) {
+ sizeof(verifyBuffer)) !=
+ (int32_t)sizeof(verifyBuffer)) {
ret = ERR_GD25_BAD_PARAM;
goto cleanup;
}
@@ -591,7 +591,7 @@ static int32_t VerifyDeviceSettingsWrite(const char *jsonString, uint32_t size)
chunkSize = sizeof(verifyBuffer);
}
readSize = Gd25FlashReadBuffer(SPI_FLASH_ADDR_NORMAL_PARAM + sizeof(savedSize) + offset,
- verifyBuffer, chunkSize);
+ verifyBuffer, chunkSize);
if (readSize != chunkSize || memcmp(verifyBuffer, jsonString + offset, chunkSize) != 0) {
return ERR_GD25_BAD_PARAM;
}
### src/managers/account_manager.c
@@ -339,7 +339,7 @@ int32_t VerifyPasswordAndLogin(uint8_t *accountIndex, const char *password)
uint8_t zcashCacheKey[AES_KEY_LEN];
CLEAR_ARRAY(zcashCacheKey);
ret = FindAccountByPasswordAndDeriveZcashCacheKey(
- &tempIndex, password, zcashCacheKey);
+ &tempIndex, password, zcashCacheKey);
#else
ret = FindAccountByPassword(&tempIndex, password);
#endif
@@ -985,7 +985,7 @@ int32_t SetupZcashCache(uint8_t accountIndex, const char* password,
ret = SUCCESS_CODE;
} else {
ret = VerifyAccountPasswordAndDeriveZcashCacheKey(
- accountIndex, password, cacheKey);
+ accountIndex, password, cacheKey);
CHECK_ERRCODE_BREAK("derive zcash cache key", ret);
}
@@ -1028,7 +1028,7 @@ int32_t SetupZcashCache(uint8_t accountIndex, const char* password,
ret = GetAccountSeed(accountIndex, seed, password);
CHECK_ERRCODE_BREAK("load seed for zcash z3 migration", ret);
ret = MigrateLegacyZcashPublicInfoToV3(
- accountIndex, seed, seedLen, cacheKey, ufvk, sizeof(ufvk));
+ accountIndex, seed, seedLen, cacheKey, ufvk, sizeof(ufvk));
CLEAR_ARRAY(seed);
CHECK_ERRCODE_BREAK("migrate zcash public info to z3", ret);
if (!GetCurrentAccountZcashSFP(sfp)) {
### src/managers/keystore.c
@@ -62,11 +62,11 @@ static int32_t LoadAccountSecretFromSE(uint8_t accountIndex, AccountSecret_t *ac
#endif
static int32_t AccountExists(uint8_t accountIndex, bool *exists);
static int32_t FindAccountByPasswordInternal(uint8_t *matchedAccountIndex, const char *password,
- const uint8_t *subkeyDomain,
- uint8_t *derivedKey);
+ const uint8_t *subkeyDomain,
+ uint8_t *derivedKey);
static int32_t VerifyAccountPasswordInternal(uint8_t accountIndex, const char *password,
- const uint8_t *subkeyDomain,
- uint8_t *derivedKey);
+ const uint8_t *subkeyDomain,
+ uint8_t *derivedKey);
static void DeriveAccountSubkeyFromAccountBlobAuthKey(
const uint8_t accountBlobAuthKey[AUTH_KEY_LEN], uint8_t accountIndex,
const uint8_t domain[ACCOUNT_SUBKEY_DOMAIN_LEN],
@@ -353,8 +353,8 @@ int32_t FindAccountByPassword(uint8_t *matchedAccountIndex, const char *password
}
static int32_t FindAccountByPasswordInternal(uint8_t *matchedAccountIndex, const char *password,
- const uint8_t *subkeyDomain,
- uint8_t *derivedKey)
+ const uint8_t *subkeyDomain,
+ uint8_t *derivedKey)
{
uint8_t tryOrder[3];
uint8_t lastAccountIndex;
@@ -368,7 +368,7 @@ static int32_t FindAccountByPasswordInternal(uint8_t *matchedAccountIndex, const
uint8_t *resultAccountIndex = matchedAccountIndex == NULL ? &simulatorAccountIndex : matchedAccountIndex;
if (derivedKey != NULL) {
ret = SimulatorVerifyPasswordAndDeriveSubkey(
- resultAccountIndex, password, subkeyDomain, derivedKey);
+ resultAccountIndex, password, subkeyDomain, derivedKey);
} else {
ret = SimulatorVerifyPassword(resultAccountIndex, password);
}
@@ -395,7 +395,7 @@ static int32_t FindAccountByPasswordInternal(uint8_t *matchedAccountIndex, const
}
ret = VerifyAccountPasswordInternal(
- tryOrder[i], password, subkeyDomain, derivedKey);
+ tryOrder[i], password, subkeyDomain, derivedKey);
if (ret == SUCCESS_CODE) {
if (matchedAccountIndex != NULL) {
*matchedAccountIndex = tryOrder[i];
@@ -418,8 +418,8 @@ int32_t VerifyAccountPassword(uint8_t accountIndex, const char *password)
}
static int32_t VerifyAccountPasswordInternal(uint8_t accountIndex, const char *password,
- const uint8_t *subkeyDomain,
- uint8_t *derivedKey)
+ const uint8_t *subkeyDomain,
+ uint8_t *derivedKey)
{
int32_t ret;
@@ -428,15 +428,15 @@ static int32_t VerifyAccountPasswordInternal(uint8_t accountIndex, const char *p
#ifdef COMPILE_SIMULATOR
if (derivedKey != NULL) {
ret = SimulatorVerifyCurrentPasswordAndDeriveSubkey(
- accountIndex, password, subkeyDomain, derivedKey);
+ accountIndex, password, subkeyDomain, derivedKey);
} else {
ret = SimulatorVerifyCurrentPassword(accountIndex, password);
}
#else
VerifiedAccountBlob_t verified;
CLEAR_OBJECT(verified);
ret = VerifyAccountBlobFromSE(
- accountIndex, password, &verified, subkeyDomain, derivedKey);
+ accountIndex, password, &verified, subkeyDomain, derivedKey);
CLEAR_OBJECT(verified);
#endif
if (ret != SUCCESS_CODE && derivedKey != NULL) {
@@ -454,7 +454,7 @@ int32_t FindAccountByPasswordAndDeriveSubkey(
ASSERT(derivedKey != NULL);
memset_s(derivedKey, AUTH_KEY_LEN, 0, AUTH_KEY_LEN);
return FindAccountByPasswordInternal(
- matchedAccountIndex, password, domain, derivedKey);
+ matchedAccountIndex, password, domain, derivedKey);
}
int32_t VerifyAccountPasswordAndDeriveSubkey(
@@ -466,7 +466,7 @@ int32_t VerifyAccountPasswordAndDeriveSubkey(
ASSERT(derivedKey != NULL);
memset_s(derivedKey, AUTH_KEY_LEN, 0, AUTH_KEY_LEN);
return VerifyAccountPasswordInternal(
- accountIndex, password, domain, derivedKey);
+ accountIndex, password, domain, derivedKey);
}
static void DeriveAccountSubkeyFromAccountBlobAuthKey(
@@ -1218,7 +1218,7 @@ void KeyStoreTest(int argc, char *argv[])
for (accountIndex = 0; accountIndex < 3; accountIndex++) {
printf("accountIndex %d:\r\n", accountIndex);
printf("passphrase=%s\r\n", g_passphraseInfo[accountIndex].passphrase);
- printf("mfp=0x%08X\r\n", (unsigned int)*((uint32_t *)(g_passphraseInfo[accountIndex].mfp)));
+ printf("mfp=0x%08X\r\n", (unsigned int) * ((uint32_t *)(g_passphraseInfo[accountIndex].mfp)));
}
} else if (strcmp(argv[0], "set_fp_info") == 0) {
printf("set fp info test\r\n");
### src/managers/se_backend_gen1.c
@@ -121,7 +121,9 @@ static int32_t Gen1OnUnlockSuccess(uint8_t accountIndex)
}
static int32_t Gen1RecoverResetKey(uint8_t existingIdx, const char *existingPassword, uint8_t *R_out)
{
- (void)existingIdx; (void)existingPassword; (void)R_out;
+ (void)existingIdx;
+ (void)existingPassword;
+ (void)R_out;
return SUCCESS_CODE; // no-op on gen-1
}
static int32_t Gen1PrepareChangePin(uint8_t accountIndex, const char *oldPassword)
### src/tasks/data_parser_task.c
@@ -170,11 +170,11 @@ static void DataParserTask(void *argument)
}
static void MemManageFaultHandler(uint32_t *stackFrame, uint32_t excReturn)
- __attribute__((noreturn, noinline, used));
+__attribute__((noreturn, noinline, used));
__attribute__((naked)) void MemManage_Handler(void)
{
- __asm volatile (
+ __asm volatile(
"tst lr, #4\n"
"ite eq\n"
"mrseq r0, msp\n"
### src/tasks/mpu_sandbox_runtime.c
@@ -14,10 +14,10 @@ typedef enum {
MPU_SANDBOX_VALIDATION_EIP712_JSON,
} MpuSandboxValidationKind_t;
static bool MpuSandboxProcessValidationChunk(MpuSandboxInput_t *input,
- MpuSandboxOutput_t *output,
- uint8_t *data, size_t capacity,
- uint16_t *length, uint16_t *total_length,
- bool *active, MpuSandboxValidationKind_t kind);
+ MpuSandboxOutput_t *output,
+ uint8_t *data, size_t capacity,
+ uint16_t *length, uint16_t *total_length,
+ bool *active, MpuSandboxValidationKind_t kind);
static void SandboxCopy(void *destination, const void *source, size_t length)
{
uint8_t *destinationBytes = destination;
@@ -104,12 +104,12 @@ static void MpuSandboxProcessRequest(MpuSandboxInput_t *input, MpuSandboxRw_t *r
rw->payload_mode = MPU_SANDBOX_PAYLOAD_EAPDU;
}
EapduFramingResult_t framing = EapduFramingPush(&rw->payload.eapdu, input->input,
- inputLength,
- request.tick);
+ inputLength,
+ request.tick);
if ((framing.status == EAPDU_FRAMING_COMPLETE) &&
(framing.command_type == MPU_SANDBOX_RESOLVE_UR_COMMAND)) {
urValidationStatus = mpu_sandbox_validate_ur(rw->payload.eapdu.packet_data,
- framing.payload_length);
+ framing.payload_length);
}
MpuSandboxEapduResult_t result = {
.framing_status = (uint32_t)framing.status,
@@ -148,9 +148,9 @@ static void MpuSandboxProcessUrChunk(MpuSandboxInput_t *input, MpuSandboxRw_t *r
}
static void MpuSandboxProcessPayloadValidationChunk(MpuSandboxInput_t *input,
- MpuSandboxRw_t *rw,
- MpuSandboxPayloadMode_t mode,
- MpuSandboxValidationKind_t kind)
+ MpuSandboxRw_t *rw,
+ MpuSandboxPayloadMode_t mode,
+ MpuSandboxValidationKind_t kind)
{
MpuSandboxPayloadValidationState_t *state = &rw->payload.validation;
bool firstChunk = (input->request.input_length >= MPU_SANDBOX_UR_CHUNK_HEADER_SIZE) &&
@@ -239,10 +239,10 @@ static void MpuSandboxProcessEip712JsonChunk(MpuSandboxInput_t *input, MpuSandbo
}
static bool MpuSandboxProcessValidationChunk(MpuSandboxInput_t *input,
- MpuSandboxOutput_t *output,
- uint8_t *data, size_t capacity,
- uint16_t *length, uint16_t *total_length,
- bool *active, MpuSandboxValidationKind_t kind)
+ MpuSandboxOutput_t *output,
+ uint8_t *data, size_t capacity,
+ uint16_t *length, uint16_t *total_length,
+ bool *active, MpuSandboxValidationKind_t kind)
{
uint32_t inputLength = input->request.input_length;
MpuSandboxUrChunkResult_t result = {
### src/tasks/mpu_sandbox_task.c
@@ -77,17 +77,17 @@ static StaticTask_t g_mpuSandboxTaskBuffer __attribute__((section("privileged_da
static TaskHandle_t g_mpuSandboxTaskHandle __attribute__((section("privileged_data")));
static uint32_t g_mpuSandboxNextRequestId __attribute__((section("privileged_data"))) = 1U;
static MpuSandboxIpcMetadata_t g_mpuSandboxIpc
- __attribute__((section("privileged_data")));
+__attribute__((section("privileged_data")));
static StackType_t g_mpuSandboxStack[MPU_SANDBOX_STACK_WORDS]
- __attribute__((section(".mpu_sandbox_stack"), aligned(4096)));
+__attribute__((section(".mpu_sandbox_stack"), aligned(4096)));
MpuSandboxInput_t g_mpuSandboxInput
- __attribute__((section(".mpu_sandbox_input"), aligned(256)));
+__attribute__((section(".mpu_sandbox_input"), aligned(256)));
MpuSandboxRw_t g_mpuSandboxRw
- __attribute__((section(".mpu_sandbox_rw"), aligned(MPU_SANDBOX_RW_REGION_SIZE)));
+__attribute__((section(".mpu_sandbox_rw"), aligned(MPU_SANDBOX_RW_REGION_SIZE)));
#ifndef BTC_ONLY
static uint8_t g_mpuSandboxTrustedPayload[EAPDU_FRAMING_MAX_PAYLOAD_SIZE + 1U];
static MpuSandboxTrustedFrame_t g_mpuSandboxTrustedFrame
- __attribute__((section("privileged_data")));
+__attribute__((section("privileged_data")));
static bool g_mpuSandboxEapduSuspended __attribute__((section("privileged_data")));
#endif
@@ -121,11 +121,11 @@ static const TaskParameters_t g_mpuSandboxTaskParameters = {
};
BaseType_t xApplicationIsSystemCallAllowed(TaskHandle_t task, BaseType_t task_is_privileged,
- uint8_t system_call_number)
- PRIVILEGED_FUNCTION;
+ uint8_t system_call_number)
+PRIVILEGED_FUNCTION;
BaseType_t xApplicationIsSystemCallAllowed(TaskHandle_t task, BaseType_t task_is_privileged,
- uint8_t system_call_number)
+ uint8_t system_call_number)
{
if (task == (TaskHandle_t)&g_mpuSandboxTaskBuffer) {
if (system_call_number == SYSTEM_CALL_xTaskGenericNotifyWait) {
### src/tasks/watchdog_task.c
@@ -12,7 +12,7 @@ static void WatchdogTask(void *argument);
static StaticTask_t g_watchdogTaskBuffer __attribute__((section("privileged_data")));
static osThreadId_t g_watchdogTaskHandle __attribute__((section("privileged_data")));
static StackType_t g_watchdogTaskStack[configMINIMAL_STACK_SIZE]
- __attribute__((section("privileged_data")));
+__attribute__((section("privileged_data")));
bool WatchdogTaskCreate(void)
{
@@ -45,7 +45,7 @@ static void WatchdogTask(void *argument)
{
(void)argument;
- while(1) {
+ while (1) {
WDT_ReloadCounter();
osDelay(WATCHDOG_FEED_INTERVAL_MS);
}
### src/ui/gui_analyze/gui_analyze.c
@@ -455,9 +455,9 @@ void GuiWidgetBaseInit(lv_obj_t *obj, cJSON *json)
cJSON *type = cJSON_GetObjectItem(child, "type");
cJSON *textFunc = cJSON_GetObjectItem(child, "text_func");
if (type != NULL && textFunc != NULL &&
- !strcmp(type->valuestring, "label") &&
- (!strcmp(textFunc->valuestring, "GetSolMessageUtf8") ||
- !strcmp(textFunc->valuestring, "GetSolMessageRaw"))) {
+ !strcmp(type->valuestring, "label") &&
+ (!strcmp(textFunc->valuestring, "GetSolMessageUtf8") ||
+ !strcmp(textFunc->valuestring, "GetSolMessageRaw"))) {
GuiShowSolMessagePaged(obj, g_totalData,
!strcmp(textFunc->valuestring, "GetSolMessageRaw"));
continue;
@@ -467,9 +467,9 @@ void GuiWidgetBaseInit(lv_obj_t *obj, cJSON *json)
cJSON *ethType = cJSON_GetObjectItem(child, "type");
cJSON *ethTextFunc = cJSON_GetObjectItem(child, "text_func");
if (ethType != NULL && ethTextFunc != NULL &&
- !strcmp(ethType->valuestring, "label") &&
- (!strcmp(ethTextFunc->valuestring, "GetMessageUtf8") ||
- !strcmp(ethTextFunc->valuestring, "GetMessageRaw"))) {
+ !strcmp(ethType->valuestring, "label") &&
+ (!strcmp(ethTextFunc->valuestring, "GetMessageUtf8") ||
+ !strcmp(ethTextFunc->valuestring, "GetMessageRaw"))) {
GuiShowEthMessagePaged(obj, g_totalData,
!strcmp(ethTextFunc->valuestring, "GetMessageRaw"));
continue;
@@ -479,9 +479,9 @@ void GuiWidgetBaseInit(lv_obj_t *obj, cJSON *json)
cJSON *trxType = cJSON_GetObjectItem(child, "type");
cJSON *trxTextFunc = cJSON_GetObjectItem(child, "text_func");
if (trxType != NULL && trxTextFunc != NULL &&
- !strcmp(trxType->valuestring, "label") &&
- (!strcmp(trxTextFunc->valuestring, "GetTrxMessageUtf8") ||
- !strcmp(trxTextFunc->valuestring, "GetTrxMessageRaw"))) {
+ !strcmp(trxType->valuestring, "label") &&
+ (!strcmp(trxTextFunc->valuestring, "GetTrxMessageUtf8") ||
+ !strcmp(trxTextFunc->valuestring, "GetTrxMessageRaw"))) {
GuiShowTrxMessagePaged(obj, g_totalData,
!strcmp(trxTextFunc->valuestring, "GetTrxMessageRaw"));
continue;
@@ -1280,7 +1280,7 @@ void *GuiTemplateReload(lv_obj_t *parent, uint8_t index)
#ifdef COMPILE_SIMULATOR
if (g_reMapIndex != REMAPVIEW_BTC && g_reMapIndex != REMAPVIEW_BTC_MESSAGE
#ifdef WEB3_VERSION
- && g_reMapIndex != REMAPVIEW_SOL && g_reMapIndex != REMAPVIEW_SOL_MESSAGE
+ && g_reMapIndex != REMAPVIEW_SOL && g_reMapIndex != REMAPVIEW_SOL_MESSAGE
#endif
) {
return g_templateContainer;
### src/ui/gui_chain/gui_chain_components.c
@@ -119,7 +119,7 @@ lv_obj_t *CreateTransactionItemViewWithHintAndWidth(lv_obj_t *parent, const char
//render value
lv_obj_t *valueLabel = GuiCreateLabelWithFont(container, value,
- GetTransactionValueFont(value, g_defIllustrateFont, &openSansEnIllustrate));
+ GetTransactionValueFont(value, g_defIllustrateFont, &openSansEnIllustrate));
lv_obj_update_layout(valueLabel);
uint16_t valueWidth = lv_obj_get_width(valueLabel);
uint16_t valueHeight = lv_obj_get_height(valueLabel);
@@ -201,7 +201,7 @@ lv_obj_t *CreateTransactionOverviewCardWithWidth(lv_obj_t *parent, const char* t
uint16_t titleWidth = lv_obj_get_self_width(label);
label = GuiCreateLabelWithFont(container, text2,
- GetTransactionValueFont(text2, g_defIllustrateFont, &openSansEnIllustrate));
+ GetTransactionValueFont(text2, g_defIllustrateFont, &openSansEnIllustrate));
lv_obj_set_style_text_color(label, ORANGE_COLOR, LV_PART_MAIN);
lv_obj_update_layout(label);
lv_obj_t *valueLabel = label;
@@ -424,8 +424,8 @@ static size_t GuiPagedMessageFindBreak(const GuiPagedMessageState_t *state,
size_t offset, size_t length, bool newlineOnly)
{
size_t minimum = length > GUI_PAGED_MESSAGE_BREAK_SEARCH_BYTES
- ? length - GUI_PAGED_MESSAGE_BREAK_SEARCH_BYTES
- : 0;
+ ? length - GUI_PAGED_MESSAGE_BREAK_SEARCH_BYTES
+ : 0;
for (size_t i = length; i > minimum; i--) {
char value = state->source.byte_at(state->source.context, offset + i - 1);
if (value == '\n' || (!newlineOnly && (value == ' ' || value == '\t'))) {
@@ -442,8 +442,8 @@ static size_t GuiPagedMessagePageEnd(const GuiPagedMessageState_t *state, size_t
}
size_t remaining = state->source.length - offset;
size_t length = remaining < GUI_PAGED_MESSAGE_BYTES
- ? remaining
- : GUI_PAGED_MESSAGE_BYTES;
+ ? remaining
+ : GUI_PAGED_MESSAGE_BYTES;
size_t byteLimit = length;
if (offset + length < state->source.length && state->source.utf8) {
@@ -455,7 +455,7 @@ static size_t GuiPagedMessagePageEnd(const GuiPagedMessageState_t *state, size_t
length = semanticBreak;
}
while (length > 0 && GuiPagedMessageIsUtf8Continuation(
- state->source.byte_at(state->source.context, offset + length))) {
+ state->source.byte_at(state->source.context, offset + length))) {
length--;
}
if (length == 0) {
@@ -613,7 +613,7 @@ void GuiShowPagedMessage(lv_obj_t *parent, const GuiPagedMessageSource_t *source
if (source->warning_title != NULL && source->warning_content != NULL) {
state->warning = GuiPagedMessageWarning(
- state->viewport, source->warning_title, source->warning_content, contentWidth);
+ state->viewport, source->warning_title, source->warning_content, contentWidth);
lv_obj_set_pos(state->warning, 0, 0);
}
@@ -622,7 +622,7 @@ void GuiShowPagedMessage(lv_obj_t *parent, const GuiPagedMessageSource_t *source
lv_obj_set_width(state->label, contentWidth);
lv_obj_set_height(state->label, LV_SIZE_CONTENT);
lv_obj_set_style_text_font(state->label,
- source->font != NULL ? source->font : g_defIllustrateFont, LV_PART_MAIN);
+ source->font != NULL ? source->font : g_defIllustrateFont, LV_PART_MAIN);
lv_obj_set_style_text_color(state->label, WHITE_COLOR, LV_PART_MAIN);
lv_label_set_long_mode(state->label, LV_LABEL_LONG_WRAP);
### src/ui/gui_chain/multi/cypherpunk/gui_monero.c
@@ -353,7 +353,7 @@ void GuiShowXmrTransactionOverview(lv_obj_t *parent, void *totalData)
}
static lv_coord_t AddXmrDetailLabel(lv_obj_t *parent, const char *text, lv_coord_t y,
- bool muted, bool amount)
+ bool muted, bool amount)
{
lv_obj_t *label = GuiCreateIllustrateLabel(parent, text);
lv_obj_set_width(label, 360);
### src/ui/gui_chain/multi/gui_zcash.c
@@ -356,9 +356,9 @@ PtrT_TransactionCheckResult GuiGetZcashCheckResult(void)
#ifdef CYPHERPUNK_VERSION
UREncodeResult *GuiSignZcashCypherpunkWithSeed(void *data,
- bool unlimited,
- ZcashCypherpunkSignFunc signFunc,
- ZcashCypherpunkSignFunc unlimitedSignFunc)
+ bool unlimited,
+ ZcashCypherpunkSignFunc signFunc,
+ ZcashCypherpunkSignFunc unlimitedSignFunc)
{
bool enable = IsPreviousLockScreenEnable();
SetLockScreen(false);
### src/ui/gui_chain/multi/gui_zcash.h
@@ -10,15 +10,15 @@ void GuiZcashOverview(lv_obj_t *parent, void *totalData);
PtrT_TransactionCheckResult GuiGetZcashCheckResult(void);
#ifdef CYPHERPUNK_VERSION
typedef UREncodeResult *(*ZcashCypherpunkSignFunc)(void *data,
- PtrBytes seedFingerprint,
- uint32_t accountIndex,
- bool disabled,
- PtrBytes seed,
- uint32_t seedLen);
+ PtrBytes seedFingerprint,
+ uint32_t accountIndex,
+ bool disabled,
+ PtrBytes seed,
+ uint32_t seedLen);
UREncodeResult *GuiSignZcashCypherpunkWithSeed(void *data,
- bool unlimited,
- ZcashCypherpunkSignFunc signFunc,
- ZcashCypherpunkSignFunc unlimitedSignFunc);
+ bool unlimited,
+ ZcashCypherpunkSignFunc signFunc,
+ ZcashCypherpunkSignFunc unlimitedSignFunc);
#endif
UREncodeResult *GuiGetZcashSignQrCodeData(void);
UREncodeResult *GuiGetZcashSignUrDataUnlimited(void);
### src/ui/gui_chain/multi/web3/gui_ada.c
@@ -166,8 +166,8 @@ void *GuiGetAdaSignDataData(void)
do {
TransactionParseResult_DisplayCardanoSignData *parseResult =
g_viewTypeIndex == CardanoSignCip8Data
- ? cardano_parse_sign_cip8_data(data)
- : cardano_parse_sign_data(data);
+ ? cardano_parse_sign_cip8_data(data)
+ : cardano_parse_sign_data(data);
CHECK_CHAIN_BREAK(parseResult);
g_parseResult = (void *)parseResult;
} while (0);
@@ -506,7 +506,7 @@ void GuiShowAdaMultiAssetsWarning(lv_obj_t *parent, void *totalData)
lv_obj_align_to(title, warning_icon, LV_ALIGN_OUT_RIGHT_MID, 8, 0);
lv_obj_t *content = GuiCreateIllustrateLabel(
- card, "This transaction contains native assets. Review them in Outputs before signing.");
+ card, "This transaction contains native assets. Review them in Outputs before signing.");
lv_obj_set_width(content, ADA_TAB_CONTENT_WIDTH - 48);
lv_label_set_long_mode(content, LV_LABEL_LONG_WRAP);
lv_obj_align(content, LV_ALIGN_TOP_LEFT, 24, 64);
@@ -515,7 +515,7 @@ void GuiShowAdaMultiAssetsWarning(lv_obj_t *parent, void *totalData)
}
static lv_obj_t *GuiShowAdaReviewWarning(lv_obj_t *parent,
- DisplayCardanoTx *tx)
+ DisplayCardanoTx *tx)
{
bool hasAdvanced = tx->advanced_data != NULL && tx->advanced_data[0] != '\0';
const char *message = NULL;
@@ -540,7 +540,7 @@ static lv_obj_t *GuiShowAdaReviewWarning(lv_obj_t *parent,
return NULL;
}
lv_obj_t *card = GuiCreateContainerWithParent(
- parent, ADA_TAB_CONTENT_WIDTH, LV_SIZE_CONTENT);
+ parent, ADA_TAB_CONTENT_WIDTH, LV_SIZE_CONTENT);
lv_obj_align(card, LV_ALIGN_TOP_MID, 0, 16);
lv_obj_clear_flag(card, LV_OBJ_FLAG_SCROLLABLE);
lv_obj_clear_flag(card, LV_OBJ_FLAG_CLICKABLE);
@@ -585,8 +585,8 @@ static void GuiAdaAppendDetailValue(lv_obj_t *card, uint16_t *height,
}
static void GuiAdaAppendAssetDetailValue(lv_obj_t *card, uint16_t *height,
- const char *labelText,
- const char *value, bool highlight)
+ const char *labelText,
+ const char *value, bool highlight)
{
if (value == NULL) {
return;
@@ -669,7 +669,7 @@ static void GuiAdaAppendAssets(lv_obj_t *card, uint16_t *height,
}
for (size_t i = start; i < end; i++) {
lv_obj_t *assetCard = GuiCreateContainerWithParent(
- card, ADA_TAB_CONTENT_WIDTH - 48, 0);
+ card, ADA_TAB_CONTENT_WIDTH - 48, 0);
lv_obj_align(assetCard, LV_ALIGN_TOP_LEFT, 24, *height);
lv_obj_clear_flag(assetCard, LV_OBJ_FLAG_SCROLLABLE);
lv_obj_clear_flag(assetCard, LV_OBJ_FLAG_CLICKABLE);
@@ -764,7 +764,7 @@ static bool GuiAdaOutputIsMine(const DisplayCardanoTx *tx,
for (size_t i = 0; i < tx->from->size; i++) {
const DisplayCardanoFrom *input = &tx->from->data[i];
if (input->has_path && input->address != NULL &&
- strcmp(input->address, output->address) == 0) {
+ strcmp(input->address, output->address) == 0) {
return true;
}
}
@@ -777,7 +777,7 @@ static lv_obj_t *GuiAdaCreateOutputCard(lv_obj_t *parent, lv_obj_t *lastView,
size_t assetStart, size_t assetCount)
{
lv_obj_t *card = CreateRelativeTransactionContentContainer(
- parent, ADA_TAB_CONTENT_WIDTH, 0, lastView);
+ parent, ADA_TAB_CONTENT_WIDTH, 0, lastView);
lv_obj_clear_flag(card, LV_OBJ_FLAG_SCROLLABLE);
lv_obj_clear_flag(card, LV_OBJ_FLAG_CLICKABLE);
uint16_t height = 16;
@@ -813,7 +813,7 @@ static lv_obj_t *GuiAdaCreateInputCard(lv_obj_t *parent, lv_obj_t *lastView,
DisplayCardanoFrom *input, size_t index)
{
lv_obj_t *card = CreateRelativeTransactionContentContainer(
- parent, ADA_TAB_CONTENT_WIDTH, 0, lastView);
+ parent, ADA_TAB_CONTENT_WIDTH, 0, lastView);
lv_obj_clear_flag(card, LV_OBJ_FLAG_SCROLLABLE);
lv_obj_clear_flag(card, LV_OBJ_FLAG_CLICKABLE);
uint16_t height = 16;
@@ -860,8 +860,8 @@ static size_t GuiAdaOutputPageCount(const DisplayCardanoTo *output)
{
size_t assetCount = output->assets == NULL ? 0 : output->assets->size;
return assetCount == 0 ? 1
- : (assetCount + ADA_ASSETS_PER_PAGE - 1) /
- ADA_ASSETS_PER_PAGE;
+ : (assetCount + ADA_ASSETS_PER_PAGE - 1) /
+ ADA_ASSETS_PER_PAGE;
}
static bool GuiAdaResolveOutputPage(const DisplayCardanoTx *tx, size_t page,
@@ -931,7 +931,7 @@ static void GuiAdaAssetPagerRefresh(GuiAdaAssetPager_t *state)
lv_obj_t *child = lv_obj_get_child(parent, i);
if (afterSection) {
lv_obj_set_y(child, lv_obj_get_y(child) +
- newSectionHeight - oldSectionHeight);
+ newSectionHeight - oldSectionHeight);
} else if (child == state->section) {
afterSection = true;
}
@@ -985,13 +985,13 @@ static lv_obj_t *GuiAdaAppendAssetPager(
}
bool singleAsset = assets->size == 1;
lv_obj_t *section = CreateRelativeTransactionContentContainer(
- parent, ADA_TAB_CONTENT_WIDTH, 0, lastView);
+ parent, ADA_TAB_CONTENT_WIDTH, 0, lastView);
lv_obj_clear_flag(section, LV_OBJ_FLAG_SCROLLABLE);
lv_obj_clear_flag(section, LV_OBJ_FLAG_CLICKABLE);
const char *sectionTitle = showMintAction
- ? GuiAdaMintAction(assets->data[0].amount)
- : title;
+ ? GuiAdaMintAction(assets->data[0].amount)
+ : title;
lv_obj_t *titleLabel = GuiCreateIllustrateLabel(section, sectionTitle);
lv_obj_set_style_text_color(titleLabel, ORANGE_COLOR, LV_PART_MAIN);
lv_obj_align(titleLabel, LV_ALIGN_TOP_LEFT, 24, 16);
@@ -1014,7 +1014,7 @@ static lv_obj_t *GuiAdaAppendAssetPager(
state->section = section;
state->title_label = titleLabel;
state->viewport = GuiCreateContainerWithParent(
- section, ADA_TAB_CONTENT_WIDTH, 1);
+ section, ADA_TAB_CONTENT_WIDTH, 1);
lv_obj_align(state->viewport, LV_ALIGN_TOP_LEFT, 0, 58);
lv_obj_set_style_bg_opa(state->viewport, LV_OPA_TRANSP, LV_PART_MAIN);
lv_obj_set_style_pad_all(state->viewport, 0, LV_PART_MAIN);
@@ -1108,11 +1108,11 @@ static void GuiAdaUtxoPagerDelete(lv_event_t *event)
static void GuiShowAdaUtxos(lv_obj_t *parent, DisplayCardanoTx *tx, bool outputs)
{
size_t count = outputs ? (tx->to == NULL ? 0 : tx->to->size)
- : (tx->from == NULL ? 0 : tx->from->size);
+ : (tx->from == NULL ? 0 : tx->from->size);
if (count == 0) {
if (outputs) {
lv_obj_t *emptyCard = CreateTransactionItemViewWithWidth(
- parent, "Outputs", "No outputs", NULL, ADA_TAB_CONTENT_WIDTH);
+ parent, "Outputs", "No outputs", NULL, ADA_TAB_CONTENT_WIDTH);
lv_obj_align(emptyCard, LV_ALIGN_TOP_MID, 0, 0);
lv_obj_clear_flag(emptyCard, LV_OBJ_FLAG_SCROLLABLE);
lv_obj_clear_flag(emptyCard, LV_OBJ_FLAG_CLICKABLE);
@@ -1140,7 +1140,7 @@ static void GuiShowAdaUtxos(lv_obj_t *parent, DisplayCardanoTx *tx, bool outputs
lv_obj_clear_flag(parent, LV_OBJ_FLAG_SCROLLABLE);
lv_obj_clear_flag(parent, LV_OBJ_FLAG_CLICKABLE);
state->viewport = GuiCreateContainerWithParent(
- parent, ADA_TAB_CONTENT_WIDTH, ADA_TX_PAGER_HEIGHT);
+ parent, ADA_TAB_CONTENT_WIDTH, ADA_TX_PAGER_HEIGHT);
lv_obj_align(state->viewport, LV_ALIGN_TOP_MID, 0, 0);
lv_obj_set_style_bg_opa(state->viewport, LV_OPA_TRANSP, LV_PART_MAIN);
lv_obj_set_style_pad_all(state->viewport, 0, LV_PART_MAIN);
@@ -1177,10 +1177,10 @@ void GuiShowAdaOutputs(lv_obj_t *parent, void *totalData)
}
static lv_obj_t *GuiAdaAppendOverviewItem(lv_obj_t *parent, lv_obj_t *lastView,
- const char *title, const char *value)
+ const char *title, const char *value)
{
lv_obj_t *card = CreateTransactionItemViewWithWidth(
- parent, title, value == NULL ? "" : value, lastView, ADA_TAB_CONTENT_WIDTH);
+ parent, title, value == NULL ? "" : value, lastView, ADA_TAB_CONTENT_WIDTH);
if (lastView == NULL) {
lv_obj_align(card, LV_ALIGN_TOP_MID, 0, 0);
}
@@ -1194,7 +1194,7 @@ static lv_obj_t *GuiAdaAppendCertificateCard(
const DisplayCardanoCertificate *certificate, size_t index)
{
lv_obj_t *card = CreateRelativeTransactionContentContainer(
- parent, ADA_TAB_CONTENT_WIDTH, 0, lastView);
+ parent, ADA_TAB_CONTENT_WIDTH, 0, lastView);
lv_obj_clear_flag(card, LV_OBJ_FLAG_SCROLLABLE);
lv_obj_clear_flag(card, LV_OBJ_FLAG_CLICKABLE);
uint16_t height = 16;
@@ -1221,7 +1221,7 @@ static lv_obj_t *GuiAdaAppendWithdrawalCard(
const DisplayCardanoWithdrawal *withdrawal, size_t index)
{
lv_obj_t *card = CreateRelativeTransactionContentContainer(
- parent, ADA_TAB_CONTENT_WIDTH, 0, lastView);
+ parent, ADA_TAB_CONTENT_WIDTH, 0, lastView);
lv_obj_clear_flag(card, LV_OBJ_FLAG_SCROLLABLE);
lv_obj_clear_flag(card, LV_OBJ_FLAG_CLICKABLE);
uint16_t height = 16;
@@ -1243,7 +1243,7 @@ static lv_obj_t *GuiAdaAppendVotingProcedureCard(
const DisplayVotingProcedure *procedure, size_t index)
{
lv_obj_t *card = CreateRelativeTransactionContentContainer(
- parent, ADA_TAB_CONTENT_WIDTH, 0, lastView);
+ parent, ADA_TAB_CONTENT_WIDTH, 0, lastView);
lv_obj_clear_flag(card, LV_OBJ_FLAG_SCROLLABLE);
lv_obj_clear_flag(card, LV_OBJ_FLAG_CLICKABLE);
uint16_t height = 16;
@@ -1271,7 +1271,7 @@ static lv_obj_t *GuiAdaAppendVotingProposalCard(
const DisplayVotingProposal *proposal, size_t index)
{
lv_obj_t *card = CreateRelativeTransactionContentContainer(
- parent, ADA_TAB_CONTENT_WIDTH, 0, lastView);
+ parent, ADA_TAB_CONTENT_WIDTH, 0, lastView);
lv_obj_clear_flag(card, LV_OBJ_FLAG_SCROLLABLE);
lv_obj_clear_flag(card, LV_OBJ_FLAG_CLICKABLE);
uint16_t height = 16;
@@ -1315,7 +1315,7 @@ void GuiShowAdaSignData(lv_obj_t *parent, void *totalData)
lv_obj_t *lastView = NULL;
if (data->payload_is_hex) {
lv_obj_t *card = GuiCreateContainerWithParent(
- parent, ADA_TAB_CONTENT_WIDTH, LV_SIZE_CONTENT);
+ parent, ADA_TAB_CONTENT_WIDTH, LV_SIZE_CONTENT);
lv_obj_align(card, LV_ALIGN_TOP_MID, 0, 0);
lv_obj_clear_flag(card, LV_OBJ_FLAG_SCROLLABLE);
lv_obj_clear_flag(card, LV_OBJ_FLAG_CLICKABLE);
@@ -1329,7 +1329,7 @@ void GuiShowAdaSignData(lv_obj_t *parent, void *totalData)
lv_obj_set_style_text_color(title, YELLOW_COLOR, LV_PART_MAIN);
lv_obj_align_to(title, icon, LV_ALIGN_OUT_RIGHT_MID, 8, 0);
lv_obj_t *content = GuiCreateIllustrateLabel(
- card, "This message cannot be displayed as text. Verify the raw hex before signing.");
+ card, "This message cannot be displayed as text. Verify the raw hex before signing.");
lv_obj_set_width(content, ADA_TAB_CONTENT_WIDTH - 48);
lv_label_set_long_mode(content, LV_LABEL_LONG_WRAP);
lv_obj_align(content, LV_ALIGN_TOP_LEFT, 24, 64);
@@ -1339,13 +1339,13 @@ void GuiShowAdaSignData(lv_obj_t *parent, void *totalData)
}
lastView = GuiAdaAppendOverviewItem(
- parent, lastView, "Signing type",
- g_viewTypeIndex == CardanoSignCip8Data ? "CIP-8 message" : "Cardano sign data");
+ parent, lastView, "Signing type",
+ g_viewTypeIndex == CardanoSignCip8Data ? "CIP-8 message" : "Cardano sign data");
lastView = GuiAdaAppendOverviewItem(parent, lastView, "Path", data->derivation_path);
lastView = GuiAdaAppendOverviewItem(parent, lastView, "Public key", data->xpub);
if (data->hash_payload) {
lastView = GuiAdaAppendOverviewItem(
- parent, lastView, "Signing hash", data->message_hash);
+ parent, lastView, "Signing hash", data->message_hash);
}
GuiAdaAppendOverviewItem(parent, lastView, "Message", data->payload);
lv_obj_update_layout(parent);
@@ -1364,74 +1364,74 @@ static void GuiShowAdaOverview(lv_obj_t *parent, DisplayCardanoTx *tx)
lv_obj_t *lastView = GuiShowAdaReviewWarning(parent, tx);
lastView = GuiAdaAppendOverviewItem(parent, lastView, "Network", tx->network);
lastView = GuiAdaAppendOverviewItem(
- parent, lastView, tx->has_unknown_inputs ? "Known input total" : "Total input",
- tx->total_input);
+ parent, lastView, tx->has_unknown_inputs ? "Known input total" : "Total input",
+ tx->total_input);
if (tx->withdrawals_total != NULL && tx->withdrawals_total[0] != '\0') {
lastView = GuiAdaAppendOverviewItem(
- parent, lastView, "Withdrawals total", tx->withdrawals_total);
+ parent, lastView, "Withdrawals total", tx->withdrawals_total);
}
lastView = GuiAdaAppendOverviewItem(parent, lastView, "Total output", tx->total_output);
lastView = GuiAdaAppendOverviewItem(parent, lastView, "Fee", tx->fee);
char countText[BUFFER_SIZE_32] = {0};
if (tx->validity_start != NULL && tx->validity_start[0] != '\0') {
lastView = GuiAdaAppendOverviewItem(
- parent, lastView, "Validity start", tx->validity_start);
+ parent, lastView, "Validity start", tx->validity_start);
}
if (tx->ttl != NULL && tx->ttl[0] != '\0') {
lastView = GuiAdaAppendOverviewItem(parent, lastView, "TTL", tx->ttl);
}
lastView = GuiAdaAppendOverviewItem(
- parent, lastView, "Script validity",
- tx->transaction_is_valid ? "Valid flag" : "Invalid flag");
+ parent, lastView, "Script validity",
+ tx->transaction_is_valid ? "Valid flag" : "Invalid flag");
lastView = GuiAdaAppendAssetPager(
- parent, lastView, "Mint / burn", tx->mint_assets, true);
+ parent, lastView, "Mint / burn", tx->mint_assets, true);
if (tx->collateral_inputs_count > 0) {
snprintf_s(countText, sizeof(countText), "%u",
(unsigned)tx->collateral_inputs_count);
lastView = GuiAdaAppendOverviewItem(
- parent, lastView, "Collateral inputs", countText);
+ parent, lastView, "Collateral inputs", countText);
}
if (tx->total_collateral != NULL && tx->total_collateral[0] != '\0') {
lastView = GuiAdaAppendOverviewItem(
- parent, lastView, "Total collateral", tx->total_collateral);
+ parent, lastView, "Total collateral", tx->total_collateral);
}
if (tx->collateral_return != NULL && tx->collateral_return[0] != '\0') {
lastView = GuiAdaAppendOverviewItem(
- parent, lastView, "Collateral return", tx->collateral_return);
+ parent, lastView, "Collateral return", tx->collateral_return);
}
lastView = GuiAdaAppendAssetPager(
- parent, lastView, "Collateral return assets", tx->collateral_assets, false);
+ parent, lastView, "Collateral return assets", tx->collateral_assets, false);
if (tx->reference_inputs_count > 0) {
snprintf_s(countText, sizeof(countText), "%u",
(unsigned)tx->reference_inputs_count);
lastView = GuiAdaAppendOverviewItem(
- parent, lastView, "Reference inputs", countText);
+ parent, lastView, "Reference inputs", countText);
}
if (tx->donation != NULL && tx->donation[0] != '\0') {
lastView = GuiAdaAppendOverviewItem(parent, lastView, "Donation", tx->donation);
}
if (tx->certificates != NULL && tx->certificates->size > 0) {
for (size_t i = 0; i < tx->certificates->size; i++) {
lastView = GuiAdaAppendCertificateCard(
- parent, lastView, &tx->certificates->data[i], i);
+ parent, lastView, &tx->certificates->data[i], i);
}
}
if (tx->withdrawals != NULL && tx->withdrawals->size > 0) {
for (size_t i = 0; i < tx->withdrawals->size; i++) {
lastView = GuiAdaAppendWithdrawalCard(
- parent, lastView, &tx->withdrawals->data[i], i);
+ parent, lastView, &tx->withdrawals->data[i], i);
}
}
if (tx->voting_procedures != NULL && tx->voting_procedures->size > 0) {
for (size_t i = 0; i < tx->voting_procedures->size; i++) {
lastView = GuiAdaAppendVotingProcedureCard(
- parent, lastView, &tx->voting_procedures->data[i], i);
+ parent, lastView, &tx->voting_procedures->data[i], i);
}
}
if (tx->voting_proposals != NULL && tx->voting_proposals->size > 0) {
for (size_t i = 0; i < tx->voting_proposals->size; i++) {
lastView = GuiAdaAppendVotingProposalCard(
- parent, lastView, &tx->voting_proposals->data[i], i);
+ parent, lastView, &tx->voting_proposals->data[i], i);
}
}
if (tx->required_signers_count > 0) {
@@ -1513,8 +1513,8 @@ void GuiShowAdaTx(lv_obj_t *parent, void *totalData)
lv_obj_t *inputs = lv_tabview_add_tab(tabview, "Inputs");
lv_obj_t *outputs = lv_tabview_add_tab(tabview, "Outputs");
lv_obj_t *advanced = hasAdvanced
- ? lv_tabview_add_tab(tabview, "Advanced")
- : NULL;
+ ? lv_tabview_add_tab(tabview, "Advanced")
+ : NULL;
lv_obj_t *raw = lv_tabview_add_tab(tabview, "Raw");
lv_btnmatrix_set_btn_width(tabButtons, 0, 7);
lv_btnmatrix_set_btn_width(tabButtons, 1, 5);
@@ -1550,8 +1550,8 @@ static void GuiShowAdaJsonData(lv_obj_t *parent, const char *json)
lv_obj_set_height(parent, ADA_TX_CONTENT_HEIGHT);
lv_obj_t *content = GuiCreateContainerWithParent(
- parent, ADA_TAB_CONTENT_WIDTH,
- ADA_TX_CONTENT_HEIGHT - ADA_TAB_CONTENT_TOP_GAP);
+ parent, ADA_TAB_CONTENT_WIDTH,
+ ADA_TX_CONTENT_HEIGHT - ADA_TAB_CONTENT_TOP_GAP);
lv_obj_align(content, LV_ALIGN_TOP_MID, 0, 0);
lv_obj_set_style_bg_opa(content, LV_OPA_TRANSP, LV_PART_MAIN);
GuiShowPagedMessageText(content, json, true, NULL, NULL);
@@ -1566,8 +1566,8 @@ void GuiShowAdaRawData(lv_obj_t *parent, void *totalData)
lv_obj_set_height(parent, ADA_TX_CONTENT_HEIGHT);
lv_obj_t *content = GuiCreateContainerWithParent(
- parent, ADA_TAB_CONTENT_WIDTH,
- ADA_TX_CONTENT_HEIGHT - ADA_TAB_CONTENT_TOP_GAP);
+ parent, ADA_TAB_CONTENT_WIDTH,
+ ADA_TX_CONTENT_HEIGHT - ADA_TAB_CONTENT_TOP_GAP);
lv_obj_align(content, LV_ALIGN_TOP_MID, 0, 0);
lv_obj_set_style_bg_opa(content, LV_OPA_TRANSP, LV_PART_MAIN);
GuiShowPagedMessageText(content, tx->raw_data, true, NULL, NULL);
@@ -1930,8 +1930,8 @@ lv_obj_t* GuiCreateAdaNoticeCard(lv_obj_t* parent)
lv_obj_align_to(title_label, warningIcon, LV_ALIGN_OUT_RIGHT_MID, 8, 0);
lv_obj_t* content_label = GuiCreateIllustrateLabel(
- card,
- "Only the transaction hash is available. The recipient, amount, and other transaction details cannot be verified on this device.");
+ card,
+ "Only the transaction hash is available. The recipient, amount, and other transaction details cannot be verified on this device.");
lv_obj_set_style_text_color(content_label, lv_color_hex(0xFFFFFF), LV_PART_MAIN);
lv_obj_set_width(content_label, 360);
lv_label_set_long_mode(content_label, LV_LABEL_LONG_WRAP);
@@ -2008,8 +2008,8 @@ void GuiShowAdaSignTxHashDetails(lv_obj_t *parent, void *totalData)
Ptr_VecFFI_PtrString addressList = hashData->address_list;
Ptr_VecFFI_PtrString pathList = hashData->path;
if (addressList == NULL || pathList == NULL ||
- (addressList->size > 0 && addressList->data == NULL) ||
- (pathList->size > 0 && pathList->data == NULL)) {
+ (addressList->size > 0 && addressList->data == NULL) ||
+ (pathList->size > 0 && pathList->data == NULL)) {
return;
}
for (size_t i = 0; i < addressList->size; i++) {
@@ -2062,8 +2062,8 @@ void GuiShowAdaSignTxHashDetails(lv_obj_t *parent, void *totalData)
lv_label_set_long_mode(tx_hash_value, LV_LABEL_LONG_WRAP);
lv_obj_t *tx_hash_notice_content = GuiCreateIllustrateLabel(
- tx_hash_card,
- "Blind signing: verify this hash with the software wallet before signing.");
+ tx_hash_card,
+ "Blind signing: verify this hash with the software wallet before signing.");
lv_obj_set_width(tx_hash_notice_content, lv_pct(90));
lv_obj_set_style_text_color(tx_hash_notice_content, lv_color_hex(0xF5C131), LV_PART_MAIN);
lv_obj_align_to(tx_hash_notice_content, tx_hash_value, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 8);
### src/ui/gui_chain/multi/web3/gui_ar.c
@@ -142,12 +142,12 @@ void GuiArTxOverview(lv_obj_t *parent, void *totalData)
GuiArPrepareComponentParent(parent, 444);
lv_obj_t *lastView = CreateTransactionOverviewCardWithWidth(
- parent,
- _("Value"),
- txData->value,
- _("Fee"),
- txData->fee,
- AR_COMPONENT_WIDTH);
+ parent,
+ _("Value"),
+ txData->value,
+ _("Fee"),
+ txData->fee,
+ AR_COMPONENT_WIDTH);
lastView = CreateTransactionItemViewWithWidth(parent, _("From"), txData->from, lastView, AR_COMPONENT_WIDTH);
CreateTransactionItemViewWithWidth(parent, _("Destination"), txData->to, lastView, AR_COMPONENT_WIDTH);
}
### src/ui/gui_chain/multi/web3/gui_avax.c
@@ -98,7 +98,7 @@ static lv_obj_t *GuiAvaxCreateDetailsAddressCard(
const DisplayUtxoFromTo *item)
{
lv_obj_t *card = CreateRelativeTransactionContentContainer(
- parent, AVAX_COMPONENT_WIDTH, 0, lastView);
+ parent, AVAX_COMPONENT_WIDTH, 0, lastView);
uint16_t height = 16;
lv_obj_t *label = GuiCreateIllustrateLabel(card, title);
@@ -159,11 +159,11 @@ static lv_obj_t *GuiAvaxAppendAddresses(
lastView = GuiAvaxCreateDetailsAddressCard(parent, lastView, title, &ptr[i]);
} else {
lastView = CreateTransactionItemViewWithWidth(
- parent,
- title,
- ptr[i].address,
- lastView,
- AVAX_COMPONENT_WIDTH);
+ parent,
+ title,
+ ptr[i].address,
+ lastView,
+ AVAX_COMPONENT_WIDTH);
}
}
return lastView;
@@ -175,37 +175,37 @@ void GuiAvaxTxOverview(lv_obj_t *parent, void *totalData)
GuiAvaxPrepareComponentParent(parent);
lv_obj_t *lastView = CreateTransactionOverviewCardWithWidth(
- parent,
- _("Value"),
- txData->data->amount,
- _("Fee"),
- txData->data->fee_amount,
- AVAX_COMPONENT_WIDTH);
+ parent,
+ _("Value"),
+ txData->data->amount,
+ _("Fee"),
+ txData->data->fee_amount,
+ AVAX_COMPONENT_WIDTH);
if (txData->data->network != NULL) {
lastView = CreateTransactionItemViewWithWidth(
- parent,
- txData->data->network_key,
- txData->data->network,
- lastView,
- AVAX_COMPONENT_WIDTH);
+ parent,
+ txData->data->network_key,
+ txData->data->network,
+ lastView,
+ AVAX_COMPONENT_WIDTH);
if (txData->data->subnet_id != NULL) {
lastView = CreateTransactionItemViewWithWidth(
- parent, _("Subnet ID"), txData->data->subnet_id, lastView, AVAX_COMPONENT_WIDTH);
+ parent, _("Subnet ID"), txData->data->subnet_id, lastView, AVAX_COMPONENT_WIDTH);
}
}
if (txData->data->method != NULL) {
lastView = CreateTransactionItemViewWithWidth(
- parent,
- txData->data->method->method_key,
- txData->data->method->method,
- lastView,
- AVAX_COMPONENT_WIDTH);
+ parent,
+ txData->data->method->method_key,
+ txData->data->method->method,
+ lastView,
+ AVAX_COMPONENT_WIDTH);
}
lastView = GuiAvaxAppendAddresses(
- parent, lastView, _("From"), txData->data->from->data, txData->data->from->size, false);
+ parent, lastView, _("From"), txData->data->from->data, txData->data->from->size, false);
GuiAvaxAppendAddresses(
parent, lastView, _("To"), txData->data->to->data, txData->data->to->size, false);
}
@@ -218,49 +218,49 @@ void GuiAvaxTxRawData(lv_obj_t *parent, void *totalData)
lv_obj_t *lastView = NULL;
if (txData->data->network != NULL) {
lastView = CreateTransactionItemViewWithWidth(
- parent,
- txData->data->network_key,
- txData->data->network,
- lastView,
- AVAX_COMPONENT_WIDTH);
+ parent,
+ txData->data->network_key,
+ txData->data->network,
+ lastView,
+ AVAX_COMPONENT_WIDTH);
if (txData->data->subnet_id != NULL) {
lastView = CreateTransactionItemViewWithWidth(
- parent, _("Subnet ID"), txData->data->subnet_id, lastView, AVAX_COMPONENT_WIDTH);
+ parent, _("Subnet ID"), txData->data->subnet_id, lastView, AVAX_COMPONENT_WIDTH);
}
}
if (txData->data->method != NULL) {
char startTime[BUFFER_SIZE_64] = {0}, endTime[BUFFER_SIZE_64] = {0};
lastView = CreateTransactionItemViewWithWidth(
- parent,
- txData->data->method->method_key,
- txData->data->method->method,
- lastView,
- AVAX_COMPONENT_WIDTH);
+ parent,
+ txData->data->method->method_key,
+ txData->data->method->method,
+ lastView,
+ AVAX_COMPONENT_WIDTH);
if (txData->data->method->start_time != 0 && txData->data->method->end_time != 0) {
StampTimeToUtcTime(txData->data->method->start_time, startTime, sizeof(startTime));
StampTimeToUtcTime(txData->data->method->end_time, endTime, sizeof(endTime));
lastView = CreateTransactionItemViewWithWidth(
- parent, _("Start time"), startTime, lastView, AVAX_COMPONENT_WIDTH);
+ parent, _("Start time"), startTime, lastView, AVAX_COMPONENT_WIDTH);
lastView = CreateTransactionItemViewWithWidth(
- parent, _("End Time"), endTime, lastView, AVAX_COMPONENT_WIDTH);
+ parent, _("End Time"), endTime, lastView, AVAX_COMPONENT_WIDTH);
}
}
lastView = CreateTransactionItemViewWithWidth(
- parent, _("Total Input"), txData->data->total_input_amount, lastView, AVAX_COMPONENT_WIDTH);
+ parent, _("Total Input"), txData->data->total_input_amount, lastView, AVAX_COMPONENT_WIDTH);
lastView = CreateTransactionItemViewWithWidth(
- parent, _("Total Output"), txData->data->total_output_amount, lastView, AVAX_COMPONENT_WIDTH);
+ parent, _("Total Output"), txData->data->total_output_amount, lastView, AVAX_COMPONENT_WIDTH);
lastView = CreateTransactionItemViewWithWidth(
- parent, _("Fee"), txData->data->fee_amount, lastView, AVAX_COMPONENT_WIDTH);
+ parent, _("Fee"), txData->data->fee_amount, lastView, AVAX_COMPONENT_WIDTH);
if (txData->data->reward_address != NULL) {
lastView = CreateTransactionItemViewWithWidth(
- parent, _("Reward Address"), txData->data->reward_address, lastView, AVAX_COMPONENT_WIDTH);
+ parent, _("Reward Address"), txData->data->reward_address, lastView, AVAX_COMPONENT_WIDTH);
}
lastView = GuiAvaxAppendAddresses(
- parent, lastView, _("From"), txData->data->from->data, txData->data->from->size, true);
+ parent, lastView, _("From"), txData->data->from->data, txData->data->from->size, true);
GuiAvaxAppendAddresses(
parent, lastView, _("To"), txData->data->to->data, txData->data->to->size, true);
}
### src/ui/gui_chain/multi/web3/gui_cosmos.c
@@ -62,7 +62,7 @@ static cJSON *GetCosmosParsedDetailRoot(DisplayCosmosTx *tx);
static lv_obj_t *CreateCosmosMessageTitle(lv_obj_t *parent, size_t index, lv_obj_t *lastView);
static lv_obj_t *CreateCosmosJsonItem(lv_obj_t *parent, const char *key, const cJSON *value, lv_obj_t *lastView);
static lv_obj_t *CreateCosmosHighlightedJsonItem(lv_obj_t *parent, const char *key,
- const cJSON *value, lv_obj_t *lastView);
+ const cJSON *value, lv_obj_t *lastView);
static lv_obj_t *CreateCosmosJsonFields(lv_obj_t *parent, const cJSON *object, lv_obj_t *lastView,
bool overview, bool showMessageIndex);
static lv_obj_t *CreateCosmosDetailsMessageCard(
@@ -484,7 +484,7 @@ void GuiCosmosTxDetails(lv_obj_t *parent, void *totalData)
}
static uint16_t CreateCosmosDetailInlineValue(lv_obj_t *container, const char *titleText,
- const char *valueText, uint16_t y, bool highlight)
+ const char *valueText, uint16_t y, bool highlight)
{
if (valueText == NULL) {
return y;
@@ -523,11 +523,11 @@ static lv_obj_t *CreateCosmosVoteDetails(lv_obj_t *parent, const cJSON *message,
uint16_t y = 16;
y = CreateCosmosDetailInlineValue(
- container, "Proposal", GetCosmosJsonString(message, "Proposal"), y, true);
+ container, "Proposal", GetCosmosJsonString(message, "Proposal"), y, true);
y = CreateCosmosDetailInlineValue(
- container, "Voted", GetCosmosJsonString(message, "Voted"), y, true);
+ container, "Voted", GetCosmosJsonString(message, "Voted"), y, true);
y = CreateCosmosDetailInlineValue(
- container, "Method", GetCosmosJsonString(message, "Method"), y, false);
+ container, "Method", GetCosmosJsonString(message, "Method"), y, false);
lv_obj_t *voterTitle = GuiCreateIllustrateLabel(container, _("Voter"));
lv_obj_align(voterTitle, LV_ALIGN_TOP_LEFT, 24, y);
@@ -560,7 +560,7 @@ static lv_obj_t *CreateCosmosFeeDetails(lv_obj_t *parent, const cJSON *common, l
y = CreateCosmosDetailInlineValue(container, "Max Fee", maxFee, y, false);
if (maxFee != NULL) {
lv_obj_t *description = GuiCreateLabelWithFont(
- container, " · Max Fee Price * Gas Limit", &openSansDesc);
+ container, " · Max Fee Price * Gas Limit", &openSansDesc);
lv_obj_set_style_text_opa(description, LV_OPA_64, LV_PART_MAIN);
lv_obj_align(description, LV_ALIGN_TOP_LEFT, 24, y);
lv_obj_update_layout(description);
@@ -627,7 +627,7 @@ static lv_obj_t *CreateCosmosJsonItem(lv_obj_t *parent, const char *key, const c
}
static lv_obj_t *CreateCosmosHighlightedJsonItem(lv_obj_t *parent, const char *key,
- const cJSON *value, lv_obj_t *lastView)
+ const cJSON *value, lv_obj_t *lastView)
{
lv_obj_t *view = CreateCosmosJsonItem(parent, key, value, lastView);
if (view != lastView) {
@@ -655,7 +655,7 @@ static bool IsCosmosHighlightedDetailField(const char *key)
static bool AppendCosmosDetailsField(lv_obj_t *container, const cJSON *field, uint16_t *y)
{
if (field == NULL || field->string == NULL || !cJSON_IsString(field) ||
- field->valuestring == NULL || field->valuestring[0] == '\0') {
+ field->valuestring == NULL || field->valuestring[0] == '\0') {
return false;
}
@@ -748,11 +748,11 @@ static lv_obj_t *CreateCosmosDetailsMessageCard(
for (size_t i = 0; i < preferredCount; i++) {
hasField |= AppendCosmosDetailsField(
- container, cJSON_GetObjectItem(object, preferredKeys[i]), &y);
+ container, cJSON_GetObjectItem(object, preferredKeys[i]), &y);
}
for (const cJSON *field = object->child; field != NULL; field = field->next) {
if (field->string == NULL ||
- IsCosmosPreferredDetailField(field->string, preferredKeys, preferredCount)) {
+ IsCosmosPreferredDetailField(field->string, preferredKeys, preferredCount)) {
continue;
}
hasField |= AppendCosmosDetailsField(container, field, &y);
@@ -882,7 +882,7 @@ static lv_obj_t *CreateCosmosOverviewCommonFields(
cJSON *network = cJSON_GetObjectItem(common, "Network");
lastView = CreateCosmosJsonItem(parent, "Network", network, lastView);
if (cJSON_IsString(network) && network->valuestring != NULL &&
- strcmp(network->valuestring, "Unknown Network") == 0) {
+ strcmp(network->valuestring, "Unknown Network") == 0) {
lastView = CreateCosmosJsonItem(parent, "Chain ID",
cJSON_GetObjectItem(common, "Chain ID"), lastView);
}
### src/ui/gui_chain/multi/web3/gui_eth.c
@@ -752,7 +752,7 @@ static bool isErc20Transfer(void *param)
const size_t erc20TransferCalldataLen = 136;
const char *erc20TransferSelector = "a9059cbb";
if (strnlen_s(input, erc20TransferCalldataLen + 1) != erc20TransferCalldataLen ||
- strncmp(input, erc20TransferSelector, 8) != 0) {
+ strncmp(input, erc20TransferSelector, 8) != 0) {
return false;
}
@@ -873,7 +873,7 @@ void *GuiGetEthTypeData(void)
break;
}
if (parseResult->data == NULL || parseResult->data->message == NULL ||
- parseResult->data->primary_type == NULL) {
+ parseResult->data->primary_type == NULL) {
free_TransactionParseResult_DisplayETHTypedData(parseResult);
break;
}
@@ -886,7 +886,7 @@ void *GuiGetEthTypeData(void)
}
if (strcmp(parseResult->data->primary_type, "SafeTx") == 0 &&
- !ParseSafeTxOperation(json, &g_isOperation)) {
+ !ParseSafeTxOperation(json, &g_isOperation)) {
cJSON_Delete(json);
free_TransactionParseResult_DisplayETHTypedData(parseResult);
break;
@@ -1258,7 +1258,7 @@ void GuiEthTxOverview(lv_obj_t *parent, void *totalData)
}
if (eth->overview->from == NULL) {
lv_obj_t *notice = CreateNoticeCardWithWidth(
- parent, _("custom_path_parse_notice"), ETH_COMPONENT_WIDTH);
+ parent, _("custom_path_parse_notice"), ETH_COMPONENT_WIDTH);
if (lastView != NULL) {
lv_obj_align_to(notice, lastView, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 16);
}
@@ -1283,7 +1283,7 @@ void GuiEthTxDetails(lv_obj_t *parent, void *totalData)
}
if (eth->overview->from == NULL) {
lv_obj_t *notice = CreateNoticeCardWithWidth(
- parent, _("custom_path_parse_notice"), ETH_COMPONENT_WIDTH);
+ parent, _("custom_path_parse_notice"), ETH_COMPONENT_WIDTH);
if (lastView != NULL) {
lv_obj_align_to(notice, lastView, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 16);
}
@@ -1296,11 +1296,11 @@ void GuiEthTxDetails(lv_obj_t *parent, void *totalData)
char method[96] = {0};
GetEthMethodName(method, eth, sizeof(method));
lastView = CreateTransactionItemViewWithWidth(
- parent, _("Method"), method, lastView, ETH_COMPONENT_WIDTH);
+ parent, _("Method"), method, lastView, ETH_COMPONENT_WIDTH);
}
lastView = CreateTransactionItemViewWithWidth(
- parent, _("nonce"), eth->detail->nonce, lastView, ETH_COMPONENT_WIDTH);
+ parent, _("nonce"), eth->detail->nonce, lastView, ETH_COMPONENT_WIDTH);
lastView = CreateEthAddressView(parent, eth, lastView, true);
lastView = CreateEthDetailsContractViews(parent, eth, lastView);
lv_obj_update_layout(parent);
@@ -1320,7 +1320,7 @@ static lv_obj_t *CreateEthOverviewValueView(lv_obj_t *parent, DisplayETH *eth, l
}
lv_obj_t *container = CreateRelativeTransactionContentContainer(
- parent, ETH_COMPONENT_WIDTH, 144, lastView);
+ parent, ETH_COMPONENT_WIDTH, 144, lastView);
lv_obj_t *label = GuiCreateIllustrateLabel(container, title);
lv_obj_align(label, LV_ALIGN_TOP_LEFT, 24, 16);
lv_obj_set_style_text_opa(label, LV_OPA_64, LV_PART_MAIN);
@@ -1374,13 +1374,13 @@ static lv_obj_t *CreateEthOverviewNetworkView(lv_obj_t *parent, DisplayETH *eth,
char network[64] = {0};
GetEthNetWork(network, eth, sizeof(network));
return CreateTransactionItemViewWithWidth(
- parent, _("Network"), network, lastView, ETH_COMPONENT_WIDTH);
+ parent, _("Network"), network, lastView, ETH_COMPONENT_WIDTH);
}
static lv_obj_t *CreateEthReplayProtectionWarning(lv_obj_t *parent, lv_obj_t *lastView)
{
lv_obj_t *card = CreateRelativeTransactionContentContainer(
- parent, ETH_COMPONENT_WIDTH, 128, lastView);
+ parent, ETH_COMPONENT_WIDTH, 128, lastView);
lv_obj_set_style_bg_color(card, lv_color_hex(0xF55831), LV_PART_MAIN);
lv_obj_set_style_bg_opa(card, LV_OPA_20, LV_PART_MAIN);
@@ -1486,7 +1486,7 @@ static uint16_t CreateEthDetailsPair(lv_obj_t *container, const char *title, con
uint16_t titleHeight = lv_obj_get_height(titleLabel);
uint16_t valueHeight = lv_obj_get_height(valueLabel);
if (24 + titleWidth + 16 + valueWidth + 24 <= ETH_COMPONENT_WIDTH &&
- valueHeight <= TEXT_LINE_HEIGHT) {
+ valueHeight <= TEXT_LINE_HEIGHT) {
lv_obj_align_to(valueLabel, titleLabel, LV_ALIGN_OUT_RIGHT_MID, 16, 0);
return y + (titleHeight > valueHeight ? titleHeight : valueHeight) + 8;
}
@@ -1499,7 +1499,7 @@ static uint16_t CreateEthDetailsPair(lv_obj_t *container, const char *title, con
}
static uint16_t CreateEthDetailsDescription(lv_obj_t *container, const char *text,
- uint16_t y, const lv_font_t *font)
+ uint16_t y, const lv_font_t *font)
{
lv_obj_t *label = GuiCreateIllustrateLabel(container, text);
lv_obj_align(label, LV_ALIGN_TOP_LEFT, 24, y);
@@ -1519,7 +1519,7 @@ static lv_obj_t *CreateEthDetailsFeeView(lv_obj_t *parent, DisplayETH *eth, lv_o
bool erc20Transfer = isErc20Transfer(eth);
uint16_t y = 16;
lv_obj_t *container = CreateRelativeTransactionContentContainer(
- parent, ETH_COMPONENT_WIDTH, 24, lastView);
+ parent, ETH_COMPONENT_WIDTH, 24, lastView);
char value[96] = {0};
if (erc20Transfer) {
@@ -1530,21 +1530,21 @@ static lv_obj_t *CreateEthDetailsFeeView(lv_obj_t *parent, DisplayETH *eth, lv_o
} else {
GetEthValue(value, eth, sizeof(value));
y = CreateEthDetailsPair(
- container,
- strlen(eth->detail->input) > 0 ? _("Native Transfer") : _("Value"),
- value, y, true);
+ container,
+ strlen(eth->detail->input) > 0 ? _("Native Transfer") : _("Value"),
+ value, y, true);
}
if (feeMarket) {
GetEthMaxFee(value, eth, sizeof(value));
y = CreateEthDetailsPair(container, _("Max Fee"), value, y, false);
y = CreateEthDetailsDescription(
- container, " · Max Fee Price * Gas Limit", y, NULL);
+ container, " · Max Fee Price * Gas Limit", y, NULL);
GetEthMaxPriority(value, eth, sizeof(value));
y = CreateEthDetailsPair(container, _("Max Priority Fee"), value, y, false);
y = CreateEthDetailsDescription(
- container, " · Max Priority Fee Price * Gas Limit", y, NULL);
+ container, " · Max Priority Fee Price * Gas Limit", y, NULL);
GetEthMaxFeePrice(value, eth, sizeof(value));
y = CreateEthDetailsPair(container, _("Max Fee Price"), value, y, false);
@@ -1555,12 +1555,12 @@ static lv_obj_t *CreateEthDetailsFeeView(lv_obj_t *parent, DisplayETH *eth, lv_o
GetEthTxFee(value, eth, sizeof(value));
y = CreateEthDetailsPair(container, _("Max Txn Fee"), value, y, false);
y = CreateEthDetailsDescription(
- container, " · Max Txn Fee = Gas Price * Gas Limit", y,
- &openSansDesc);
+ container, " · Max Txn Fee = Gas Price * Gas Limit", y,
+ &openSansDesc);
y = CreateEthDetailsPair(
- container, _("Gas Price"), eth->overview->gas_price, y, false);
+ container, _("Gas Price"), eth->overview->gas_price, y, false);
y = CreateEthDetailsPair(
- container, _("Gas Limit"), eth->overview->gas_limit, y, false);
+ container, _("Gas Limit"), eth->overview->gas_limit, y, false);
}
lv_obj_set_height(container, y + 8);
return container;
@@ -1593,7 +1593,7 @@ static lv_obj_t *CreateEthUnknownContractView(
GetEthTransactionData(input, eth, sizeof(input));
lv_obj_t *container = CreateRelativeTransactionContentContainer(
- parent, ETH_COMPONENT_WIDTH, 0, lastView);
+ parent, ETH_COMPONENT_WIDTH, 0, lastView);
uint16_t y = 16;
lv_obj_t *title = GuiCreateIllustrateLabel(container, _("InputData"));
@@ -1620,7 +1620,7 @@ static lv_obj_t *CreateEthUnknownContractView(
// Keep the learn-more action inside the InputData card, matching the
// original layout while allowing the rows above it to grow dynamically.
lv_obj_t *learnMore = GuiCreateContainerWithParent(
- container, ETH_COMPONENT_CONTENT_WIDTH, 30);
+ container, ETH_COMPONENT_CONTENT_WIDTH, 30);
lv_obj_set_style_bg_opa(learnMore, LV_OPA_TRANSP, LV_PART_MAIN);
lv_obj_set_style_border_width(learnMore, 0, LV_PART_MAIN);
lv_obj_set_style_pad_all(learnMore, 0, LV_PART_MAIN);
@@ -1669,7 +1669,7 @@ static lv_obj_t *CreateEthParsedContractView(
}
lv_obj_t *container = CreateTransactionContentContainer(
- parent, ETH_COMPONENT_WIDTH, 0);
+ parent, ETH_COMPONENT_WIDTH, 0);
lv_obj_align_to(container, sectionTitle, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 8);
char method[96] = {0};
@@ -1678,7 +1678,7 @@ static lv_obj_t *CreateEthParsedContractView(
Response_DisplayContractData *contractData = (Response_DisplayContractData *)g_contractData;
if (contractData != NULL && contractData->data != NULL &&
- contractData->data->params != NULL) {
+ contractData->data->params != NULL) {
char truncatedValue[BUFFER_SIZE_512 + 1] = {0};
for (size_t i = 0; i < contractData->data->params->size; i++) {
DisplayContractParam *param = &contractData->data->params->data[i];
@@ -1693,7 +1693,7 @@ static lv_obj_t *CreateEthParsedContractView(
}
lv_obj_t *rawDataButton = GuiCreateBtnWithFont(
- container, _("Check the Raw Data"), &openSansEnIllustrate);
+ container, _("Check the Raw Data"), &openSansEnIllustrate);
lv_obj_t *rawDataLabel = lv_obj_get_child(rawDataButton, 0);
lv_obj_set_size(rawDataButton, ETH_COMPONENT_CONTENT_WIDTH, 46);
lv_obj_set_style_bg_opa(rawDataButton, LV_OPA_TRANSP, LV_PART_MAIN);
@@ -1956,8 +1956,8 @@ static void FixRecipientAndValueWhenErc20Contract(const char *inputdata, uint8_t
{
const size_t erc20TransferCalldataLen = 136;
if (inputdata == NULL ||
- strnlen_s(inputdata, erc20TransferCalldataLen + 1) != erc20TransferCalldataLen ||
- strncmp(inputdata, "a9059cbb", 8) != 0) {
+ strnlen_s(inputdata, erc20TransferCalldataLen + 1) != erc20TransferCalldataLen ||
+ strncmp(inputdata, "a9059cbb", 8) != 0) {
return;
}
### src/ui/gui_chain/multi/web3/gui_sol.c
@@ -481,22 +481,22 @@ static void GuiShowSolTxTransferOverview(lv_obj_t *parent, PtrT_DisplaySolanaTxO
lastView = GuiCreateAltWarningCard(parent, overviewData->transfer_to_lookup_table_reference);
}
lv_obj_t *overviewCard = CreateTransactionOverviewCardWithWidth(
- parent,
- _("Value"),
- overviewData->transfer_value,
- _("Main Action"),
- overviewData->main_action,
- SOL_COMPONENT_WIDTH);
+ parent,
+ _("Value"),
+ overviewData->transfer_value,
+ _("Main Action"),
+ overviewData->main_action,
+ SOL_COMPONENT_WIDTH);
if (lastView != NULL) {
lv_obj_align_to(overviewCard, lastView, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 16);
}
lastView = overviewCard;
lastView = CreateTransactionItemViewWithWidth(
- parent,
- _("From"),
- overviewData->transfer_from,
- lastView,
- SOL_COMPONENT_WIDTH);
+ parent,
+ _("From"),
+ overviewData->transfer_from,
+ lastView,
+ SOL_COMPONENT_WIDTH);
CreateTransactionItemViewWithWidth(
parent,
overviewData->transfer_to_in_lookup_table ? _("solana_unresolved_destination") : _("To"),
@@ -892,7 +892,7 @@ static void GuiShowSolTxSquadsProposalOverview(lv_obj_t *parent, PtrT_DisplaySol
continue;
}
lv_obj_t *feeContainer = GuiCreateAutoHeightContainer(
- parent, SOL_COMPONENT_WIDTH, 16);
+ parent, SOL_COMPONENT_WIDTH, 16);
lv_obj_t *feeLabel = lv_label_create(feeContainer);
lv_label_set_text(feeLabel, "Fee");
lv_obj_set_style_text_color(feeLabel, WHITE_COLOR, LV_PART_MAIN);
@@ -976,7 +976,7 @@ static char GuiSolProtocolTextByteAt(void *context, size_t offset);
static lv_obj_t *GuiCreateSolConfigReviewCard(lv_obj_t *parent, const char *text, lv_obj_t *lastView)
{
lv_obj_t *card = CreateTransactionContentContainer(
- parent, SOL_COMPONENT_WIDTH, SOL_CONFIG_REVIEW_MAX_HEIGHT);
+ parent, SOL_COMPONENT_WIDTH, SOL_CONFIG_REVIEW_MAX_HEIGHT);
lv_obj_set_style_max_height(card, SOL_CONFIG_REVIEW_MAX_HEIGHT, LV_PART_MAIN);
lv_obj_set_style_pad_left(card, 24, LV_PART_MAIN);
lv_obj_set_style_pad_right(card, 24, LV_PART_MAIN);
@@ -1027,31 +1027,31 @@ static lv_obj_t *GuiShowSolTxGeneralOverview(
char *program = general->data[i].program;
if (strcmp(program, "TransactionConfig") == 0) {
lastView = CreateTransactionItemViewWithWidth(
- parent, "Transaction Config (V1)", general->data[i].memo,
- lastView, SOL_COMPONENT_WIDTH);
+ parent, "Transaction Config (V1)", general->data[i].memo,
+ lastView, SOL_COMPONENT_WIDTH);
continue;
}
char order[BUFFER_SIZE_16] = {0};
snprintf_s(order, BUFFER_SIZE_16, "#%u", (unsigned int)general->data[i].instruction_index);
const char *method = strlen(general->data[i].method) > 0
- ? general->data[i].method
- : "Unknown";
+ ? general->data[i].method
+ : "Unknown";
lv_obj_t *actionCard;
if (strcmp(method, "VaultTransactionCreate") == 0 &&
- strlen(general->data[i].memo) > 0) {
+ strlen(general->data[i].memo) > 0) {
// Preserve the established Squads review card even when a mixed
// transaction reaches the General/addon path. The memo belongs
// to VaultTransactionCreate, not ProposalCreate.
actionCard = CreateSolanaSquadsProposalOverviewCard(
- parent, "Squads", method, general->data[i].memo, "");
+ parent, "Squads", method, general->data[i].memo, "");
} else {
actionCard = CreateTransactionOverviewCardWithWidth(
- parent,
- order,
- program,
- _("Method"),
- method,
- SOL_COMPONENT_WIDTH);
+ parent,
+ order,
+ program,
+ _("Method"),
+ method,
+ SOL_COMPONENT_WIDTH);
}
if (lastView != NULL) {
lv_obj_align_to(actionCard, lastView, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 16);
@@ -1063,47 +1063,47 @@ static lv_obj_t *GuiShowSolTxGeneralOverview(
}
if (strlen(general->data[i].value) > 0) {
lastView = CreateTransactionItemViewWithWidth(
- parent, _("Value"), general->data[i].value, lastView, SOL_COMPONENT_WIDTH);
+ parent, _("Value"), general->data[i].value, lastView, SOL_COMPONENT_WIDTH);
lastView = CreateTransactionItemViewWithWidth(
- parent, _("From"), general->data[i].from, lastView, SOL_COMPONENT_WIDTH);
+ parent, _("From"), general->data[i].from, lastView, SOL_COMPONENT_WIDTH);
if (general->data[i].to_in_lookup_table) {
lv_obj_t *warningCard = GuiCreateAltWarningCard(
- parent, general->data[i].to_lookup_table_reference);
+ parent, general->data[i].to_lookup_table_reference);
lv_obj_align_to(warningCard, lastView, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 16);
lastView = warningCard;
}
lastView = CreateTransactionItemViewWithWidth(
- parent,
- general->data[i].to_in_lookup_table ? _("solana_unresolved_destination") : _("To"),
- general->data[i].to,
- lastView,
- SOL_COMPONENT_WIDTH);
+ parent,
+ general->data[i].to_in_lookup_table ? _("solana_unresolved_destination") : _("To"),
+ general->data[i].to,
+ lastView,
+ SOL_COMPONENT_WIDTH);
}
if (strlen(general->data[i].amount) > 0) {
if (general->data[i].unusual_decimals) {
lv_obj_t *warningCard = GuiCreateUnusualDecimalsWarningCard(
- parent, general->data[i].decimals);
+ parent, general->data[i].decimals);
if (lastView != NULL) {
lv_obj_align_to(warningCard, lastView, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 16);
}
lastView = warningCard;
}
lastView = CreateTransactionItemViewWithWidth(
- parent, _("Amount"), general->data[i].amount, lastView, SOL_COMPONENT_WIDTH);
+ parent, _("Amount"), general->data[i].amount, lastView, SOL_COMPONENT_WIDTH);
if (strlen(general->data[i].token) > 0) {
lastView = CreateTransactionItemViewWithWidth(
- parent, _("Token"), general->data[i].token, lastView, SOL_COMPONENT_WIDTH);
+ parent, _("Token"), general->data[i].token, lastView, SOL_COMPONENT_WIDTH);
}
if (strlen(general->data[i].mint) > 0) {
lastView = CreateTransactionItemViewWithWidth(
- parent, _("Mint Address"), general->data[i].mint, lastView, SOL_COMPONENT_WIDTH);
+ parent, _("Mint Address"), general->data[i].mint, lastView, SOL_COMPONENT_WIDTH);
}
lastView = CreateTransactionItemViewWithWidth(
- parent, _("Authority"), general->data[i].authority, lastView, SOL_COMPONENT_WIDTH);
+ parent, _("Authority"), general->data[i].authority, lastView, SOL_COMPONENT_WIDTH);
lastView = CreateTransactionItemViewWithWidth(
- parent, _("Source"), general->data[i].source, lastView, SOL_COMPONENT_WIDTH);
+ parent, _("Source"), general->data[i].source, lastView, SOL_COMPONENT_WIDTH);
lastView = CreateTransactionItemViewWithWidth(
- parent, _("Destination"), general->data[i].destination, lastView, SOL_COMPONENT_WIDTH);
+ parent, _("Destination"), general->data[i].destination, lastView, SOL_COMPONENT_WIDTH);
}
}
return lastView;
@@ -1153,12 +1153,12 @@ static lv_obj_t *GuiAppendSolTxAdditionalUnknownProgramCards(
char order[BUFFER_SIZE_16] = {0};
snprintf_s(order, BUFFER_SIZE_16, "#%d", i + 1);
lv_obj_t *programCard = CreateTransactionOverviewCardWithWidth(
- parent,
- _("solana_unknown_program"),
- order,
- _("solana_program_address"),
- programs->data[i],
- SOL_COMPONENT_WIDTH);
+ parent,
+ _("solana_unknown_program"),
+ order,
+ _("solana_program_address"),
+ programs->data[i],
+ SOL_COMPONENT_WIDTH);
if (lastView != NULL) {
lv_obj_align_to(programCard, lastView, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 16);
}
@@ -1494,7 +1494,7 @@ static bool GuiSolInstructionsUseAddressLookupTable(PtrT_VecFFI_Instruction inst
}
for (size_t i = 0; i < instructions->size; i++) {
if (instructions->data[i].program_address != NULL &&
- CheckIsAddressLookupTableAccount(instructions->data[i].program_address)) {
+ CheckIsAddressLookupTableAccount(instructions->data[i].program_address)) {
return true;
}
PtrT_VecFFI_PtrString accounts = instructions->data[i].accounts;
@@ -1618,7 +1618,7 @@ static lv_obj_t *GuiShowSolAccounts(lv_obj_t *parent, PtrT_VecFFI_PtrString acco
lv_obj_update_layout(parent);
lv_coord_t width = lv_obj_get_content_width(parent);
lv_obj_t *pager = GuiCreateContainerWithParent(
- parent, width, 384 + SOL_ACCOUNTS_PAGER_BOTTOM_PADDING);
+ parent, width, 384 + SOL_ACCOUNTS_PAGER_BOTTOM_PADDING);
lv_obj_set_style_pad_bottom(pager, SOL_ACCOUNTS_PAGER_BOTTOM_PADDING, LV_PART_MAIN);
lv_obj_set_style_bg_opa(pager, LV_OPA_TRANSP, LV_PART_MAIN);
SolAccountsPager *state = lv_mem_alloc(sizeof(*state));
@@ -1696,8 +1696,8 @@ static void GuiShowSolTxInstructionsOverview(lv_obj_t *parent, PtrT_DisplaySolan
lv_label_set_text(
noticeContent,
usesAlt
- ? _("solana_parse_tx_alt_warning_body")
- : _("solana_parse_tx_notice"));
+ ? _("solana_parse_tx_alt_warning_body")
+ : _("solana_parse_tx_notice"));
lv_obj_set_style_text_opa(noticeContent, 144, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_align_to(noticeContent, iconNoticeContainer, LV_ALIGN_OUT_BOTTOM_LEFT, 24, 10);
@@ -1723,7 +1723,7 @@ static void GuiShowSolTxInstructionsOverview(lv_obj_t *parent, PtrT_DisplaySolan
lv_obj_align_to(programSection, orderLabel, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 12);
lv_obj_update_layout(programSection);
lv_obj_t *programAddress = GuiCreateIllustrateLabel(
- programSection, overview_instructions->data[i].program_address);
+ programSection, overview_instructions->data[i].program_address);
lv_obj_set_width(programAddress, lv_obj_get_content_width(programSection));
lv_label_set_long_mode(programAddress, LV_LABEL_LONG_WRAP);
lv_obj_set_height(programAddress, LV_SIZE_CONTENT);
@@ -1871,7 +1871,7 @@ void GuiShowSolTxOverview(lv_obj_t *parent, void *totalData)
* are appended below those cards as generic addons.
*/
if (0 != strcmp(overviewData->display_type, "General") &&
- 0 != strcmp(overviewData->display_type, "jupiterv6_swap")) {
+ 0 != strcmp(overviewData->display_type, "jupiterv6_swap")) {
GuiShowSolTxGeneralOverview(parent, overviewData, GuiGetSolTxBottomView(parent));
}
if (!unknownProgramsRendered) {
@@ -2015,7 +2015,7 @@ static void GuiSolAdvancedRefresh(SolAdvancedPager *state)
char *title = GuiSolAdvancedText(item->title);
char *value = GuiSolAdvancedText(item->value);
last = CreateTransactionItemViewWithWidth(
- state->content, title, value, last, SOL_COMPONENT_WIDTH);
+ state->content, title, value, last, SOL_COMPONENT_WIDTH);
lv_obj_t *titleLabel = lv_obj_get_child(last, 0);
lv_obj_t *valueLabel = lv_obj_get_child(last, 1);
if (lv_obj_get_width(titleLabel) > SOL_COMPONENT_CONTENT_WIDTH) {
### src/ui/gui_chain/multi/web3/gui_trx.c
@@ -335,7 +335,7 @@ void GetTrxContractWarning(void *indata, void *param, uint32_t maxLen)
{
const DisplayTron *trx = (const DisplayTron *)param;
const bool hasWarning = trx != NULL && trx->detail != NULL &&
- trx->detail->contract_warning != NULL && trx->detail->contract_warning[0] != '\0';
+ trx->detail->contract_warning != NULL && trx->detail->contract_warning[0] != '\0';
strcpy_s((char *)indata, maxLen, hasWarning ? _("tron_unknown_contract_warning") : "");
}
### src/ui/gui_components/gui_hintbox.c
@@ -279,7 +279,7 @@ static void BackupConfirmationCheckHandler(lv_event_t *e)
lv_obj_add_state(hintBox->checkBox, LV_STATE_CHECKED);
}
GuiSetConfirmButtonEnabled(hintBox->continueButton,
- lv_obj_has_state(hintBox->checkBox, LV_STATE_CHECKED));
+ lv_obj_has_state(hintBox->checkBox, LV_STATE_CHECKED));
}
lv_obj_t *GuiCreateSdCardErrorHintBox(bool cardMissing, lv_event_cb_t closeCallback)
@@ -288,9 +288,9 @@ lv_obj_t *GuiCreateSdCardErrorHintBox(bool cardMissing, lv_event_cb_t closeCallb
lv_obj_t *img = GuiCreateImg(window, &imgFailed);
lv_obj_align(img, LV_ALIGN_DEFAULT, 38, 492);
const char *title = cardMissing ? _("firmware_update_sd_failed_access_title") :
- _("multisig_export_to_sdcard_failed");
+ _("multisig_export_to_sdcard_failed");
const char *description = cardMissing ? _("firmware_update_sd_failed_access_desc") :
- _("multisig_export_to_sdcard_failed_desc");
+ _("multisig_export_to_sdcard_failed_desc");
lv_obj_t *label = GuiCreateLittleTitleLabel(window, title);
lv_obj_align(label, LV_ALIGN_DEFAULT, 36, 588);
label = GuiCreateIllustrateLabel(window, description);
### src/ui/gui_components/gui_keyboard_hintbox.c
@@ -115,7 +115,7 @@ void SetKeyboardWidgetSelf(KeyboardWidget_t *keyboardWidget, KeyboardWidget_t **
}
static void SetKeyboardWidgetBoundedLabelText(lv_obj_t *label, const char *text,
- lv_label_long_mode_t longMode)
+ lv_label_long_mode_t longMode)
{
lv_label_set_text(label, text);
if (lv_obj_get_self_width(label) > KEYBOARD_WIDGET_TEXT_WIDTH) {
@@ -477,7 +477,7 @@ void GuiShowErrorNumber(KeyboardWidget_t *keyboardWidget, PasswordVerifyResult_t
uint16_t signal = passwordVerifyResult->signal;
bool proveOwnership = (signal == SIG_FORGET_PASSWORD_PROVE_OWNERSHIP);
uint8_t maxCount = proveOwnership ? MAX_LOGIN_PASSWORD_ERROR_COUNT
- : MAX_CURRENT_PASSWORD_ERROR_COUNT_SHOW_HINTBOX;
+ : MAX_CURRENT_PASSWORD_ERROR_COUNT_SHOW_HINTBOX;
printf("GuiShowErrorNumber signal=%u proveOwnership=%d maxCount=%u lock=%d forget=%d wipe=%d\r\n",
(unsigned int)signal, proveOwnership, (unsigned int)maxCount, g_lockView.isActive, g_forgetPassView.isActive,
g_wipeDeviceView.isActive);
### src/ui/gui_components/gui_qr_hintbox.c
@@ -188,7 +188,7 @@ void GuiNormalHitBoxOpen(const char *title, const char *content)
}
static void GuiQRCodeHintBoxOpenByLayout(const char *qrdata, const char *title, const char *subtitle,
- const GuiQrHintBoxLayoutParam_t *layout, uint8_t layoutType)
+ const GuiQrHintBoxLayoutParam_t *layout, uint8_t layoutType)
{
lv_obj_t *parent, *button, *qrCodeCont, *qrCode, *label;
if (g_qrHintBox != NULL && g_qrHintBoxLayout != layoutType) {
### src/ui/gui_frame/gui_obj.c
@@ -75,7 +75,7 @@ void *GuiCreateWhiteOpa12Container(lv_obj_t *parent, int w, int h)
}
void *GuiCreateLabelWithFontAndTextColor(lv_obj_t *parent, const char *text,
- const lv_font_t *font, int color)
+ const lv_font_t *font, int color)
{
lv_obj_t *label = lv_label_create(parent);
lv_label_set_text(label, text);
@@ -192,7 +192,7 @@ void *GuiCreateCheckBoxWithFont(lv_obj_t *parent, const char *text, bool single,
}
void *GuiCreateBlindSigningCheckBoxWithFont(lv_obj_t *parent, const char *text, bool single,
- const lv_font_t *font)
+ const lv_font_t *font)
{
lv_obj_t *checkBox = lv_checkbox_create(parent);
lv_obj_add_flag(checkBox, LV_OBJ_FLAG_EVENT_BUBBLE);
### src/ui/gui_frame/gui_obj.h
@@ -94,7 +94,7 @@ void *GuiCreateImg(lv_obj_t *parent, const void *src);
void *GuiCreateScaleImg(lv_obj_t *parent, const void *src, int scale);
void *GuiCreateCheckBoxWithFont(lv_obj_t *parent, const char *text, bool single, const lv_font_t *font);
void *GuiCreateBlindSigningCheckBoxWithFont(lv_obj_t *parent, const char *text, bool single,
- const lv_font_t *font);
+ const lv_font_t *font);
void *GuiCreateBtnWithFont(lv_obj_t *parent, const char *text, const lv_font_t *font);
void *GuiCreateLine(lv_obj_t *parent, lv_point_t linePoints[], uint16_t pointNum);
void *GuiCreateDividerLine(lv_obj_t *parent);
### src/ui/gui_model/gui_model.c
@@ -262,7 +262,7 @@ static int32_t ModelSaveMnemonicWallet(bool slip39, bool forget, const uint8_t *
setupCheckpointed = true;
}
ret = slip39 ? CreateNewSlip39Account(target, ems, entropy, len, password, id, eb, ie, &cleanupRequired) :
- CreateNewAccount(target, entropy, len, password, &cleanupRequired);
+ CreateNewAccount(target, entropy, len, password, &cleanupRequired);
CHECK_ERRCODE_BREAK("create account", ret);
ClearAccountPassphrase(target);
const char *passphrase = SecretCacheGetPassphrase();
@@ -387,7 +387,7 @@ static void EnqueueAsync(AsyncQueueNode_t *node)
int32_t AsyncExecute(BackgroundAsyncFunc_t func, const void *inData, uint32_t inDataLen)
{
if (g_walletOperationAborted || func == NULL || (inDataLen > 0 && inData == NULL) ||
- inDataLen > SIZE_MAX - sizeof(AsyncQueueNode_t))
+ inDataLen > SIZE_MAX - sizeof(AsyncQueueNode_t))
return ERR_GENERAL_FAIL;
AsyncQueueNode_t *node = malloc(sizeof(*node) + inDataLen);
if (node == NULL) {
@@ -407,7 +407,7 @@ int32_t AsyncExecute(BackgroundAsyncFunc_t func, const void *inData, uint32_t in
int32_t AsyncExecuteRunnable(BackgroundAsyncFuncWithRunnable_t func, const void *inData, uint32_t inDataLen, BackgroundAsyncRunnable_t runnable)
{
if (g_walletOperationAborted || func == NULL || runnable == NULL || (inDataLen > 0 && inData == NULL) ||
- inDataLen > SIZE_MAX - sizeof(AsyncQueueNode_t))
+ inDataLen > SIZE_MAX - sizeof(AsyncQueueNode_t))
return ERR_GENERAL_FAIL;
AsyncQueueNode_t *node = malloc(sizeof(*node) + inDataLen);
if (node == NULL) {
@@ -1176,12 +1176,12 @@ static int32_t ModelSlip39WriteEntropy(const void *inData, uint32_t inDataLen)
char *words[SLIP39_MAX_MEMBER] = {0};
do {
if (inData == NULL || inDataLen != sizeof(uint8_t) || entropy == NULL || ems == NULL ||
- entropyLen != emsLen || (entropyLen != 16 && entropyLen != 32)) {
+ entropyLen != emsLen || (entropyLen != 16 && entropyLen != 32)) {
break;
}
uint8_t count = *(const uint8_t *)inData;
if ((count != 20 && count != 33) || entropyLen != (count == 20 ? 16 : 32) ||
- SecretCacheGetSlip39Mnemonic(0) == NULL) {
+ SecretCacheGetSlip39Mnemonic(0) == NULL) {
break;
}
ret = Slip39CheckFirstWordList(SecretCacheGetSlip39Mnemonic(0), count, &threshold);
@@ -1201,7 +1201,7 @@ static int32_t ModelSlip39WriteEntropy(const void *inData, uint32_t inDataLen)
}
ret = Slip39GetMasterSecret(threshold, count, emsCheck, entropyCheck, words, &id, &eb, &ie);
if (ret != SUCCESS_CODE || memcmp(entropyCheck, entropy, entropyLen) != 0 ||
- memcmp(emsCheck, ems, entropyLen) != 0) {
+ memcmp(emsCheck, ems, entropyLen) != 0) {
ret = ERR_GENERAL_FAIL;
break;
}
@@ -1237,7 +1237,7 @@ static int32_t ModelSlip39CalWriteEntropyAndSeed(const void *inData, uint32_t in
}
const Slip39Data_t *data = inData;
if ((data->wordCnt != 20 && data->wordCnt != 33) ||
- data->threShold == 0 || data->threShold > SLIP39_MAX_MEMBER) {
+ data->threShold == 0 || data->threShold > SLIP39_MAX_MEMBER) {
ModelAbortWallet(ret, 0xFF, false);
goto cleanup;
}
@@ -1283,7 +1283,7 @@ static int32_t ModelSlip39ForgetPass(const void *inData, uint32_t inDataLen)
}
const Slip39Data_t *data = inData;
if ((data->wordCnt != 20 && data->wordCnt != 33) ||
- data->threShold == 0 || data->threShold > SLIP39_MAX_MEMBER)
+ data->threShold == 0 || data->threShold > SLIP39_MAX_MEMBER)
break;
for (uint8_t i = 0; i < data->threShold; i++) {
words[i] = SecretCacheGetSlip39Mnemonic(i);
@@ -1589,7 +1589,7 @@ static void ModelVerifyPassSuccess(uint16_t *param)
ret = SetSetupPassphrase(GetCurrentAccountIndex(), SecretCacheGetPassphrase(), SecretCacheGetPassword());
#ifdef BTC_ONLY
if (ret == SUCCESS_CODE &&
- strnlen_s(SecretCacheGetPassphrase(), PASSPHRASE_MAX_LEN) == 0) {
+ strnlen_s(SecretCacheGetPassphrase(), PASSPHRASE_MAX_LEN) == 0) {
ret = AccountPublicInfoSwitch(GetCurrentAccountIndex(), SecretCacheGetPassword(), false);
}
#endif
@@ -1732,24 +1732,24 @@ static int32_t ModelVerifyAccountPass(const void *inData, uint32_t inDataLen)
// some scene would need clear secret after check
if (*param != SIG_SETTING_CHANGE_PASSWORD &&
- *param != SIG_SETTING_WRITE_PASSPHRASE &&
- *param != SIG_LOCK_VIEW_SCREEN_ON_VERIFY_PASSPHRASE &&
- *param != SIG_FINGER_SET_SIGN_TRANSITIONS &&
- *param != SIG_FINGER_REGISTER_ADD_SUCCESS &&
- *param != SIG_SIGN_TRANSACTION_WITH_PASSWORD &&
- *param != SIG_SETUP_RSA_PRIVATE_KEY_WITH_PASSWORD &&
- *param != SIG_MULTISIG_WALLET_IMPORT_VERIFY_PASSWORD &&
- *param != SIG_MULTISIG_WALLET_DELETE_VERIFY_PASSWORD &&
- *param != SIG_HARDWARE_CALL_DERIVE_PUBKEY &&
- *param != SIG_INIT_CONNECT_USB &&
- // forget-pass prove-ownership: the user already entered the seed; clearing it here would blank the
- // mnemonic before the upcoming re-save (it would fail with "mnemonic error"). The other wallet's PIN
- // we just verified is already captured in the dedicated provision-recovery holder; the forget-pass
- // DeInit clears the cache.
- *param != SIG_FORGET_PASSWORD_PROVE_OWNERSHIP &&
- !strnlen_s(SecretCacheGetPassphrase(), PASSPHRASE_MAX_LEN) &&
- !GuiCheckIfViewOpened(&g_createWalletView) &&
- !ModelGetPassphraseQuickAccess()) {
+ *param != SIG_SETTING_WRITE_PASSPHRASE &&
+ *param != SIG_LOCK_VIEW_SCREEN_ON_VERIFY_PASSPHRASE &&
+ *param != SIG_FINGER_SET_SIGN_TRANSITIONS &&
+ *param != SIG_FINGER_REGISTER_ADD_SUCCESS &&
+ *param != SIG_SIGN_TRANSACTION_WITH_PASSWORD &&
+ *param != SIG_SETUP_RSA_PRIVATE_KEY_WITH_PASSWORD &&
+ *param != SIG_MULTISIG_WALLET_IMPORT_VERIFY_PASSWORD &&
+ *param != SIG_MULTISIG_WALLET_DELETE_VERIFY_PASSWORD &&
+ *param != SIG_HARDWARE_CALL_DERIVE_PUBKEY &&
+ *param != SIG_INIT_CONNECT_USB &&
+ // forget-pass prove-ownership: the user already entered the seed; clearing it here would blank the
+ // mnemonic before the upcoming re-save (it would fail with "mnemonic error"). The other wallet's PIN
+ // we just verified is already captured in the dedicated provision-recovery holder; the forget-pass
+ // DeInit clears the cache.
+ *param != SIG_FORGET_PASSWORD_PROVE_OWNERSHIP &&
+ !strnlen_s(SecretCacheGetPassphrase(), PASSPHRASE_MAX_LEN) &&
+ !GuiCheckIfViewOpened(&g_createWalletView) &&
+ !ModelGetPassphraseQuickAccess()) {
ClearSecretCache();
}
SetLockScreen(enable);
### src/ui/gui_views/gui_views.c
@@ -187,7 +187,7 @@ void GuiSDCardExportHandler(lv_event_t *e)
}
int32_t GuiHandleWriteSeResult(uint16_t event, const void *param, uint16_t len,
- void (*handler)(bool, int32_t))
+ void (*handler)(bool, int32_t))
{
if (handler == NULL) {
return ERR_GUI_ERROR;
@@ -289,7 +289,7 @@ void GuiWalletOperationAborted(bool passcodeFailure)
lv_obj_set_style_text_align(title, LV_TEXT_ALIGN_CENTER, 0);
lv_obj_align(title, LV_ALIGN_TOP_MID, 0, 330);
lv_obj_t *description = GuiCreateIllustrateLabel(cover,
- _("passcode_update_failed_delete_desc"));
+ _("passcode_update_failed_delete_desc"));
lv_obj_set_width(description, 384);
lv_label_set_long_mode(description, LV_LABEL_LONG_WRAP);
lv_obj_set_style_text_align(description, LV_TEXT_ALIGN_CENTER, 0);
### src/ui/gui_views/gui_views.h
@@ -266,7 +266,7 @@ void ToggleSwitchBoxHandler(lv_event_t *e);
void GuiWriteSeWidget(lv_obj_t *parent);
void GuiWriteSeResult(bool en, int32_t errorCode);
int32_t GuiHandleWriteSeResult(uint16_t event, const void *param, uint16_t len,
- void (*handler)(bool, int32_t));
+ void (*handler)(bool, int32_t));
void GuiWalletOperationAborted(bool passcodeFailure);
void GuiWriteSeLowPower(void);
void CloseWaringPageHandler(lv_event_t *e);
### src/ui/gui_widgets/btc_only/multi_sig/gui_import_multisig_wallet_info_widgets.h
@@ -4,8 +4,8 @@
#include <stdbool.h>
#include <stdint.h>
void GuiSetMultisigImportWalletDataByQRCode(URParseResult *urResult,
- URParseMultiResult *multiResult,
- bool multi);
+ URParseMultiResult *multiResult,
+ bool multi);
uint32_t GuiSetMultisigImportWalletDataBySDCard(char *walletConfig);
void GuiImportMultisigWalletInfoWidgetsInit(void);
### src/ui/gui_widgets/gui_create_wallet_widgets.c
@@ -173,10 +173,10 @@ static void GuiCreateNameWalletWidget(lv_obj_t *parent)
static void OpenNoticeHandler(lv_event_t *e)
{
g_noticeWindow = GuiCreateConfirmHintBox(&imgRedEye,
- _("single_backup_notice_title"),
- _("single_backup_notice_desc1"),
- _("single_backup_notice_desc2"),
- USR_SYMBOL_CHECK, ORANGE_COLOR);
+ _("single_backup_notice_title"),
+ _("single_backup_notice_desc1"),
+ _("single_backup_notice_desc2"),
+ USR_SYMBOL_CHECK, ORANGE_COLOR);
lv_obj_add_event_cb(lv_obj_get_child(g_noticeWindow, 0), CloseHintBoxHandler,
LV_EVENT_CLICKED, &g_noticeWindow);
### src/ui/gui_widgets/gui_export_pubkey_widgets.c
@@ -646,7 +646,7 @@ static void ModelGetUtxoAddress(char *dest, uint8_t pathType, uint32_t index, ui
char *xPub, hdPath[BUFFER_SIZE_128];
xPub = GetCurrentAccountPublicKey(g_pathTypeList[pathType].pubkeyType);
bool xpubValid = xPub != NULL && xPub[0] != '\0';
- if(!xpubValid) {
+ if (!xpubValid) {
ClearSecretCache();
}
ASSERT(xpubValid);
@@ -673,7 +673,7 @@ static void ModelGetUtxoAddress(char *dest, uint8_t pathType, uint32_t index, ui
rootPath = g_isTest ? g_btcTestNetPath[pathType] : g_pathTypeList[pathType].path;
xPub = GetCurrentAccountPublicKey(chainType);
bool xpubValid = xPub != NULL && xPub[0] != '\0';
- if(!xpubValid) {
+ if (!xpubValid) {
ClearSecretCache();
}
ASSERT(xpubValid);
### src/ui/gui_widgets/gui_firmware_update_widgets.c
@@ -256,9 +256,9 @@ void GuiFirmwareUpdateRefresh(void)
}
if (GetEntryEnum() == FIRMWARE_UPDATE_ENTRY_SETUP) {
- GuiSetSetupPhase(SETUP_PHASE_FIRMWARE_UPDATE);
+ GuiSetSetupPhase(SETUP_PHASE_FIRMWARE_UPDATE);
if (g_reboot) {
- if (!GuiJudgeCurrentPahse(SETUP_PHASE_FIRMWARE_UPDATE)) {
+ if (!GuiJudgeCurrentPahse(SETUP_PHASE_FIRMWARE_UPDATE)) {
GuiFrameOpenView(&g_purposeView);
} else {
g_reboot = false;
### src/ui/gui_widgets/gui_passphrase_widgets.c
@@ -14,8 +14,8 @@
#include "keystore.h"
#include "gui_keyboard.h"
#include "motor_manager.h"
-#include "gui_page.h"
-#include "assert.h"
+#include "gui_page.h"
+#include "assert.h"
typedef struct {
lv_obj_t *cont;
@@ -187,16 +187,16 @@ bool GuiPassphraseLoadingIsTop(void)
return false;
}
-static void SkipHandler(lv_event_t *e)
-{
-#ifndef COMPILE_SIMULATOR
- int32_t ret = SetPassphraseMark(false);
- if (ret != SUCCESS_CODE) {
- ClearSecretCache();
- ASSERT(false);
- return;
- }
-#endif
+static void SkipHandler(lv_event_t *e)
+{
+#ifndef COMPILE_SIMULATOR
+ int32_t ret = SetPassphraseMark(false);
+ if (ret != SUCCESS_CODE) {
+ ClearSecretCache();
+ ASSERT(false);
+ return;
+ }
+#endif
GuiCloseCurrentWorkingView();
GuiLockScreenHidden();
ClearSecretCache();
@@ -244,15 +244,15 @@ static void UpdatePassPhraseHandler(lv_event_t *e)
} else {
const char *input = lv_textarea_get_text(g_passphraseWidgets.inputTa);
const char *repeat = lv_textarea_get_text(g_passphraseWidgets.repeatTa);
- if (!strcmp(input, repeat)) {
- if (strnlen_s(repeat, PASSPHRASE_MAX_LEN) == 0) {
- int32_t ret = SetPassphraseMark(false);
- if (ret != SUCCESS_CODE) {
- ClearSecretCache();
- ASSERT(false);
- return;
- }
- GuiCloseCurrentWorkingView();
+ if (!strcmp(input, repeat)) {
+ if (strnlen_s(repeat, PASSPHRASE_MAX_LEN) == 0) {
+ int32_t ret = SetPassphraseMark(false);
+ if (ret != SUCCESS_CODE) {
+ ClearSecretCache();
+ ASSERT(false);
+ return;
+ }
+ GuiCloseCurrentWorkingView();
GuiLockScreenHidden();
if (g_homeView.isActive) {
GuiLockScreenTurnOff();
### src/ui/gui_widgets/gui_purpose_widgets.c
@@ -85,8 +85,8 @@ void GuiPurposeAreaRefresh()
g_reboot = false;
static lv_obj_t *notice;
notice = GuiCreateConfirmHintBox(&imgWarn, _("single_backup_notice_page_title"),
- _("wallet_setup_interrupted_desc"),
- NULL, _("wallet_setting_add_wallet_confirm"), ORANGE_COLOR);
+ _("wallet_setup_interrupted_desc"),
+ NULL, _("wallet_setting_add_wallet_confirm"), ORANGE_COLOR);
lv_obj_add_event_cb(GuiGetHintBoxRightBtn(notice), CloseHintBoxHandler, LV_EVENT_CLICKED, ¬ice);
} else if (!GuiJudgeCurrentPahse(SETUP_PHASE_CREATE_WALLET)) {
GuiFrameOpenView(&g_homeView);
### src/ui/gui_widgets/gui_transaction_detail_widgets.c
@@ -232,9 +232,9 @@ void GuiTransactionDetailRefresh(bool resumedFromLock)
static void ThrowError(int32_t errorCode)
{
g_parseErrorHintBox = GuiCreateErrorCodeWindow(
- errorCode,
- &g_parseErrorHintBox,
- (ErrorWindowCallback)GuiCloseCurrentWorkingView);
+ errorCode,
+ &g_parseErrorHintBox,
+ (ErrorWindowCallback)GuiCloseCurrentWorkingView);
}
void GuiTransactionDetailParseSuccess(void *param)
@@ -245,7 +245,7 @@ void GuiTransactionDetailParseSuccess(void *param)
PtrT_TransactionParseResult_DisplayIotaIntentData result =
(PtrT_TransactionParseResult_DisplayIotaIntentData)param;
if (result != NULL && result->data != NULL &&
- GetIotaIsMessage(NULL, result->data)) {
+ GetIotaIsMessage(NULL, result->data)) {
SetCoinWallet(g_pageWidget->navBarWidget, g_chainType,
_("transaction_parse_confirm_message"));
}
### src/ui/gui_widgets/multi/cypherpunk/gui_zcash_batch_widgets.c
@@ -158,8 +158,8 @@ static void RespondZcashBatchUsbParseError(const char *errorMessage)
}
const char *data = (errorMessage != NULL && strlen(errorMessage) > 0)
- ? errorMessage
- : "UR parsing failed";
+ ? errorMessage
+ : "UR parsing failed";
HandleURResultViaUSBFunc(data, strlen(data), GetCurrentUSParsingRequestID(), PRS_PARSING_ERROR);
}
@@ -306,15 +306,15 @@ static void CloseParseErrorHandler(lv_event_t *e)
static lv_obj_t *GuiCreateZcashBatchParseErrorWindow(const char *errorMessage)
{
const char *descText = (errorMessage != NULL && strlen(errorMessage) > 0)
- ? errorMessage
- : _("scan_qr_code_error_invalid_qrcode_desc");
+ ? errorMessage
+ : _("scan_qr_code_error_invalid_qrcode_desc");
lv_obj_t *cont = GuiCreateConfirmHintBox(
- &imgFailed,
- _("scan_qr_code_error_invalid_qrcode"),
- descText,
- NULL,
- _("OK"),
- WHITE_COLOR_OPA20);
+ &imgFailed,
+ _("scan_qr_code_error_invalid_qrcode"),
+ descText,
+ NULL,
+ _("OK"),
+ WHITE_COLOR_OPA20);
lv_obj_add_event_cb(GuiGetHintBoxRightBtn(cont), CloseParseErrorHandler, LV_EVENT_CLICKED, cont);
return cont;
}
@@ -444,10 +444,10 @@ static void *GuiParseZcashBatchData(void)
return NULL;
}
g_parseResult = parse_zcash_batch_tx_cypherpunk(
- g_checkedBatch,
- ufvk,
- sfp,
- !IsZcashSupportedForCurrentMnemonic());
+ g_checkedBatch,
+ ufvk,
+ sfp,
+ !IsZcashSupportedForCurrentMnemonic());
return g_parseResult;
}
### src/ui/gui_widgets/multi/gui_key_derivation_request_widgets.c
@@ -415,10 +415,10 @@ static bool ModelParseQRHardwareCall(void)
Response_QRHardwareCallData *data = parse_qr_hardware_call(g_data);
if (data == NULL || data->error_code != 0 || data->data == NULL ||
- data->data->key_derivation == NULL ||
- data->data->key_derivation->schemas == NULL ||
- data->data->key_derivation->schemas->data == NULL ||
- data->data->version == NULL || data->data->origin == NULL) {
+ data->data->key_derivation == NULL ||
+ data->data->key_derivation->schemas == NULL ||
+ data->data->key_derivation->schemas->data == NULL ||
+ data->data->version == NULL || data->data->origin == NULL) {
g_callData = NULL;
g_response = data;
SetHardwareCallParamsCheckResult((HardwareCallResult_t) {
@@ -514,7 +514,7 @@ static HardwareCallResult_t CheckHardWareCallV0AdaPathIsLegal(char *path)
static HardwareCallResult_t CheckHardwareCallRequestIsLegal(void)
{
if (g_callData->key_derivation->schemas->size == 0U ||
- g_callData->key_derivation->schemas->size > MAX_KEY_DERIVATION_SCHEMAS) {
+ g_callData->key_derivation->schemas->size > MAX_KEY_DERIVATION_SCHEMAS) {
SetHardwareCallParamsCheckResult((HardwareCallResult_t) {
false, _("invaild_schemas_size"), _("invaild_schemas_size_big")
});
@@ -551,7 +551,7 @@ static HardwareCallResult_t CheckHardwareCallRequestIsLegal(void)
// Check whether the requested derivation path is supported.
Response_bool *response = check_hardware_call_path(g_response->data->key_derivation->schemas->data[i].key_path);
if (response == NULL || response->error_code != 0 ||
- response->data == NULL || *response->data == false) {
+ response->data == NULL || *response->data == false) {
SetHardwareCallParamsCheckResult((HardwareCallResult_t) {
false, _("invaild_account_path"), _("invaild_account_path_notice")
});
@@ -569,9 +569,9 @@ static HardwareCallResult_t CheckHardwareCallRequestIsLegal(void)
static UREncodeResult *ModelGenerateSyncUR(void)
{
if (g_callData == NULL || g_callData->version == NULL ||
- g_callData->key_derivation == NULL ||
- g_callData->key_derivation->schemas == NULL ||
- g_callData->key_derivation->schemas->data == NULL) {
+ g_callData->key_derivation == NULL ||
+ g_callData->key_derivation->schemas == NULL ||
+ g_callData->key_derivation->schemas->data == NULL) {
return NULL;
}
### src/ui/gui_widgets/multi/web3/gui_eth_batch_tx_widgets.c
@@ -277,9 +277,9 @@ static void ParseErc20ContractData(const char* inputData, const uint8_t decimals
void GuiEthBatchTxWidgetsRefresh()
{
if (g_parseResult == NULL || g_parseResult->error_code != 0 ||
- g_displayEthBatchTx == NULL || g_displayEthBatchTx->txs == NULL ||
- g_displayEthBatchTx->txs->data == NULL || g_txCount == 0 ||
- g_currentTxIndex >= g_txCount) {
+ g_displayEthBatchTx == NULL || g_displayEthBatchTx->txs == NULL ||
+ g_displayEthBatchTx->txs->data == NULL || g_txCount == 0 ||
+ g_currentTxIndex >= g_txCount) {
return;
}
@@ -445,7 +445,7 @@ static bool HandleCurrentTransaction(uint32_t index)
g_currentTransaction = &g_displayEthBatchTx->txs->data[g_currentTxIndex];
g_currentNetwork = FindEvmNetwork(g_currentTransaction->chain_id);
if (g_currentTransaction->detail->input == NULL ||
- g_currentTransaction->detail->input[0] == '\0') {
+ g_currentTransaction->detail->input[0] == '\0') {
return true;
}
@@ -476,8 +476,8 @@ void GuiEthBatchTxWidgetsTransactionParseSuccess(void *params)
(void)params;
#endif
if (g_parseResult == NULL || g_parseResult->error_code != 0 ||
- g_parseResult->data == NULL || g_parseResult->data->txs == NULL ||
- g_parseResult->data->txs->data == NULL || g_parseResult->data->txs->size == 0) {
+ g_parseResult->data == NULL || g_parseResult->data->txs == NULL ||
+ g_parseResult->data->txs->data == NULL || g_parseResult->data->txs->size == 0) {
GuiEthBatchTxWidgetsTransactionParseFail(NULL);
return;
}
@@ -641,8 +641,8 @@ static void GuiRenderApprovalOverview(lv_obj_t *parent, bool showSwapHint)
char nativeValue[ETH_BATCH_ASSET_AMOUNT_BUFFER_SIZE] = {0};
bool nativeValueFormatted = FormatAssetAmount(nativeValue, sizeof(nativeValue),
- g_currentTransaction->overview->value,
- g_currentNetwork.symbol);
+ g_currentTransaction->overview->value,
+ g_currentNetwork.symbol);
last_view = CreateTransactionItemView(parent, _("Native Transfer"),
nativeValueFormatted ? nativeValue : _("Invalid Amount"),
last_view);
@@ -765,8 +765,8 @@ static void GuiRenderSwapOverview(lv_obj_t *parent)
char nativeValue[ETH_BATCH_ASSET_AMOUNT_BUFFER_SIZE] = {0};
bool nativeValueFormatted = FormatAssetAmount(nativeValue, sizeof(nativeValue),
- g_currentTransaction->overview->value,
- g_currentNetwork.symbol);
+ g_currentTransaction->overview->value,
+ g_currentNetwork.symbol);
last_view = CreateTransactionItemView(parent, _("Native Transfer"),
nativeValueFormatted ? nativeValue : _("Invalid Amount"),
last_view);
@@ -803,16 +803,16 @@ static void GuiRenderGeneralOverview(lv_obj_t *parent)
char nativeValue[ETH_BATCH_ASSET_AMOUNT_BUFFER_SIZE] = {0};
char maxTxnFee[ETH_BATCH_ASSET_AMOUNT_BUFFER_SIZE] = {0};
bool nativeValueFormatted = FormatAssetAmount(
- nativeValue, sizeof(nativeValue),
- g_currentTransaction->overview->value, g_currentNetwork.symbol);
+ nativeValue, sizeof(nativeValue),
+ g_currentTransaction->overview->value, g_currentNetwork.symbol);
bool maxTxnFeeFormatted = FormatAssetAmount(
- maxTxnFee, sizeof(maxTxnFee),
- g_currentTransaction->overview->max_txn_fee, g_currentNetwork.symbol);
+ maxTxnFee, sizeof(maxTxnFee),
+ g_currentTransaction->overview->max_txn_fee, g_currentNetwork.symbol);
last_view = CreateTransactionOvewviewCard(
- parent, valueTitle,
- nativeValueFormatted ? nativeValue : _("Invalid Amount"),
- _("Max Txn Fee"),
- maxTxnFeeFormatted ? maxTxnFee : _("Invalid Amount"));
+ parent, valueTitle,
+ nativeValueFormatted ? nativeValue : _("Invalid Amount"),
+ _("Max Txn Fee"),
+ maxTxnFeeFormatted ? maxTxnFee : _("Invalid Amount"));
last_view = CreateTransactionItemView(parent, _("Network"), g_currentNetwork.name, last_view);
@@ -882,10 +882,10 @@ static lv_obj_t *GuiRenderDetailTransactionInfoCard(lv_obj_t *parent, lv_obj_t *
char maxTxnFee[ETH_BATCH_ASSET_AMOUNT_BUFFER_SIZE] = {0};
bool maxTxnFeeFormatted = FormatAssetAmount(
- maxTxnFee, sizeof(maxTxnFee),
- g_currentTransaction->detail->max_txn_fee, g_currentNetwork.symbol);
+ maxTxnFee, sizeof(maxTxnFee),
+ g_currentTransaction->detail->max_txn_fee, g_currentNetwork.symbol);
valueLabel = GuiCreateIllustrateLabel(
- container, maxTxnFeeFormatted ? maxTxnFee : _("Invalid Amount"));
+ container, maxTxnFeeFormatted ? maxTxnFee : _("Invalid Amount"));
lv_obj_align_to(valueLabel, titleLabel, LV_ALIGN_OUT_RIGHT_MID, 16, 0);
height += 30 + 8;
@@ -902,11 +902,11 @@ static lv_obj_t *GuiRenderDetailTransactionInfoCard(lv_obj_t *parent, lv_obj_t *
char maxPriorityFee[ETH_BATCH_ASSET_AMOUNT_BUFFER_SIZE] = {0};
bool maxPriorityFeeFormatted = FormatAssetAmount(
- maxPriorityFee, sizeof(maxPriorityFee),
- g_currentTransaction->detail->max_priority, g_currentNetwork.symbol);
+ maxPriorityFee, sizeof(maxPriorityFee),
+ g_currentTransaction->detail->max_priority, g_currentNetwork.symbol);
valueLabel = GuiCreateIllustrateLabel(
- container,
- maxPriorityFeeFormatted ? maxPriorityFee : _("Invalid Amount"));
+ container,
+ maxPriorityFeeFormatted ? maxPriorityFee : _("Invalid Amount"));
lv_obj_align_to(valueLabel, titleLabel, LV_ALIGN_OUT_RIGHT_MID, 16, 0);
height += 30 + 8;
@@ -1106,7 +1106,7 @@ static void GuiRenderDetail(lv_obj_t *parent)
last_view = GuiRenderDetailFromTo(parent, last_view);
if (g_currentTransaction->detail->input != NULL &&
- g_currentTransaction->detail->input[0] != '\0') {
+ g_currentTransaction->detail->input[0] != '\0') {
if (g_contractData != NULL && g_contractData->error_code == 0) {
last_view = GuiRenderDetailContractData(parent, last_view);
} else {
### src/ui/gui_widgets/setting/gui_fingerprint_widgets.c
@@ -122,7 +122,8 @@ void GuiWalletFingerOpenSign(void)
.obj = img,
.align = LV_ALIGN_DEFAULT,
.position = {14, 14},
- }};
+ }
+ };
lv_obj_t *button = GuiCreateButton(cont, 64, 64, table, 1, CancelVerifyFingerHandler, NULL);
lv_obj_align(button, LV_ALIGN_DEFAULT, 384, 394);
@@ -323,7 +324,8 @@ void GuiWalletFingerAddWidget(lv_obj_t *parent)
.obj = label,
.align = LV_ALIGN_BOTTOM_MID,
.position = {0, -15},
- }};
+ }
+ };
static uint32_t walletSetting = DEVICE_SETTING_FINGER_ADD_SUCCESS;
lv_obj_t *button = NULL;
button = GuiCreateButton(parent, 408, 66, table, 1, WalletSettingHandler, &walletSetting);
@@ -355,7 +357,8 @@ void GuiFingerMangerStructureCb(void *obj, void *param)
static uint32_t walletSetting[3] = {
DEVICE_SETTING_FINGER_ADD_ENTER,
DEVICE_SETTING_FINGER_DELETE,
- DEVICE_SETTING_FINGER_SET_PATTERN};
+ DEVICE_SETTING_FINGER_SET_PATTERN
+ };
static uint16_t walletUnlock = SIG_FINGER_SET_UNLOCK;
static uint16_t walletSign = SIG_FINGER_SET_SIGN_TRANSITIONS;
@@ -465,7 +468,8 @@ void GuiWalletFingerDeleteWidget(lv_obj_t *parent)
.obj = label,
.align = LV_ALIGN_BOTTOM_MID,
.position = {0, -15},
- }};
+ }
+ };
lv_obj_t *button = GuiCreateButton(parent, 282, 66, table, NUMBER_OF_ARRAYS(table), FingerDeleteDialogsHandler, &g_deleteFingerIndex);
lv_obj_align(button, LV_ALIGN_BOTTOM_MID, 0, -64);
}
@@ -474,7 +478,8 @@ void GuiWalletSetFingerPassCodeWidget(lv_obj_t *parent)
{
static uint32_t walletSetting[2] = {
SIG_FINGER_FINGER_SETTING,
- SIG_SETTING_CHANGE_PASSWORD};
+ SIG_SETTING_CHANGE_PASSWORD
+ };
lv_obj_set_style_bg_opa(parent, LV_OPA_0, LV_PART_SCROLLBAR | LV_STATE_SCROLLED);
lv_obj_set_style_bg_opa(parent, LV_OPA_0, LV_PART_SCROLLBAR | LV_STATE_DEFAULT);
### src/ui/gui_widgets/setting/gui_wallet_setting_widgets.c
@@ -287,7 +287,7 @@ static void PasscodeNoticeContinueHandler(lv_event_t *e)
if (GetCurrentDisplayPercent() < 20) {
GUI_DEL_OBJ(g_hintBox)
g_hintBox = GuiCreateConfirmHintBox(&imgWarn, _("error_box_low_power"),
- _("passcode_change_low_power_desc"), NULL, _("OK"), ORANGE_COLOR);
+ _("passcode_change_low_power_desc"), NULL, _("OK"), ORANGE_COLOR);
lv_obj_add_event_cb(GuiGetHintBoxRightBtn(g_hintBox), CloseHintBoxHandler, LV_EVENT_CLICKED, &g_hintBox);
return;
}
### src/ui/lv_i18n/lv_i18n.c
@@ -9,13 +9,35 @@
#define UNUSED(x) (void)(x)
-static inline uint32_t op_n(int32_t val) { return (uint32_t)(val < 0 ? -val : val); }
-static inline uint32_t op_i(uint32_t val) { return val; }
+static inline uint32_t op_n(int32_t val)
+{
+ return (uint32_t)(val < 0 ? -val : val);
+}
+static inline uint32_t op_i(uint32_t val)
+{
+ return val;
+}
// always zero, when decimal part not exists.
-static inline uint32_t op_v(uint32_t val) { UNUSED(val); return 0;}
-static inline uint32_t op_w(uint32_t val) { UNUSED(val); return 0; }
-static inline uint32_t op_f(uint32_t val) { UNUSED(val); return 0; }
-static inline uint32_t op_t(uint32_t val) { UNUSED(val); return 0; }
+static inline uint32_t op_v(uint32_t val)
+{
+ UNUSED(val);
+ return 0;
+}
+static inline uint32_t op_w(uint32_t val)
+{
+ UNUSED(val);
+ return 0;
+}
+static inline uint32_t op_f(uint32_t val)
+{
+ UNUSED(val);
+ return 0;
+}
+static inline uint32_t op_t(uint32_t val)
+{
+ UNUSED(val);
+ return 0;
+}
const static lv_i18n_phrase_t en_singulars[] = {
{"tron_unknown_contract_warning", "Unrecognized contract call. The device cannot determine its effects. Verify the contract, attached assets and call data before signing."},
@@ -1050,9 +1072,12 @@ const static lv_i18n_phrase_t en_singulars[] = {
static uint8_t en_plural_fn(int32_t num)
{
- uint32_t n = op_n(num); UNUSED(n);
- uint32_t i = op_i(n); UNUSED(i);
- uint32_t v = op_v(n); UNUSED(v);
+ uint32_t n = op_n(num);
+ UNUSED(n);
+ uint32_t i = op_i(n);
+ UNUSED(i);
+ uint32_t v = op_v(n);
+ UNUSED(v);
if ((i == 1 && v == 0)) return LV_I18N_PLURAL_TYPE_ONE;
return LV_I18N_PLURAL_TYPE_OTHER;
@@ -2098,9 +2123,12 @@ const static lv_i18n_phrase_t de_singulars[] = {
static uint8_t de_plural_fn(int32_t num)
{
- uint32_t n = op_n(num); UNUSED(n);
- uint32_t i = op_i(n); UNUSED(i);
- uint32_t v = op_v(n); UNUSED(v);
+ uint32_t n = op_n(num);
+ UNUSED(n);
+ uint32_t i = op_i(n);
+ UNUSED(i);
+ uint32_t v = op_v(n);
+ UNUSED(v);
if ((i == 1 && v == 0)) return LV_I18N_PLURAL_TYPE_ONE;
return LV_I18N_PLURAL_TYPE_OTHER;
@@ -3146,7 +3174,8 @@ const static lv_i18n_phrase_t es_singulars[] = {
static uint8_t es_plural_fn(int32_t num)
{
- uint32_t n = op_n(num); UNUSED(n);
+ uint32_t n = op_n(num);
+ UNUSED(n);
if ((n == 1)) return LV_I18N_PLURAL_TYPE_ONE;
@@ -6285,9 +6314,12 @@ const static lv_i18n_phrase_t ru_singulars[] = {
static uint8_t ru_plural_fn(int32_t num)
{
- uint32_t n = op_n(num); UNUSED(n);
- uint32_t v = op_v(n); UNUSED(v);
- uint32_t i = op_i(n); UNUSED(i);
+ uint32_t n = op_n(num);
+ UNUSED(n);
+ uint32_t v = op_v(n);
+ UNUSED(v);
+ uint32_t i = op_i(n);
+ UNUSED(i);
uint32_t i10 = i % 10;
uint32_t i100 = i % 100;
if ((v == 0 && i10 == 1 && i100 != 11)) return LV_I18N_PLURAL_TYPE_ONE;
@@ -7383,8 +7415,8 @@ void __lv_i18n_reset(void)
*/
int lv_i18n_init(const lv_i18n_language_pack_t * langs)
{
- if(langs == NULL) return -1;
- if(langs[0] == NULL) return -1;
+ if (langs == NULL) return -1;
+ if (langs[0] == NULL) return -1;
current_lang_pack = langs;
current_lang = langs[0]; /*Automatically select the first language*/
@@ -7397,13 +7429,13 @@ int lv_i18n_init(const lv_i18n_language_pack_t * langs)
*/
int lv_i18n_set_locale(const char * l_name)
{
- if(current_lang_pack == NULL) return -1;
+ if (current_lang_pack == NULL) return -1;
uint16_t i;
- for(i = 0; current_lang_pack[i] != NULL; i++) {
+ for (i = 0; current_lang_pack[i] != NULL; i++) {
// Found -> finish
- if(strcmp(current_lang_pack[i]->locale_name, l_name) == 0) {
+ if (strcmp(current_lang_pack[i]->locale_name, l_name) == 0) {
current_lang = current_lang_pack[i];
return 0;
}
@@ -7416,10 +7448,10 @@ int lv_i18n_set_locale(const char * l_name)
static const char * __lv_i18n_get_text_core(lv_i18n_phrase_t * trans, const char * msg_id)
{
uint16_t i;
- for(i = 0; trans[i].msg_id != NULL; i++) {
- if(strcmp(trans[i].msg_id, msg_id) == 0) {
+ for (i = 0; trans[i].msg_id != NULL; i++) {
+ if (strcmp(trans[i].msg_id, msg_id) == 0) {
/*The msg_id has found. Check the translation*/
- if(trans[i].translation) return trans[i].translation;
+ if (trans[i].translation) return trans[i].translation;
}
}
@@ -7434,23 +7466,23 @@ static const char * __lv_i18n_get_text_core(lv_i18n_phrase_t * trans, const char
*/
const char * lv_i18n_get_text(const char * msg_id)
{
- if(current_lang == NULL) return msg_id;
+ if (current_lang == NULL) return msg_id;
const lv_i18n_lang_t * lang = current_lang;
const void * txt;
// Search in current locale
- if(lang->singulars != NULL) {
+ if (lang->singulars != NULL) {
txt = __lv_i18n_get_text_core(lang->singulars, msg_id);
if (txt != NULL) return txt;
}
// Try to fallback
- if(lang == current_lang_pack[0]) return msg_id;
+ if (lang == current_lang_pack[0]) return msg_id;
lang = current_lang_pack[0];
// Repeat search for default locale
- if(lang->singulars != NULL) {
+ if (lang->singulars != NULL) {
txt = __lv_i18n_get_text_core(lang->singulars, msg_id);
if (txt != NULL) return txt;
}
@@ -7466,31 +7498,31 @@ const char * lv_i18n_get_text(const char * msg_id)
*/
const char * lv_i18n_get_text_plural(const char * msg_id, int32_t num)
{
- if(current_lang == NULL) return msg_id;
+ if (current_lang == NULL) return msg_id;
const lv_i18n_lang_t * lang = current_lang;
const void * txt;
lv_i18n_plural_type_t ptype;
// Search in current locale
- if(lang->locale_plural_fn != NULL) {
+ if (lang->locale_plural_fn != NULL) {
ptype = lang->locale_plural_fn(num);
- if(lang->plurals[ptype] != NULL) {
+ if (lang->plurals[ptype] != NULL) {
txt = __lv_i18n_get_text_core(lang->plurals[ptype], msg_id);
if (txt != NULL) return txt;
}
}
// Try to fallback
- if(lang == current_lang_pack[0]) return msg_id;
+ if (lang == current_lang_pack[0]) return msg_id;
lang = current_lang_pack[0];
// Repeat search for default locale
- if(lang->locale_plural_fn != NULL) {
+ if (lang->locale_plural_fn != NULL) {
ptype = lang->locale_plural_fn(num);
- if(lang->plurals[ptype] != NULL) {
+ if (lang->plurals[ptype] != NULL) {
txt = __lv_i18n_get_text_core(lang->plurals[ptype], msg_id);
if (txt != NULL) return txt;
}
@@ -7505,6 +7537,6 @@ const char * lv_i18n_get_text_plural(const char * msg_id, int32_t num)
*/
const char * lv_i18n_get_current_locale(void)
{
- if(!current_lang) return NULL;
+ if (!current_lang) return NULL;
return current_lang->locale_name;
}
### src/utils/log/log_print.c
@@ -200,7 +200,7 @@ void RestartCountdownOnLcd(void)
for (int secondsLeft = RESTART_COUNTDOWN_SECONDS; secondsLeft > 0; secondsLeft--) {
snprintf_s(line, sizeof(line), "Restart in %ds", secondsLeft);
- RedrawCenteredLineOnLcd(RESTART_COUNTDOWN_LINE_Y, line, 0x21F4U, &openSans_20);
+ RedrawCenteredLineOnLcd(RESTART_COUNTDOWN_LINE_Y, line, 0x21F4U, &openSans_20);
for (int waited = 0; waited < 1000; waited += RESTART_POLL_INTERVAL_MS) {
if (ButtonPress()) {
NVIC_SystemReset();
@@ -214,11 +214,11 @@ void RestartCountdownOnLcd(void)
void LogRustPanic(char* panic_info)
{
osKernelLock();
- LcdBacklightOn();
+ LcdBacklightOn();
// Show only a fixed, user-facing error message on the LCD.
PrintOnLcd(&openSans_20, 0xFFFF, "The error was caused by a failed data request.\nYour assets remain safe.\n");
PrintErrorInfoOnLcd();
- WipeSecretCacheOnFatalError();
+ WipeSecretCacheOnFatalError();
RestartCountdownOnLcd();
}
### src/webusb_protocol/general/eapdu_framing.c
@@ -48,8 +48,8 @@ static uint16_t ReadU16(const uint8_t *data, size_t offset)
}
static EapduFramingResult_t ResetWithError(EapduFramingState_t *state,
- EapduFramingResult_t result,
- EapduFramingStatus_t status)
+ EapduFramingResult_t result,
+ EapduFramingStatus_t status)
{
result.status = status;
EapduFramingReset(state);
### src/webusb_protocol/general/eapdu_services/service_resolve_ur.c
@@ -60,7 +60,7 @@ static void BasicHandlerFunc(const void *data, uint32_t data_len, uint16_t reque
root = cJSON_CreateObject();
if (root == NULL ||
- cJSON_AddStringToObject(root, "payload", data != NULL ? (char *)data : "") == NULL) {
+ cJSON_AddStringToObject(root, "payload", data != NULL ? (char *)data : "") == NULL) {
goto cleanup;
}
json_str = cJSON_PrintBuffered(root, BUFFER_SIZE_1024 * 4, false);
@@ -281,7 +281,8 @@ void ProcessURService(EAPDURequestPayload_t *payload)
UrViewType_t urViewType = {
.viewType = urResult->t,
- .urType = urResult->ur_type};
+ .urType = urResult->ur_type
+ };
if (urResult->ur_type == QRHardwareCall) {
HandleHardwareCall(urResult);Why this scored 19/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.