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

Commit b12776c

Browse files
committed
Update getAskPrice + getPayout calls
1 parent ac34295 commit b12776c

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

src/botPage/bot/Interface/index.js

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default class Interface extends ToolsInterface(TicksInterface(class {}))
3737
};
3838
}
3939
getBotInterface() {
40-
const getDetail = (i, pipSize) => createDetails(this.get('contract'), pipSize)[i];
40+
const getDetail = (i, pipSize) => createDetails(this.data.contract, pipSize)[i];
4141

4242
return {
4343
init : (...args) => this.tradeEngine.init(...args),
@@ -65,22 +65,12 @@ export default class Interface extends ToolsInterface(TicksInterface(class {}))
6565
);
6666
}
6767
getProposal(contractType) {
68-
const proposals = this.get('proposals');
69-
70-
let proposal;
71-
72-
proposals.forEach(p => {
73-
if (p.contractType === contractType) {
74-
proposal = p;
75-
}
76-
});
77-
78-
return proposal;
68+
return this.data.proposals.find(
69+
proposal =>
70+
proposal.contractType === contractType && proposal.purchaseReference === this.getPurchaseReference()
71+
);
7972
}
8073
getSellPrice() {
8174
return this.tradeEngine.getSellPrice();
8275
}
83-
get(key) {
84-
return this.tradeEngine.getData()[key];
85-
}
8676
}

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