@@ -138,7 +138,7 @@ static verification_state_e get_verified_pin_handler(verification_state_e state,
138
138
* passphrase input occurs, or a card abort error occurs
139
139
*
140
140
*/
141
- static void get_verified_pin (const uint8_t * wallet_id ,
141
+ static bool get_verified_pin (const uint8_t * wallet_id ,
142
142
verification_state_e init_state ,
143
143
uint8_t pin [MAX_PIN_SIZE ],
144
144
rejection_cb * reject_cb );
@@ -232,13 +232,13 @@ static verification_state_e get_verified_pin_handler(verification_state_e state,
232
232
return next_state ;
233
233
}
234
234
235
- static void get_verified_pin (const uint8_t * wallet_id ,
235
+ static bool get_verified_pin (const uint8_t * wallet_id ,
236
236
verification_state_e init_state ,
237
237
uint8_t pin [MAX_PIN_SIZE ],
238
238
rejection_cb * reject_cb ) {
239
239
// Select wallet based on wallet_id
240
240
if (!get_wallet_data_by_id (wallet_id , & wallet , reject_cb )) {
241
- return NULL ;
241
+ return false ;
242
242
}
243
243
244
244
// Run flow till it reaches a completion state
@@ -258,6 +258,7 @@ static void get_verified_pin(const uint8_t *wallet_id,
258
258
// Inform the host of any rejection
259
259
reject_cb (ERROR_COMMON_ERROR_USER_REJECTION_TAG ,
260
260
ERROR_USER_REJECTION_CONFIRMATION );
261
+ return false;
261
262
}
262
263
}
263
264
@@ -274,7 +275,9 @@ bool verify_pin(const uint8_t *wallet_id,
274
275
clear_wallet_data ();
275
276
mnemonic_clear ();
276
277
277
- get_verified_pin (wallet_id , PIN_INPUT , pin_out , reject_cb );
278
+ if (!get_verified_pin (wallet_id , PIN_INPUT , pin_out , reject_cb )) {
279
+ return false;
280
+ }
278
281
279
282
mnemonic_clear ();
280
283
clear_wallet_data ();
0 commit comments