We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7d67300 commit 147ac9aCopy full SHA for 147ac9a
1 file changed
cmd/crates/stellar-ledger/src/hd_path.rs
@@ -1,7 +1,6 @@
1
-use crate::Error;
+use crate::{Error, HD_PATH_ELEMENTS_COUNT};
2
3
const HARDENED_OFFSET: u32 = 1 << 31;
4
-const STELLAR_PATH_DEPTH: u8 = 3;
5
const PURPOSE: u32 = 44;
6
const COIN_TYPE: u32 = 148;
7
@@ -11,7 +10,7 @@ pub struct HdPath(pub u32);
11
10
impl HdPath {
12
#[must_use]
13
pub fn depth(&self) -> u8 {
14
- STELLAR_PATH_DEPTH
+ HD_PATH_ELEMENTS_COUNT
15
}
16
17
@@ -62,7 +61,7 @@ mod test {
62
61
63
#[test]
64
fn test_depth() {
65
- assert_eq!(HdPath(7).depth(), STELLAR_PATH_DEPTH);
+ assert_eq!(HdPath(7).depth(), HD_PATH_ELEMENTS_COUNT);
66
67
68
0 commit comments