File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -126,33 +126,33 @@ impl Default for MockApi {
126
126
127
127
impl BackendApi for MockApi {
128
128
fn addr_validate ( & self , input : & str ) -> BackendResult < ( ) > {
129
- let mut gas = GasInfo {
129
+ let mut gas_total = GasInfo {
130
130
cost : 0 ,
131
131
externally_used : 0 ,
132
132
} ;
133
133
134
134
let ( result, gas_info) = self . addr_canonicalize ( input) ;
135
- gas += gas_info;
135
+ gas_total += gas_info;
136
136
let canonical = match result {
137
137
Ok ( canonical) => canonical,
138
- Err ( err) => return ( Err ( err) , gas ) ,
138
+ Err ( err) => return ( Err ( err) , gas_total ) ,
139
139
} ;
140
140
141
141
let ( result, gas_info) = self . addr_humanize ( & canonical) ;
142
- gas += gas_info;
142
+ gas_total += gas_info;
143
143
let normalized = match result {
144
144
Ok ( norm) => norm,
145
- Err ( err) => return ( Err ( err) , gas ) ,
145
+ Err ( err) => return ( Err ( err) , gas_total ) ,
146
146
} ;
147
147
if input != normalized. as_str ( ) {
148
148
return (
149
149
Err ( BackendError :: user_err (
150
150
"Invalid input: address not normalized" ,
151
151
) ) ,
152
- gas ,
152
+ gas_total ,
153
153
) ;
154
154
}
155
- ( Ok ( ( ) ) , gas )
155
+ ( Ok ( ( ) ) , gas_total )
156
156
}
157
157
158
158
fn addr_canonicalize ( & self , input : & str ) -> BackendResult < Vec < u8 > > {
You can’t perform that action at this time.
0 commit comments