Streamline isMakerBlacklisted() logic
This commit is contained in:
parent
79e0a9ef37
commit
ec08715090
@ -24,15 +24,10 @@ export class RfqMakerBlacklist {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
public isMakerBlacklisted(makerUrl: string): boolean {
|
public isMakerBlacklisted(makerUrl: string): boolean {
|
||||||
if (this._makerBlacklistedUntilDate.hasOwnProperty(makerUrl)) {
|
const now = Date.now();
|
||||||
if (this._makerBlacklistedUntilDate[makerUrl] > Date.now()) {
|
if (now > this._makerBlacklistedUntilDate[makerUrl]) {
|
||||||
delete this._makerBlacklistedUntilDate[makerUrl];
|
delete this._makerBlacklistedUntilDate[makerUrl];
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
return this._makerBlacklistedUntilDate[makerUrl] > now;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user