File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ pub fn get_signable_state_root(
48
48
49
49
pub fn get_balance_leaf ( acc : & ValidatorId , amnt : & BigNum ) -> Result < [ u8 ; 32 ] , Box < dyn Error > > {
50
50
let params = [
51
- ( ParamType :: Address , & acc. to_string ( ) [ ..] ) ,
51
+ ( ParamType :: Address , & acc. to_hex_non_prefix_string ( ) [ ..] ) ,
52
52
( ParamType :: Uint ( 256 ) , & amnt. to_str_radix ( 10 ) [ ..] ) ,
53
53
] ;
54
54
let encoded = encode_params ( & params, true ) ?;
Original file line number Diff line number Diff line change @@ -28,6 +28,9 @@ impl ValidatorId {
28
28
self . 0
29
29
}
30
30
31
+ pub fn to_hex_non_prefix_string ( & self ) -> String {
32
+ hex:: encode ( self . 0 )
33
+ }
31
34
pub fn to_hex_checksummed_string ( & self ) -> String {
32
35
eth_checksum:: checksum ( & format ! ( "0x{}" , hex:: encode( self . 0 ) ) )
33
36
}
You can’t perform that action at this time.
0 commit comments