Skip to content
This repository was archived by the owner on Nov 8, 2022. 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
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"validate": "validate.js#^0.10.0",
"ngCordova": "^0.1.27-alpha",
"ionic-native": "^2.0.3",
"lodash": "^4.17.10"
"lodash": "^4.17.13"
},
"resolutions": {
"angular": ">=1.2.0",
Expand Down
2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget android-versionCode="204040" id="com.binary.ticktrade" version="2.4.4" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget android-versionCode="204050" id="com.binary.ticktrade" version="2.4.5" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Tick Trade</name>
<description>
Enjoy fast-paced binary options trading with the Binary.com Tick Trade App. Trade Forex and more in seconds with our mobile application.
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@
"karma": "^2.0.2",
"karma-chrome-launcher": "^2.2.0",
"karma-jasmine": "^1.1.2",
"lodash": "^4.17.4",
"lodash": "^4.17.13",
"prettier-eslint-cli": "^4.1.1",
"shelljs": "^0.3.0",
"shelljs": "^0.8.3",
"sw-precache": "^5.2.1"
},
"cordovaPlugins": [
Expand Down
Binary file modified resources/android/icon/drawable-xhdpi-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/android/icon/drawable-xxhdpi-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/android/icon/drawable-xxxhdpi-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/foreground/foreground-hdpi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/foreground/foreground-mdpi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/foreground/foreground-xhdpi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/foreground/foreground-xxhdpi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/foreground/foreground-xxxhdpi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/icon-old.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/icon-transparent/drawable-hdpi-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/icon-transparent/drawable-ldpi-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/icon-transparent/drawable-mdpi-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/icon-transparent/drawable-xhdpi-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/icon-transparent/drawable-xxhdpi-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/icon-transparent/drawable-xxxhdpi-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 14 additions & 14 deletions www/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"get_token": "Come si ottiene un token?",
"signin_with_binary_com": "Entra",
"next": "Avanti",
"regulatory_information": "Informazioni regolamentari"
"regulatory_information": "Informazioni sulle normative"
},
"alert": {
"error": "Errore!",
Expand Down Expand Up @@ -88,16 +88,16 @@
"sign_out": "Esci"
},
"reality-check": {
"title": "Verifica della realtà",
"about": "Il trading in opzioni può sviluppare una vera e propria dipendenza così come qualsiasi altra attività spinta al limite. Per evitare i danni di tale dipendenza, ti forniamo la possibilità di controllare la situazione reale dei tuoi trade e dei tuoi account su base regolare.",
"title": "Verifica della situazione reale",
"about": "Il trading di opzioni può sviluppare una vera e propria dipendenza così come qualsiasi altra attività spinta al limite. Per evitare i danni di tale dipendenza, ti forniamo la possibilità di controllare la situazione reale attraverso un regolare riepilogo dei tuoi trade e dei tuoi conti.",
"login_time": "Orario di login:",
"current_time": "Orario attuale:",
"session_duration": "Durata della sessione:",
"interval_question": "Specifica il tuo intervallo preferito di verifica della realtà in minuti:",
"interval_question": "Specifica il tuo intervallo preferito di verifica della situazione reale in minuti:",
"loginid": "ID di accesso",
"currency": "Valuta",
"buy_amount": "Turnover",
"profit_loss": "Profitto/Perdita",
"profit_loss": "Profitto/perdita",
"buy_count": "Contratti acquistati",
"sell_count": "Contratti venduti",
"open_contract_count": "Apri contratti",
Expand Down Expand Up @@ -141,7 +141,7 @@
"place_of_birth": "Luogo di nascita",
"citizenship": "Cittadinanza",
"tax_residence": "Residenza fiscale",
"tax_identification_number": "Codice fiscale",
"tax_identification_number": "Identificazione fiscale",
"address_line_1": "Prima riga dell'indirizzo di residenza",
"address_line_2": "Seconda riga dell'indirizzo di residenza",
"address_city": "Città",
Expand Down Expand Up @@ -209,12 +209,12 @@
"secret_question": "Domanda segreta",
"secret_answer": "Risposta segreta",
"secret_answer_pattern_error": "Sono consentiti solo lettere, numeri, spazi, trattini, punti e apostrofi.",
"confirm_tax_info": "Con la presente confermo che le informazioni fiscali fornite sono veritiere e complete. Informerò inoltre Binary Investments (Europe) Ltd. su eventuali modifiche a queste informazioni.",
"multi_tax_residence_info": "Puoi essere considerato un residente fiscale in più di una giurisdizione. Ti chiediamo di consultare il tuo consulente fiscale e verificare che i dati fiscali siano corretti."
"confirm_tax_info": "Con la presente confermo che le informazioni fiscali fornite sono veritiere e complete. Informerò inoltre Binary Investments (Europe) Ltd. di eventuali modifiche a queste informazioni.",
"multi_tax_residence_info": "Puoi essere considerato un residente fiscale in più di una giurisdizione. Consulta il tuo consulente fiscale e verifica che i dati fiscali siano corretti."
},
"new-account-real": {
"real_account_opening": "Apertura di un account reale",
"details": "Dettagli",
"details": "Informazioni",
"address": "Indirizzo",
"security": "Sicurezza",
"salutation": "Titolo",
Expand All @@ -230,7 +230,7 @@
"address_state": "Stato/Provincia",
"address_postcode": "Codice postale/CAP",
"phone": "Telefono",
"open_account": "Apri un account",
"open_account": "Apri un conto",
"select": "Seleziona",
"secret_question": "Domanda segreta",
"secret_answer": "Risposta segreta",
Expand All @@ -241,14 +241,14 @@
"general_pattern_error": "Sono consentite solo lettere, spazi, trattini, punti e apostrofi.",
"length_range_error": "Questo campo deve contenere da {{min}} a {{max}} caratteri.",
"maxlength_error": "Questo campo può contenere al massimo {{max}} caratteri.",
"address_pattern_error": "Sono consentiti solo lettere, numeri, spazi, trattini, e questi caratteri speciali: - . ' # ; : ( ) , @ /",
"address_pattern_error": "Sono consentiti solo lettere, numeri, spazi, trattini e i seguenti caratteri speciali: - . ' # ; : ( ) , @ /",
"postcode_pattern_error": "Sono consentiti solo lettere, numeri e trattini.",
"phone_pattern_error": "Sono consentiti solo numeri, spazi e trattini.",
"secret_answer_pattern_error": "Sono consentiti solo lettere, numeri, spazi, trattini, punti e apostrofi.",
"required": "Questo campo è obbligatorio.",
"not_pep_verify": "Dichiaro di non essere una persona politicamente esposta (PEP)",
"pep_info": "Un PEP è un individuo che è o che è stato incaricato di un'importante funzione pubblica. Questo status si estende ai parenti e stretti collaboratori del PEP.",
"account_opening_reason": "Motivo dell'apertura dell'account",
"pep_info": "Un PEP è un individuo che è o è stato incaricato di un'importante funzione pubblica. Questo status si estende ai parenti e stretti collaboratori del suddetto PEP.",
"account_opening_reason": "Ragione dell'apertura del conto",
"what_is_this": "Cos'è questo?"
},
"profit-table": {
Expand All @@ -259,7 +259,7 @@
"jump_to_date": "Vai alla data",
"date": "Data",
"ref": "Riferimento",
"profit_loss": "Profitto/Perdita",
"profit_loss": "Profitto/perdita",
"no_transaction": "Non esiste alcuna transazione da mostrare.",
"go": "Vai"
},
Expand Down
2 changes: 1 addition & 1 deletion www/js/config.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"2.4.4"}
{"version":"2.4.5"}
21 changes: 0 additions & 21 deletions www/js/pages/trade/components/chart/chart.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,6 @@
chartService.destroy();
});

