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

Commit d5ac41c

Browse files
Merge branch 'master' into raunak/financial_assessment
2 parents 8d5e75b + 427e03c commit d5ac41c

File tree

5 files changed

+4
-36
lines changed

5 files changed

+4
-36
lines changed

src/javascript/binary/websocket_pages/socket.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function BinarySocketClass() {
5858
data.passthrough = {};
5959
}
6060
// temporary check
61-
if((data.contracts_for || data.proposal || data.price_stream) && !data.passthrough.hasOwnProperty('dispatch_to')){
61+
if((data.contracts_for || data.proposal) && !data.passthrough.hasOwnProperty('dispatch_to')){
6262
data.passthrough.req_number = ++req_number;
6363
timeouts[req_number] = setTimeout(function(){
6464
if(typeof reloadPage === 'function' && data.contracts_for){

src/javascript/binary/websocket_pages/trade/event.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,6 @@ var TradingEvents = (function () {
367367
BinarySocket.send(params);
368368
Price.incrFormId();
369369
processForgetProposals();
370-
processForgetPriceStream();
371370
}
372371
};
373372

src/javascript/binary/websocket_pages/trade/message.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ var Message = (function () {
2222
page.client.set_storage_value('currencies', response.payout_currencies);
2323
displayCurrencies();
2424
Symbols.getSymbols(1);
25-
} else if (type === 'price_stream') {
26-
processPriceStream(response);
2725
} else if (type === 'proposal') {
2826
processProposal(response);
2927
} else if (type === 'buy') {

src/javascript/binary/websocket_pages/trade/price.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var Price = (function() {
1919

2020
var createProposal = function(typeOfContract) {
2121
var proposal = {
22-
price_stream: 1,
22+
proposal: 1,
2323
subscribe: 1
2424
};
2525
var underlying = document.getElementById('underlying'),
@@ -134,7 +134,7 @@ var Price = (function() {
134134
};
135135

136136
var display = function(details, contractType) {
137-
var proposal = details['proposal'] || details['price_stream'];
137+
var proposal = details['proposal'];
138138
var id = proposal ? proposal['id'] : '';
139139
var params = details['echo_req'];
140140

@@ -272,7 +272,7 @@ var Price = (function() {
272272
purchase.setAttribute('data-payout', proposal['payout']);
273273
purchase.setAttribute('data-symbol', id);
274274
for (var key in params) {
275-
if (key && key !== 'price_stream' && key !== 'proposal') {
275+
if (key && key !== 'proposal') {
276276
purchase.setAttribute('data-' + key, params[key]);
277277
}
278278
}

src/javascript/binary/websocket_pages/trade/process.js

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
var price_stream_ids = [];
21
/*
32
* This function process the active symbols to get markets
43
* and underlying list
@@ -93,7 +92,6 @@ function processContract(contracts) {
9392
'use strict';
9493
if(contracts.hasOwnProperty('error') && contracts.error.code === 'InvalidSymbol') {
9594
processForgetProposals();
96-
processForgetPriceStream();
9795
var container = document.getElementById('contract_confirmation_container'),
9896
message_container = document.getElementById('confirmation_message'),
9997
confirmation_error = document.getElementById('confirmation_error'),
@@ -246,7 +244,6 @@ function displaySpreads() {
246244

247245
function forgetTradingStreams() {
248246
processForgetProposals();
249-
processForgetPriceStream();
250247
processForgetTicks();
251248
}
252249
/*
@@ -261,18 +258,6 @@ function processForgetProposals() {
261258
Price.clearMapping();
262259
}
263260

264-
function processForgetPriceStream() {
265-
'use strict';
266-
showPriceOverlay();
267-
while(price_stream_ids && price_stream_ids.length > 0) {
268-
var id = price_stream_ids.pop();
269-
if(id && id.length > 0) {
270-
BinarySocket.send({"forget": id});
271-
}
272-
}
273-
Price.clearMapping();
274-
}
275-
276261
/*
277262
* Function to process and calculate price based on current form
278263
* parameters or change in form parameters
@@ -283,7 +268,6 @@ function processPriceRequest() {
283268
page.contents.tooltip.hide_tooltip();
284269
Price.incrFormId();
285270
processForgetProposals();
286-
processForgetPriceStream();
287271
showPriceOverlay();
288272
var types = Contract.contractType()[Contract.form()];
289273
if (Contract.form() === 'digits') {
@@ -361,19 +345,6 @@ function processProposal(response) {
361345
}
362346
}
363347

364-
function processPriceStream(response) {
365-
'use strict';
366-
var form_id = Price.getFormId();
367-
if (response.price_stream && response.price_stream.id && $.inArray(response.price_stream.id, price_stream_ids) < 0) {
368-
price_stream_ids.push(response.price_stream.id);
369-
}
370-
if((response.echo_req.passthrough && response.echo_req.passthrough.form_id===form_id) || response.error){
371-
hideOverlayContainer();
372-
Price.display(response, Contract.contractType()[Contract.form()]);
373-
hidePriceOverlay();
374-
}
375-
}
376-
377348
function processTradingTimesRequest(date) {
378349
var trading_times = Durations.trading_times();
379350
if (trading_times.hasOwnProperty(date)) {

0 commit comments

Comments
 (0)