@@ -231,7 +231,8 @@ bool stellar_confirmCreateAccountOp(const StellarCreateAccountOp *msg) {
231231 stellar_activeTx .confirmed_operations ++ ;
232232 if (!stellar_layoutTransactionDialog (ARRAY_SIZE (expeted_keys ), expeted_keys ,
233233 values )) {
234- stellar_signingFail ("User canceled" );
234+ fsm_sendFailure (FailureType_Failure_ActionCancelled , "User canceled" );
235+ stellar_signingAbort ();
235236 return false;
236237 }
237238
@@ -282,7 +283,8 @@ bool stellar_confirmPaymentOp(const StellarPaymentOp *msg) {
282283 _ ("Missing Memo/Tag during exchange deposits "
283284 "may result in fund loss." ));
284285 if (!protectButton (ButtonRequestType_ButtonRequest_ProtectCall , false)) {
285- stellar_signingFail ("User canceled" );
286+ fsm_sendFailure (FailureType_Failure_ActionCancelled , "User canceled" );
287+ stellar_signingAbort ();
286288 return false;
287289 }
288290 }
@@ -296,7 +298,8 @@ bool stellar_confirmPaymentOp(const StellarPaymentOp *msg) {
296298 stellar_activeTx .confirmed_operations ++ ;
297299 if (!stellar_layoutTransactionDialog (ARRAY_SIZE (expeted_keys ), expeted_keys ,
298300 values )) {
299- stellar_signingFail ("User canceled" );
301+ fsm_sendFailure (FailureType_Failure_ActionCancelled , "User canceled" );
302+ stellar_signingAbort ();
300303 return false;
301304 }
302305
@@ -390,7 +393,8 @@ bool stellar_confirmPathPaymentStrictReceiveOp(
390393 stellar_activeTx .confirmed_operations ++ ;
391394 if (!stellar_layoutTransactionDialog (ARRAY_SIZE (expeted_keys ), expeted_keys ,
392395 values )) {
393- stellar_signingFail ("User canceled" );
396+ fsm_sendFailure (FailureType_Failure_ActionCancelled , "User canceled" );
397+ stellar_signingAbort ();
394398 return false;
395399 }
396400 // Note: no confirmation for intermediate steps since they don't impact the
@@ -489,7 +493,8 @@ bool stellar_confirmPathPaymentStrictSendOp(
489493 stellar_activeTx .confirmed_operations ++ ;
490494 if (!stellar_layoutTransactionDialog (ARRAY_SIZE (expeted_keys ), expeted_keys ,
491495 values )) {
492- stellar_signingFail ("User canceled" );
496+ fsm_sendFailure (FailureType_Failure_ActionCancelled , "User canceled" );
497+ stellar_signingAbort ();
493498 return false;
494499 }
495500 // Note: no confirmation for intermediate steps since they don't impact the
@@ -602,7 +607,8 @@ bool stellar_confirmManageBuyOfferOp(const StellarManageBuyOfferOp *msg) {
602607 stellar_activeTx .confirmed_operations ++ ;
603608 if (!stellar_layoutTransactionDialog (ARRAY_SIZE (expeted_keys ), expeted_keys ,
604609 values )) {
605- stellar_signingFail ("User canceled" );
610+ fsm_sendFailure (FailureType_Failure_ActionCancelled , "User canceled" );
611+ stellar_signingAbort ();
606612 return false;
607613 }
608614
@@ -708,7 +714,8 @@ bool stellar_confirmManageSellOfferOp(const StellarManageSellOfferOp *msg) {
708714 stellar_activeTx .confirmed_operations ++ ;
709715 if (!stellar_layoutTransactionDialog (ARRAY_SIZE (expeted_keys ), expeted_keys ,
710716 values )) {
711- stellar_signingFail ("User canceled" );
717+ fsm_sendFailure (FailureType_Failure_ActionCancelled , "User canceled" );
718+ stellar_signingAbort ();
712719 return false;
713720 }
714721 // Hash selling asset
@@ -810,7 +817,8 @@ bool stellar_confirmCreatePassiveSellOfferOp(
810817 stellar_activeTx .confirmed_operations ++ ;
811818 if (!stellar_layoutTransactionDialog (ARRAY_SIZE (expeted_keys ), expeted_keys ,
812819 values )) {
813- stellar_signingFail ("User canceled" );
820+ fsm_sendFailure (FailureType_Failure_ActionCancelled , "User canceled" );
821+ stellar_signingAbort ();
814822 return false;
815823 }
816824 // Hash selling asset
@@ -1079,7 +1087,8 @@ bool stellar_confirmSetOptionsOp(const StellarSetOptionsOp *msg) {
10791087 stellar_activeTx .confirmed_operations ++ ;
10801088 if (!stellar_layoutTransactionDialog (ARRAY_SIZE (expeted_keys ), expeted_keys ,
10811089 values )) {
1082- stellar_signingFail ("User canceled" );
1090+ fsm_sendFailure (FailureType_Failure_ActionCancelled , "User canceled" );
1091+ stellar_signingAbort ();
10831092 return false;
10841093 }
10851094 // Hash: signer type
@@ -1127,7 +1136,6 @@ bool stellar_confirmChangeTrustOp(const StellarChangeTrustOp *msg) {
11271136 // Validate destination account and convert to bytes
11281137 uint8_t asset_issuer_bytes [STELLAR_KEY_SIZE ] = {0 };
11291138 if (!stellar_getAddressBytes (msg -> asset .issuer , asset_issuer_bytes )) {
1130- stellar_signingFail ("User canceled" );
11311139 fsm_sendFailure (FailureType_Failure_ProcessError , "Invalid asset issuer" );
11321140 return false;
11331141 }
@@ -1148,7 +1156,8 @@ bool stellar_confirmChangeTrustOp(const StellarChangeTrustOp *msg) {
11481156 stellar_activeTx .confirmed_operations ++ ;
11491157 if (!stellar_layoutTransactionDialog (ARRAY_SIZE (expeted_keys ), expeted_keys ,
11501158 values )) {
1151- stellar_signingFail ("User canceled" );
1159+ fsm_sendFailure (FailureType_Failure_ActionCancelled , "User canceled" );
1160+ stellar_signingAbort ();
11521161 return false;
11531162 }
11541163 // Hash: asset
@@ -1208,7 +1217,8 @@ bool stellar_confirmAllowTrustOp(const StellarAllowTrustOp *msg) {
12081217 stellar_activeTx .confirmed_operations ++ ;
12091218 if (!stellar_layoutTransactionDialog (ARRAY_SIZE (expeted_keys ), expeted_keys ,
12101219 values )) {
1211- stellar_signingFail ("User canceled" );
1220+ fsm_sendFailure (FailureType_Failure_ActionCancelled , "User canceled" );
1221+ stellar_signingAbort ();
12121222 return false;
12131223 }
12141224 // Hash: trustor account (the account being allowed to access the asset)
@@ -1265,7 +1275,8 @@ bool stellar_confirmAccountMergeOp(const StellarAccountMergeOp *msg) {
12651275 NULL , NULL ,
12661276 "All XLM will be sent to destination account" );
12671277 if (!protectButton (ButtonRequestType_ButtonRequest_ProtectCall , false)) {
1268- stellar_signingFail ("User canceled" );
1278+ fsm_sendFailure (FailureType_Failure_ActionCancelled , "User canceled" );
1279+ stellar_signingAbort ();
12691280 return false;
12701281 }
12711282 const char * const expeted_keys [] = {
@@ -1275,7 +1286,8 @@ bool stellar_confirmAccountMergeOp(const StellarAccountMergeOp *msg) {
12751286 stellar_activeTx .confirmed_operations ++ ;
12761287 if (!stellar_layoutTransactionDialog (ARRAY_SIZE (expeted_keys ), expeted_keys ,
12771288 values )) {
1278- stellar_signingFail ("User canceled" );
1289+ fsm_sendFailure (FailureType_Failure_ActionCancelled , "User canceled" );
1290+ stellar_signingAbort ();
12791291 return false;
12801292 }
12811293
@@ -1320,7 +1332,8 @@ bool stellar_confirmManageDataOp(const StellarManageDataOp *msg) {
13201332 stellar_activeTx .confirmed_operations ++ ;
13211333 if (!stellar_layoutTransactionDialog (ARRAY_SIZE (expeted_keys ), expeted_keys ,
13221334 values )) {
1323- stellar_signingFail ("User canceled" );
1335+ fsm_sendFailure (FailureType_Failure_ActionCancelled , "User canceled" );
1336+ stellar_signingAbort ();
13241337 return false;
13251338 }
13261339 // Hash: key
@@ -1357,7 +1370,8 @@ bool stellar_confirmBumpSequenceOp(const StellarBumpSequenceOp *msg) {
13571370 stellar_activeTx .confirmed_operations ++ ;
13581371 if (!stellar_layoutTransactionDialog (ARRAY_SIZE (expeted_keys ), expeted_keys ,
13591372 values )) {
1360- stellar_signingFail ("User canceled" );
1373+ fsm_sendFailure (FailureType_Failure_ActionCancelled , "User canceled" );
1374+ stellar_signingAbort ();
13611375 return false;
13621376 }
13631377 // Hash: bump to
@@ -1859,7 +1873,8 @@ void stellar_layoutTransactionSummary(const StellarSignTx *msg) {
18591873 const char * const values [] = {memo , signer_addr , str_seq_num , str_fee };
18601874 if (!stellar_layoutTransactionDialog (ARRAY_SIZE (expeted_keys ), expeted_keys ,
18611875 values )) {
1862- stellar_signingFail ("User canceled" );
1876+ fsm_sendFailure (FailureType_Failure_ActionCancelled , "User canceled" );
1877+ stellar_signingAbort ();
18631878 return ;
18641879 }
18651880
0 commit comments