Skip to content

Commit

Permalink
fix: audit feedback (#99)
Browse files Browse the repository at this point in the history
* fix: remove commented code

* fix: replace unwrap with map_err

* chore: bump version

* chore: snapshots
  • Loading branch information
emmanuelm41 authored Dec 2, 2024
1 parent 50ee4e1 commit 518d86c
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion app/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[env]
HEAP_SIZE = "16384"
APPVERSION = "1.1.0"
APPVERSION = "1.1.1"

[unstable]
build-std = ["core", "alloc"]
Expand Down
1 change: 0 additions & 1 deletion app/src/app_ui/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ pub fn ui_menu_main(comm: &mut Comm) -> Event<Instruction> {
false => "Disabled",
};

// app_version = String::from("x");
let pages = [
&Page::from((_first_page_label, &APP_ICON)),
&Page::from((["Expert Mode", expert_mode_label], true, true)),
Expand Down
6 changes: 3 additions & 3 deletions app/src/crypto/chacha20poly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ pub fn compute_key() -> EncryptionKeyGuard {
let path_0: Vec<u32> = vec![
(0x80000000 | 0x2c),
(0x80000000 | 0x53a),
(0x80000000), // (0x80000000 | 0x0)
(0x80000000), // (0x80000000 | 0x0)
(0x80000000), // (0x80000000 | 0x0)
(0x80000000),
(0x80000000),
(0x80000000),
];

let mut secret_key_0 = Secret::<ED25519_KEY_LEN>::new();
Expand Down
8 changes: 4 additions & 4 deletions app/src/crypto/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,15 @@ pub(crate) fn compute_dkg_secret(index: u8) -> IronfishSecretGuard {
let path_0: Vec<u32> = vec![
(0x80000000 | 0x2c),
(0x80000000 | 0x53a),
(0x80000000), // (0x80000000 | 0x0)
(0x80000000), // (0x80000000 | 0x0)
(0x80000000),
(0x80000000),
(0x80000000 | index_1),
];
let path_1: Vec<u32> = vec![
(0x80000000 | 0x2c),
(0x80000000 | 0x53a),
(0x80000000), // (0x80000000 | 0x0)
(0x80000000), //(0x80000000 | 0x0)
(0x80000000),
(0x80000000),
(0x80000000 | index_2),
];

Expand Down
6 changes: 2 additions & 4 deletions app/src/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@ pub struct TokenInfo<'a> {
}

pub fn get_token_list() -> Result<TokenList<'static>, ParserError> {
let t = serde_json_core::from_str::<TokenList>(TOKEN_LIST)
serde_json_core::from_str::<TokenList>(TOKEN_LIST)
.map(|(t, _)| t)
.unwrap();
// .map_err(|_| ParserError::InvalidTokenList)?;
Ok(t)
.map_err(|_| ParserError::InvalidTokenList)
}

impl<'a> TokenList<'a> {
Expand Down
Binary file modified tests_zemu/snapshots/sp-mainmenu/00002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/sp-mainmenu/00006.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion tests_zemu/tests/basic.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe('Basic', function () {
expect(resp.testMode).toBe(false)
expect(resp.major).toBe(1)
expect(resp.minor).toBe(1)
expect(resp.patch).toBe(0)
expect(resp.patch).toBe(1)
} finally {
await sim.close()
}
Expand Down

0 comments on commit 518d86c

Please sign in to comment.