Skip to content

Commit 534d503

Browse files
authored
Merge pull request #2322 from AmbireTech/bug/prevent-redundand-phishing-requests
Bug / Phishing refresh guard that prevents redundant requests to the Scam checker
2 parents 2dd2486 + ae89acb commit 534d503

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)