$scope.$on("portfolio", (e, portfolio) => {
const contractId = vm.purchasedContract.contractId;

if ((typeof contractId === "string" && !_.isEmpty(contractId)) || contractId) {
portfolio.contracts.forEach(contract => {
if ((typeof contractId === "string" && contract.contract_id.toString() === contractId) || contract.contract_id === contractId) {
chartService.addContract({
startTime: contract.date_start + 1,
duration : parseInt(vm.proposal.duration),
type :
vm.proposal.tradeType === "Higher/Lower"
? `${contract.contract_type}HL`
: contract.contract_type,
selectedTick: vm.proposal.tradeType === "High/Low Ticks" ? vm.proposal.selected_tick : null,
barrier : vm.proposal.barrier
});
}
});
}
});

$scope.$on("tick", (e, feed) => {
if (feed && feed.echo_req.ticks_history === vm.proposal.symbol) {
chartService.historyInterface.addTick(feed.tick);
Expand Down
35 changes: 26 additions & 9 deletions www/js/pages/trade/components/purchase/purchase.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"appStateService",
"proposalService",
"websocketService",
"chartService",
"$ionicLoading"
];

Expand All @@ -27,6 +28,7 @@
appStateService,
proposalService,
websocketService,
chartService,
$ionicLoading) {
const vm = this;
let forgetRequestId = 0;
Expand All @@ -39,6 +41,7 @@
vm.purchasedContractIndex = -1;
vm.currencyType = "fiat";
vm.isContractFinished = false;
vm.contractType = '';

$scope.$watch(
() => vm.proposal,
Expand Down Expand Up @@ -97,21 +100,32 @@
});

$scope.$on("purchase", (e, response) => {
const purchaseInfo = response.buy;

if (!_.isEmpty(response.buy)) {
vm.showSummary = true;
$scope.$applyAsync(() => {
vm.purchasedContract = {
contractId : response.buy.contract_id,
longcode : response.buy.longcode,
contractId : purchaseInfo.contract_id,
longcode : purchaseInfo.longcode,
payout : vm.proposalResponses[vm.purchasedContractIndex].payout,
cost : response.buy.buy_price,
balance : response.buy.balance_after,
transactionId: response.buy.transaction_id,
cost : purchaseInfo.buy_price,
balance : purchaseInfo.balance_after,
transactionId: purchaseInfo.transaction_id,
profit : parseFloat(vm.proposalResponses[vm.purchasedContractIndex].payout) -
parseFloat(response.buy.buy_price),
parseFloat(purchaseInfo.buy_price),
};
});
websocketService.sendRequestFor.portfolio();
chartService.addContract({
startTime: purchaseInfo.start_time + 1,
duration : parseInt(vm.proposal.duration),
type :
vm.proposal.tradeType === "Higher/Lower"
? `${vm.contractType}HL`
: vm.contractType,
selectedTick: vm.proposal.tradeType === "High/Low Ticks" ? vm.proposal.selected_tick : null,
barrier : vm.proposal.barrier
});
}
});

Expand Down Expand Up @@ -149,7 +163,7 @@
proposal.underlying_symbol,
vm.purchasedContract.payout
);

