forked from LedgerHQ/app-boilerplate-rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from Conflux-Chain/fixAudit2
Fix audit2
- Loading branch information
Showing
12 changed files
with
40 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
#![allow(unused)] | ||
mod consts; | ||
mod types; | ||
mod utils; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,20 @@ | ||
#![allow(dead_code)] | ||
|
||
pub const ADDRRESS_BYTES_LEN: usize = 20; | ||
|
||
pub const HASH_BYTES_LEN: usize = 32; | ||
|
||
/** | ||
* Maximum length of MAJOR_VERSION || MINOR_VERSION || PATCH_VERSION. | ||
*/ | ||
pub const APPVERSION_LEN: usize = 3; | ||
|
||
/** | ||
* Maximum length of application name. | ||
*/ | ||
pub const MAX_APPNAME_LEN: usize = 64; | ||
|
||
/** | ||
* Maximum transaction length (bytes). | ||
*/ | ||
pub const MAX_TRANSACTION_LEN: usize = 765; | ||
|
||
/** | ||
* Maximum signature length (bytes). | ||
*/ | ||
pub const MAX_DER_SIG_LEN: usize = 72; | ||
|
||
/** | ||
* Exponent used to convert Drip to CFX unit (N CFX = N * 10^18 Drip). | ||
*/ | ||
pub const EXPONENT_SMALLEST_UNIT: usize = 18; | ||
|
||
/** | ||
* Well-known Conflux chain IDs. | ||
*/ | ||
pub const CONFLUX_MAINNET_CHAINID: usize = 1029; | ||
|
||
pub const CONFLUX_TESTNET_CHAINID: usize = 1; | ||
|
||
/** | ||
* Application flags. | ||
*/ | ||
pub const APP_FLAG_BLIND_SIGNING_ENABLED: u8 = 0x01; | ||
|
||
pub const APP_FLAG_DETAILED_DISPLAY_ENABLED: u8 = 0x02; | ||
|
||
// pub const PERSONAL_SIGN_PREFIX: &str = "\x19Conflux Signed Message:\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters