Skip to content

Commit ae89acb

Browse files
committed
Fix: update condition to prevent redundant phishing requests
1 parent 9942bc3 commit ae89acb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/controllers/phishing/phishing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export class PhishingController extends EventEmitter implements IPhishingControl
114114
async #continuouslyUpdatePhishing() {
115115
// This prevents redundant requests to the relayer
116116
// when the extension reloads multiple times within a short period.
117-
if (this.#updatedAt && this.#updatedAt < PHISHING_UPDATE_INTERVAL) return
117+
if (this.#updatedAt && Date.now() - this.#updatedAt < PHISHING_UPDATE_INTERVAL) return
118118

119119
const res = await fetchWithTimeout(
120120
this.#fetch,

0 commit comments

Comments
 (0)