vm.isContractFinished = true;
sendProposal();
}
Expand Down Expand Up @@ -186,14 +200,17 @@
return `img/trade-icon/${contractType.toLowerCase()}.svg`;
};

vm.purchase = function (contractIndex) {
vm.purchase = function (contractIndex, contract_type) {
$scope.$applyAsync(() => {
vm.isContractFinished = false;
vm.inPurchaseMode = true;
vm.purchasedContractIndex = contractIndex;
appStateService.purchaseMode = true;
appStateService.tradeMode = false;
});
if (contract_type) {
vm.contractType = contract_type;
}
proposalService.purchase(vm.proposalResponses[contractIndex]);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</div>
<div class="row" ng-if="!vm.proposalResponses[$index].hasError">
<div class="col center">
<button class="button button-positive" ng-click="vm.purchase($index)"
<button class="button button-positive" ng-click="vm.purchase($index, contract.contract_type)"
ng-disabled="vm.inPurchaseMode || vm.proposalResponses[$index].isReceiving || vm.proposalResponses.length == 0"
disabled>
{{ "trade.buy" | translate}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ <h1 class="reference">
<li class="statement-element last-statement-element right">{{vm.contract.barrier}}</li>
</ul>
</li>
<li class="list" ng-if="vm.contract.payout">
<li class="list" ng-if="vm.contract.payout != null">
<ul class="statement-list">
<li class="statement-element">{{'transaction-details.payout' | translate}}</li>
<li class="statement-element last-statement-element right"
ng-bind="vm.contract.payout | currency : vm.currency : 2"></li>
</ul>
</li>
<li class="list" ng-if="vm.contract.buy_price">
<li class="list" ng-if="vm.contract.buy_price != null">
<ul class="statement-list">
<li class="statement-element">{{'transaction-details.buy_price' | translate}}</li>
<li class="statement-element last-statement-element right"
Expand All @@ -103,14 +103,14 @@ <h1 class="reference">
</li>
</ul>
</li>
<li class="list" ng-if="vm.contract.sell_price">
<li class="list" ng-if="vm.contract.sell_price != null">
<ul class="statement-list">
<li class="statement-element">{{'transaction-details.sell_price' | translate}}</li>
<li class="statement-element last-statement-element right"
ng-bind="vm.contract.sell_price | currency : vm.currency : 2"></li>
</ul>
</li>
<li class="list" ng-if="vm.contract.sell_price && vm.contract.buy_price">
<li class="list" ng-if="vm.contract.sell_price != null && vm.contract.buy_price != null">
<ul class="statement-list">
<li class="statement-element">{{'transaction-details.profit_loss' | translate}}</li>
<li class="statement-element last-statement-element right green"
Expand Down
1 change: 1 addition & 0 deletions www/js/share/services/app-state.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ angular.module("binary").factory("appStateService", () => {
factory.upgradeableLandingCompanies = [];
factory.loginFinished = false;
factory.isMaltainvest = false;
factory.authorizeToken = "";

return factory;
});
12 changes: 7 additions & 5 deletions www/js/share/services/chart.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ angular.module("binary").factory("chartService", $rootScope => {
},
average: function average(list) {
const decimalPointLength = utils.fractionalLength(list[0]) + 1;
return parseFloat(list.reduce((a, b) => a + b, 0) / list.length).toFixed(decimalPointLength);
return parseFloat(list.reduce((a, b) => (+a) + (+b), 0) / list.length).toFixed(decimalPointLength);
},
conditions: {
CALL: function condition(barrier, price) {
Expand All @@ -128,10 +128,10 @@ angular.module("binary").factory("chartService", $rootScope => {
return parseFloat(price) < parseFloat(barrier);
},
DIGITMATCH: function condition(barrier, price) {
return utils.lastDigit(barrier) === utils.lastDigit(price);
return utils.lastDigit(parseInt(barrier)) === utils.lastDigit(price);
},
DIGITDIFF: function condition(barrier, price) {
return utils.lastDigit(barrier) !== utils.lastDigit(price);
return utils.lastDigit(parseInt(barrier)) !== utils.lastDigit(price);
},
DIGITEVEN: function condition(barrier, price) {
return utils.lastDigit(price) % 2 === 0;
Expand Down Expand Up @@ -451,7 +451,8 @@ angular.module("binary").factory("chartService", $rootScope => {
if (utils.higherLowerTrade(contract)) {
contract.offset = contract.offset || contract.barrier;
barrier = Number(tickPrice) + Number(contract.offset);
barrier = barrier.toFixed(utils.fractionalLength(tickPrice));
barrier = utils.digitTrade(contract) ?
contract.barrier : barrier.toFixed(utils.fractionalLength(tickPrice));
}
utils.setObjValue(contract, "barrier", barrier, !utils.digitTrade(contract));
utils.setObjValue(contract, "entrySpotPrice", tickPrice, true);
Expand Down Expand Up @@ -511,7 +512,8 @@ angular.module("binary").factory("chartService", $rootScope => {
if (tickPriceList.length === 0) {
if (contract.entrySpotTime !== lastTime && betweenExistingSpots(lastTime)) {
const entrySpotPrice = parseFloat(contract.entrySpotPrice).toFixed(fractionalLength);
const barrier = parseFloat(contract.barrier).toFixed(fractionalLength);
const barrier = utils.digitTrade(contract) ?
contract.barrier : parseFloat(contract.barrier).toFixed(fractionalLength);
tickPriceList.push(entrySpotPrice);

if (utils.conditions[contract.type](barrier, entrySpotPrice,
Expand Down
8 changes: 8 additions & 0 deletions www/js/share/services/websocket.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,11 @@ angular

const websocketService = {};
websocketService.authenticate = function(_token, extraParams) {
if (_token && _token !== "<not shown>") {
appStateService.authorizeToken = _token;
} else {
_token = appStateService.authorizeToken;
}
extraParams = null || extraParams;
appStateService.isLoggedin = false;

Expand All @@ -217,6 +222,7 @@ angular
appStateService.isChangedAccount = false;
appStateService.isPopupOpen = false;
appStateService.isLoggedin = false;
appStateService.authorizeToken = '';
sessionStorage.removeItem("start");
sessionStorage.removeItem("_interval");
sessionStorage.removeItem("realityCheckStart");
Expand Down Expand Up @@ -332,6 +338,7 @@ angular
buy : _proposalId,
price: price || 0
};

sendMessage(data);
},
balance() {
Expand Down Expand Up @@ -587,6 +594,7 @@ angular
switch (messageType) {
case "authorize":
if (message.authorize) {
message.echo_req.authorize = appStateService.authorizeToken;
message.authorize.token = message.echo_req.authorize;
window._trackJs.userId = message.authorize.loginid;
appStateService.isLoggedin = true;
Expand Down