Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b3d63ed492 |
@@ -632,8 +632,8 @@ function isExtensionSender(sender) {
|
|||||||
// had refused.
|
// had refused.
|
||||||
//
|
//
|
||||||
// TX and sign approvals do not decide here. They stay pending across a
|
// TX and sign approvals do not decide here. They stay pending across a
|
||||||
// disconnect — the user can reopen the toolbar popup — and are rejected by the
|
// disconnect, and the windows.onRemoved listener below settles them when their
|
||||||
// windows.onRemoved listener below.
|
// window closes.
|
||||||
runtime.onConnect.addListener((port) => {
|
runtime.onConnect.addListener((port) => {
|
||||||
if (port.name.startsWith("approval:")) {
|
if (port.name.startsWith("approval:")) {
|
||||||
const id = port.name.split(":")[1];
|
const id = port.name.split(":")[1];
|
||||||
@@ -661,7 +661,7 @@ runtime.onConnect.addListener((port) => {
|
|||||||
const approval = pendingApprovals[id];
|
const approval = pendingApprovals[id];
|
||||||
if (approval) {
|
if (approval) {
|
||||||
if (approval.type === "tx" || approval.type === "sign") {
|
if (approval.type === "tx" || approval.type === "sign") {
|
||||||
// Keep pending — user can reopen the toolbar popup
|
// windows.onRemoved settles it when its window closes.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
settleApproval(id, { approved: false, remember: false });
|
settleApproval(id, { approved: false, remember: false });
|
||||||
|
|||||||
Reference in New Issue
Block a user