Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Commit ac011d9

Browse files
committed
Ignore proposal overflow as redundant
1 parent 566b4f5 commit ac011d9

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

src/botPage/bot/TradeEngine/Proposal.js

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -133,18 +133,16 @@ export default Engine =>
133133
const { proposals } = this.data;
134134

135135
if (proposals.length > 0) {
136-
const hasEqualLength = proposals.length === this.proposalTemplates.length;
137-
const hasEqualProposals = () =>
138-
this.proposalTemplates.every(
139-
template =>
140-
proposals.findIndex(
141-
proposal =>
142-
proposal.purchaseReference === template.passthrough.purchaseReference &&
143-
proposal.contractType === template.contract_type
144-
) !== -1
145-
);
136+
const hasEqualProposals = this.proposalTemplates.every(
137+
template =>
138+
proposals.findIndex(
139+
proposal =>
140+
proposal.purchaseReference === template.passthrough.purchaseReference &&
141+
proposal.contractType === template.contract_type
142+
) !== -1
143+
);
146144

147-
if (hasEqualLength && hasEqualProposals()) {
145+
if (hasEqualProposals) {
148146
this.startPromise.then(() => this.store.dispatch(proposalsReady()));
149147
}
150148
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy