File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 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 {
126126
127127impl BackendApi for MockApi {
128128 fn addr_validate ( & self , input : & str ) -> BackendResult < ( ) > {
129- let mut gas = GasInfo {
129+ let mut gas_total = GasInfo {
130130 cost : 0 ,
131131 externally_used : 0 ,
132132 } ;
133133
134134 let ( result, gas_info) = self . addr_canonicalize ( input) ;
135- gas += gas_info;
135+ gas_total += gas_info;
136136 let canonical = match result {
137137 Ok ( canonical) => canonical,
138- Err ( err) => return ( Err ( err) , gas ) ,
138+ Err ( err) => return ( Err ( err) , gas_total ) ,
139139 } ;
140140
141141 let ( result, gas_info) = self . addr_humanize ( & canonical) ;
142- gas += gas_info;
142+ gas_total += gas_info;
143143 let normalized = match result {
144144 Ok ( norm) => norm,
145- Err ( err) => return ( Err ( err) , gas ) ,
145+ Err ( err) => return ( Err ( err) , gas_total ) ,
146146 } ;
147147 if input != normalized. as_str ( ) {
148148 return (
149149 Err ( BackendError :: user_err (
150150 "Invalid input: address not normalized" ,
151151 ) ) ,
152- gas ,
152+ gas_total ,
153153 ) ;
154154 }
155- ( Ok ( ( ) ) , gas )
155+ ( Ok ( ( ) ) , gas_total )
156156 }
157157
158158 fn addr_canonicalize ( & self , input : & str ) -> BackendResult < Vec < u8 > > {
You can’t perform that action at this time.
0 commit comments