Skip to content

Commit

Permalink
fix: add max size for unlock request size
Browse files Browse the repository at this point in the history
I don't see a reason for the unlock counter to be >1. All unlock counts will vanish as soon as the wallet is unlocked
  • Loading branch information
Prithpal-Sooriya committed Jul 26, 2024
1 parent 30dce33 commit 537d8a5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/scripts/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -1015,9 +1015,13 @@ export function setupController(

function getPendingApprovalCount() {
try {
const unlockCount = Math.min(
controller.appStateController.waitingForUnlock.length,
1,
);

let pendingApprovalCount =
controller.appStateController.waitingForUnlock.length +
controller.approvalController.getTotalApprovalCount();
unlockCount + controller.approvalController.getTotalApprovalCount();

if (controller.preferencesController.getUseRequestQueue()) {
pendingApprovalCount +=
Expand Down

0 comments on commit 537d8a5

Please sign in to comment.