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
4 changes: 2 additions & 2 deletions src/javascript/binary/pages/trade/price.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ var Price = (function () {
};

var display = function (details, contractType) {
var proposal = details['proposal'],
params = details['echo_req'],
var proposal = details['proposal'] || details['error'];
var params = details['echo_req'],
type = params['contract_type'] || typeDisplayIdMapping[proposal['id']],
h4 = document.createElement('h4'),
row = document.createElement('div'),
Expand Down
4 changes: 2 additions & 2 deletions src/javascript/binary/pages/trade/purchase.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ var Purchase = (function () {

h4.setAttribute('class', 'contract_purchase_heading');

if (receipt['error']) {
content = document.createTextNode(receipt['error']['message']);
if (details['error']) {
content = document.createTextNode(details['error']['message']);
message.appendChild(content);
fragment.appendChild(message);
} else {
Expand Down
10 changes: 5 additions & 5 deletions src/javascript/binary/pages/trade/tick.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ var Tick = (function () {
errorMessage = '';

var details = function (data) {
var tick = data['tick'] || '';
errorMessage = '';
var errorMessage = '';

if (tick) {
if (tick['error']) {
errorMessage = tick['error']['message'];
if (data) {
if (data['error']) {
errorMessage = data['error']['message'];
} else {
var tick = data['tick'];
quote = tick['quote'];
id = tick['id'];
epoch = tick['epoch'];
Expand Down
33 changes: 17 additions & 16 deletions src/sass/trade/trade.scss
Original file line number Diff line number Diff line change
Expand Up @@ -112,62 +112,63 @@ ul[role=segmented] {
border: 1px solid $COLOR_GRAY;
}
#contract_prices_container {
margin-left: 1em;
margin-left: 1rem;
position: relative;
.price_container {
border: 1px solid $COLOR_GRAY;
&#price_container_top {
margin-bottom: 15px;
margin-bottom: 1rem;
}
.contract_purchase {
margin-bottom: 5px;
padding-left: 6px;
}
}
.description_container {
.contract_heading {
text-transform: capitalize;
padding: .7em 0 .7em 4em;
&.asian_up {
background: url("../images/pages/trade/asian-u_1.svg") no-repeat 5% 75%;
background: url("../images/pages/trade/asian-u_1.svg") no-repeat 2% 75%;
}
&.asian_down {
background: url("../images/pages/trade/asian-d_1.svg") no-repeat 5% 75%;
background: url("../images/pages/trade/asian-d_1.svg") no-repeat 2% 75%;
}
&.differs {
background: url("../images/pages/trade/differs_1.svg") no-repeat 5% 75%;
background: url("../images/pages/trade/differs_1.svg") no-repeat 2% 75%;
}
&.matches {
background: url("../images/pages/trade/matches_1.svg") no-repeat 5% 75%;
background: url("../images/pages/trade/matches_1.svg") no-repeat 2% 75%;
}
&.rises {
background: url("../images/pages/trade/rise_1.png") no-repeat 5% 75%;
background: url("../images/pages/trade/rise_1.png") no-repeat 2% 75%;
}
&.falls {
background: url("../images/pages/trade/fall_1.png") no-repeat 5% 75%;
background: url("../images/pages/trade/fall_1.png") no-repeat 2% 75%;
}
&.higher {
background: url("../images/pages/trade/higher_1.png") no-repeat 5% 75%;
background: url("../images/pages/trade/higher_1.png") no-repeat 2% 75%;
}
&.lower {
background: url("../images/pages/trade/lower_1.png") no-repeat 5% 75%;
background: url("../images/pages/trade/lower_1.png") no-repeat 2% 75%;
}
&.touches {
background: url("../images/pages/trade/touch_1.png") no-repeat 5% 75%;
background: url("../images/pages/trade/touch_1.png") no-repeat 2% 75%;
}
&.does_not_touch {
background: url("../images/pages/trade/no-touch_1.png") no-repeat 5% 75%;
background: url("../images/pages/trade/no-touch_1.png") no-repeat 2% 75%;
}
&.stays_between {
background: url("../images/pages/trade/stay-in-between_1.png") no-repeat 5% 75%;
background: url("../images/pages/trade/stay-in-between_1.png") no-repeat 2% 75%;
}
&.goes_outside {
background: url("../images/pages/trade/stay-out_1.png") no-repeat 5% 75%;
background: url("../images/pages/trade/stay-out_1.png") no-repeat 2% 75%;
}
&.ends_between {
background: url("../images/pages/trade/ends-between_1.png") no-repeat 5% 75%;
background: url("../images/pages/trade/ends-between_1.png") no-repeat 2% 75%;
}
&.ends_outside {
background: url("../images/pages/trade/ends-outside_1.png") no-repeat 5% 75%;
background: url("../images/pages/trade/ends-outside_1.png") no-repeat 2% 75%;
}
}
.contract_amount, .contract_description {
Expand Down
4 changes: 2 additions & 2 deletions src/templates/toolkit/bet/static.html.tt
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
<div class="col price_container" id="price_container_top">
<div class="description_container" id="description_container_top">
</div>
<div class="contract_purchase center-aligned" id="contract_purchase_top">
<div class="contract_purchase" id="contract_purchase_top">
<span class="button">
<button class="purchase_button" id="purchase_button_top" value="purchase">Purchase</button>
</span>
Expand All @@ -132,7 +132,7 @@
<div class="col price_container" id="price_container_bottom">
<div class="description_container" id="description_container_bottom">
</div>
<div class="contract_purchase center-aligned" id="contract_purchase_bottom">
<div class="contract_purchase" id="contract_purchase_bottom">
<span class="button">
<button class="purchase_button" id="purchase_button_bottom" value="purchase">Purchase</button>
</span>
Expand Down