Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/trade/lookback.es6
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,18 @@ export const barrierLabels = (type) => {
return barrier_map[type];
}

export const makeLookbackRequest = req => {
const { amount } = req;
const multiplier = amount ? +amount : 0;
delete req.amount;
delete req.basis;

return { ...req, multiplier }
}

export default {
isLookback,
formula,
barrierLabels
barrierLabels,
makeLookbackRequest
}
8 changes: 7 additions & 1 deletion src/trade/tradeDialog.es6
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,13 @@ function init_state(available,root, dialog, symbol, contracts_for_spot) {
let response;
for (let i = 0; i < times_to_retry; i++) {
try {
response = await liveapi.send(request);
const { contract_type } = state.category_displays.selected;
if (Lookback.isLookback(contract_type)) {
const lookback_request = Lookback.makeLookbackRequest(request);
response = await liveapi.send(lookback_request);
} else {
response = await liveapi.send(request);
}
state.proposal.error = '';
state.proposal.id = response.proposal && response.proposal.id;
break;
Expand Down
4 changes: 2 additions & 2 deletions translations/i18n/id.po
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ msgstr ""
"Last-Translator: binarycom\n"
"Language-Team: Indonesian\n"
"Language: id_ID\n"
"PO-Revision-Date: 2019-05-23 05:20\n"
"PO-Revision-Date: 2019-08-21 05:00\n"

msgid "\"http://www.gamblingcommission.gov.uk/Consumers/Protection-of-customer-funds.aspx\""
msgstr "\"http://www.gamblingcommission.gov.uk/Consumers/Protection-of-customer-funds.aspx\""
Expand Down Expand Up @@ -958,7 +958,7 @@ msgid "Logging out because of self-exclusion session time out!"
msgstr "Keluar berhubung sesi waktu pengecualian diri!"

msgid "Login"
msgstr "Login"
msgstr "Masuk"

msgid "Logout"
msgstr "Keluar"
Expand Down
8 changes: 4 additions & 4 deletions translations/i18n/it.po
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ msgstr ""
"Last-Translator: binarycom\n"
"Language-Team: Italian\n"
"Language: it_IT\n"
"PO-Revision-Date: 2019-06-21 05:50\n"
"PO-Revision-Date: 2019-08-27 14:57\n"

msgid "\"http://www.gamblingcommission.gov.uk/Consumers/Protection-of-customer-funds.aspx\""
msgstr "\"http://www.gamblingcommission.gov.uk/Consumers/Protection-of-customer-funds.aspx\""
Expand All @@ -37,7 +37,7 @@ msgid "0-1 year"
msgstr "0-1 anno"

msgid "0-5 transactions in the past 12 months"
msgstr "0-5 transazioni negli ultimi 12 mesi"
msgstr "0-5 operazioni negli ultimi 12 mesi"

msgid "1"
msgstr "1"
Expand Down Expand Up @@ -115,7 +115,7 @@ msgid "30 Minutes"
msgstr "30 minuti"

msgid "30-day limit on losses"
msgstr "limite delle perdite per 30 giorni"
msgstr "limite di 30 giorni sulle perdite"

msgid "30-day turnover limit"
msgstr "limite di turnover per 30 giorni"
Expand All @@ -133,7 +133,7 @@ msgid "4 Hours"
msgstr "4 ore"

msgid "40 transactions or more in the past 12 months"
msgstr "40 transazioni o più negli ultimi 12 mesi"
msgstr "40 o più operazioni negli ultimi 12 mesi"

msgid "4h"
msgstr "4h"
Expand Down
4 changes: 2 additions & 2 deletions translations/i18n/th.po
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ msgstr ""
"Last-Translator: binarycom\n"
"Language-Team: Thai\n"
"Language: th_TH\n"
"PO-Revision-Date: 2019-05-22 14:11\n"
"PO-Revision-Date: 2019-08-21 04:30\n"

msgid "\"http://www.gamblingcommission.gov.uk/Consumers/Protection-of-customer-funds.aspx\""
msgstr "\"http://www.gamblingcommission.gov.uk/Consumers/Protection-of-customer-funds.aspx\""
Expand Down Expand Up @@ -229,7 +229,7 @@ msgid "Amount per point"
msgstr "จำนวนต่อจุด"

msgid "Apply"
msgstr "สมัคร"
msgstr "ใช้งาน"

msgid "Apply to become a Binary.com"
msgstr "สมัครเพื่อเป็นตัวแทนรับชำระเงินกับ Binary.com"
Expand Down