Skip to content

Commit

Permalink
fix: error during persisted transaction approval (#20626)
Browse files Browse the repository at this point in the history
This pull request addresses the issue that occurs when a pending transaction is present, the extension is disabled and then re-enabled, and subsequently, the user rejects the transaction. The goal is to prevent the logging of the error message "User rejected the request", while still capturing and logging any other types of errors.

Fixes #20604
  • Loading branch information
vinistevam authored Sep 13, 2023
1 parent 4b23ea8 commit 28b3943
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/scripts/controllers/transactions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,9 @@ export default class TransactionController extends EventEmitter {
this._requestTransactionApproval(txMeta, {
shouldShowRequest: false,
}).catch((error) => {
if (error.code === errorCodes.provider.userRejectedRequest) {
return;
}
log.error('Error during persisted transaction approval', error);
});
});
Expand Down

0 comments on commit 28b3943

Please sign in to comment.