diff --git a/packages/bot-skeleton/package.json b/packages/bot-skeleton/package.json index b19bf02aea06..96becac19d3c 100644 --- a/packages/bot-skeleton/package.json +++ b/packages/bot-skeleton/package.json @@ -46,8 +46,6 @@ "immutable": "^3.8.2", "localforage": "^1.9.0", "lz-string": "^1.4.4", - "mobx": "^6.6.1", - "mobx-react": "^7.5.1", "redux": "^4.0.1", "redux-thunk": "^2.2.0", "scratch-blocks": "0.1.0-prerelease.20200917235131", diff --git a/packages/bot-skeleton/src/scratch/dbot-store.js b/packages/bot-skeleton/src/scratch/dbot-store.js index fb7333342df2..1d951ec9ebc2 100644 --- a/packages/bot-skeleton/src/scratch/dbot-store.js +++ b/packages/bot-skeleton/src/scratch/dbot-store.js @@ -1,6 +1,3 @@ -import { reaction } from 'mobx'; -import { api_base } from '../services/api/api-base'; - class DBotStoreInterface { // TODO here we are suppose to define an interface and implement fields of DBotStore. handleFileChange = () => { @@ -30,11 +27,6 @@ class DBotStore extends DBotStoreInterface { this.handleFileChange = store.handleFileChange; this.startLoading = store.startLoading; this.endLoading = store.endLoading; - - reaction( - () => this.client.loginid, - () => api_base.createNewInstance(this.client.loginid) - ); } static setInstance(store) { diff --git a/packages/bot-skeleton/src/scratch/dbot.js b/packages/bot-skeleton/src/scratch/dbot.js index 4df1e4afb380..adee21e1bab2 100644 --- a/packages/bot-skeleton/src/scratch/dbot.js +++ b/packages/bot-skeleton/src/scratch/dbot.js @@ -10,7 +10,6 @@ import { observer as globalObserver } from '../utils/observer'; import ApiHelpers from '../services/api/api-helpers'; import Interpreter from '../services/tradeEngine/utils/interpreter'; import { setColors } from './hooks/colours'; -import { api_base } from '../services/api/api-base'; class DBot { constructor() { @@ -98,7 +97,7 @@ class DBot { window.dispatchEvent(new Event('resize')); window.addEventListener('dragover', DBot.handleDragOver); window.addEventListener('drop', e => DBot.handleDropOver(e, handleFileChange)); - api_base.init(); + // disable overflow el_scratch_div.parentNode.style.overflow = 'hidden'; resolve(); @@ -135,7 +134,7 @@ class DBot { } this.interpreter = Interpreter(); - api_base.setIsRunning(true); + this.interpreter.run(code).catch(error => { globalObserver.emit('Error', error); this.stopBot(); @@ -227,7 +226,6 @@ class DBot { * that trade will be completed first to reflect correct contract status in UI. */ stopBot() { - api_base.setIsRunning(false); if (this.interpreter) { this.interpreter.stop(); } @@ -243,10 +241,6 @@ class DBot { } } - terminateConnection = () => { - api_base.terminate(); - }; - /** * Unselects any selected block before running the bot. */ diff --git a/packages/bot-skeleton/src/services/api/api-base.js b/packages/bot-skeleton/src/services/api/api-base.js deleted file mode 100644 index 5fa052992ced..000000000000 --- a/packages/bot-skeleton/src/services/api/api-base.js +++ /dev/null @@ -1,123 +0,0 @@ -import { observer as globalObserver } from '../../utils/observer'; -import { generateDerivApiInstance, getLoginId, getToken } from './appId'; - -class APIBase { - api; - token; - account_id; - pip_sizes = {}; - account_info = {}; - is_running = false; - subscriptions = []; - time_interval = null; - - init(force_update = false) { - if (getLoginId()) { - this.toggleRunButton(true); - if (force_update) this.terminate(); - this.api = generateDerivApiInstance(); - this.initEventListeners(); - this.authorizeAndSubscribe(); - if (this.time_interval) clearInterval(this.time_interval); - this.time_interval = null; - this.getTime(); - } - } - - terminate() { - // eslint-disable-next-line no-console - console.log('connection terminated'); - if (this.api) this.api.disconnect(); - } - - initEventListeners() { - if (window) { - window.addEventListener('online', this.reconnectIfNotConnected); - window.addEventListener('focus', this.reconnectIfNotConnected); - } - } - - createNewInstance(account_id) { - if (this.account_id !== account_id) { - this.init(true); - } - } - - reconnectIfNotConnected = () => { - // eslint-disable-next-line no-console - console.log('connection state: ', this.api.connection.readyState); - if (this.api.connection.readyState !== 1) { - // eslint-disable-next-line no-console - console.log('Info: Connection to the server was closed, trying to reconnect.'); - this.init(); - } - }; - - authorizeAndSubscribe() { - const { token, account_id } = getToken(); - if (token) { - this.token = token; - this.account_id = account_id; - this.getActiveSymbols(); - this.api - .authorize(this.token) - .then(({ authorize }) => { - this.subscribe(); - this.account_info = authorize; - }) - .catch(e => { - globalObserver.emit('Error', e); - }); - } - } - - subscribe() { - this.api.send({ balance: 1, subscribe: 1 }).catch(e => { - globalObserver.emit('Error', e); - }); - this.api.send({ transaction: 1, subscribe: 1 }).catch(e => { - globalObserver.emit('Error', e); - }); - } - - getActiveSymbols = async () => { - const { active_symbols = [] } = await this.api.send({ active_symbols: 'brief' }).catch(e => { - globalObserver.emit('Error', e); - }); - const pip_sizes = {}; - active_symbols.forEach(({ symbol, pip }) => { - pip_sizes[symbol] = +(+pip).toExponential().substring(3); - }); - this.pip_sizes = pip_sizes; - this.toggleRunButton(false); - }; - - toggleRunButton = toggle => { - const run_button = document.querySelector('#db-animation__run-button'); - if (!run_button) return; - run_button.disabled = toggle; - }; - - setIsRunning(toggle = false) { - this.is_running = toggle; - } - - pushSubscription(subscription) { - this.subscriptions.push(subscription); - } - - clearSubscriptions() { - this.subscriptions.forEach(s => s.unsubscribe()); - this.subscriptions = []; - } - - getTime() { - if (!this.time_interval) { - this.time_interval = setInterval(() => { - this.api.send({ time: 1 }); - }, 30000); - } - } -} - -export const api_base = new APIBase(); diff --git a/packages/bot-skeleton/src/services/api/appId.js b/packages/bot-skeleton/src/services/api/appId.js index e56a9931fbea..ed7417a9d34d 100644 --- a/packages/bot-skeleton/src/services/api/appId.js +++ b/packages/bot-skeleton/src/services/api/appId.js @@ -10,19 +10,3 @@ export const generateDerivApiInstance = () => { }); return deriv_api; }; - -export const getLoginId = () => { - const login_id = localStorage.getItem('active_loginid'); - if (login_id && login_id !== 'null') return login_id; - return null; -}; - -export const getToken = () => { - const active_loginid = getLoginId(); - const client_accounts = JSON.parse(localStorage.getItem('client.accounts')) || undefined; - const active_account = (client_accounts && client_accounts[active_loginid]) || {}; - return { - token: active_account?.token || undefined, - account_id: active_loginid || undefined, - }; -}; diff --git a/packages/bot-skeleton/src/services/api/ticks_service.js b/packages/bot-skeleton/src/services/api/ticks_service.js index 3ca6c3e687bc..2eaf3e8a50ce 100644 --- a/packages/bot-skeleton/src/services/api/ticks_service.js +++ b/packages/bot-skeleton/src/services/api/ticks_service.js @@ -2,7 +2,6 @@ import { Map } from 'immutable'; import { historyToTicks, getLast } from 'binary-utils'; import { doUntilDone, getUUID } from '../tradeEngine/utils/helpers'; import { observer as globalObserver } from '../../utils/observer'; -import { api_base } from './api-base'; const parseTick = tick => ({ epoch: +tick.epoch, @@ -40,7 +39,8 @@ const updateCandles = (candles, ohlc) => { const getType = isCandle => (isCandle ? 'candles' : 'ticks'); export default class TicksService { - constructor() { + constructor(api) { + this.api = api; this.ticks = new Map(); this.candles = new Map(); this.tickListeners = new Map(); @@ -60,13 +60,23 @@ export default class TicksService { if (!this.active_symbols_promise) { this.active_symbols_promise = new Promise(resolve => { - this.pipSizes = api_base.pip_sizes; - resolve(this.pipSizes); + this.getActiveSymbols().then(active_symbols => { + this.pipSizes = active_symbols + .reduce((s, i) => s.set(i.symbol, +(+i.pip).toExponential().substring(3)), new Map()) + .toObject(); + resolve(this.pipSizes); + }); }); } return this.active_symbols_promise; } + getActiveSymbols = async () => { + await this.api.expectResponse('authorize'); + const active_symbols = await this.api.send({ active_symbols: 'brief' }); + return active_symbols.active_symbols; + }; + request(options) { const { symbol, granularity } = options; @@ -79,6 +89,7 @@ export default class TicksService { if (style === 'candles' && this.candles.hasIn([symbol, Number(granularity)])) { return Promise.resolve(this.candles.getIn([symbol, Number(granularity)])); } + return this.requestStream({ ...options, style }); } @@ -152,7 +163,7 @@ export default class TicksService { ...(tickSubscription || []), ]; - Promise.all(subscription.map(id => doUntilDone(() => api_base.api.forget(id)))); + Promise.all(subscription.map(id => doUntilDone(() => this.api.forget(id)))); this.subscriptions = new Map(); } @@ -184,7 +195,7 @@ export default class TicksService { } observe() { - api_base.api.onMessage().subscribe(({ data }) => { + this.api.onMessage().subscribe(({ data }) => { if (data.msg_type === 'tick') { const { tick } = data; const { symbol, id } = tick; @@ -249,7 +260,7 @@ export default class TicksService { style, }; return new Promise((resolve, reject) => { - doUntilDone(() => api_base.api.send(request_object), [], api_base) + doUntilDone(() => this.api.send(request_object)) .then(r => { if (style === 'ticks') { const ticks = historyToTicks(r.history); @@ -267,27 +278,4 @@ export default class TicksService { .catch(reject); }); } - - forget = subscription_id => { - if (subscription_id) { - api_base.api.forget(subscription_id); - } - }; - - unsubscribeFromTicksService() { - if (this.ticks_history_promise) { - const { stringified_options } = this.ticks_history_promise; - const { symbol = '' } = JSON.parse(stringified_options); - if (symbol) { - this.forget(this.subscriptions.getIn(['tick', symbol])); - } - } - if (this.candles_promise) { - const { stringified_options } = this.candles_promise; - const { symbol = '' } = JSON.parse(stringified_options); - if (symbol) { - this.forget(this.subscriptions.getIn(['candle', symbol])); - } - } - } } diff --git a/packages/bot-skeleton/src/services/tradeEngine/trade/Balance.js b/packages/bot-skeleton/src/services/tradeEngine/trade/Balance.js index 03a01578c671..19f3aad85318 100644 --- a/packages/bot-skeleton/src/services/tradeEngine/trade/Balance.js +++ b/packages/bot-skeleton/src/services/tradeEngine/trade/Balance.js @@ -1,14 +1,13 @@ import { getFormattedText } from '@deriv/shared'; import { info } from '../utils/broadcast'; import DBotStore from '../../../scratch/dbot-store'; -import { api_base } from '../../api/api-base'; let balance_string = ''; export default Engine => class Balance extends Engine { observeBalance() { - const subscription = api_base.api.onMessage().subscribe(({ data }) => { + this.api.onMessage().subscribe(({ data }) => { if (data.msg_type === 'balance') { const { balance: { balance: b, currency }, @@ -19,7 +18,6 @@ export default Engine => info({ accountID: this.accountInfo.loginid, balance: balance_string }); } }); - api_base.pushSubscription(subscription); } // eslint-disable-next-line class-methods-use-this diff --git a/packages/bot-skeleton/src/services/tradeEngine/trade/OpenContract.js b/packages/bot-skeleton/src/services/tradeEngine/trade/OpenContract.js index 6b007c29e7f6..52c610a5f0a0 100644 --- a/packages/bot-skeleton/src/services/tradeEngine/trade/OpenContract.js +++ b/packages/bot-skeleton/src/services/tradeEngine/trade/OpenContract.js @@ -3,12 +3,11 @@ import { sell, openContractReceived } from './state/actions'; import { contractStatus, contract as broadcastContract } from '../utils/broadcast'; import { doUntilDone } from '../utils/helpers'; import DBotStore from '../../../scratch/dbot-store'; -import { api_base } from '../../api/api-base'; export default Engine => class OpenContract extends Engine { observeOpenContract() { - const subscription = api_base.api.onMessage().subscribe(({ data }) => { + this.api.onMessage().subscribe(({ data }) => { if (data.msg_type === 'proposal_open_contract') { const contract = data.proposal_open_contract; @@ -42,7 +41,6 @@ export default Engine => } } }); - api_base.pushSubscription(subscription); } waitForAfter() { @@ -53,13 +51,7 @@ export default Engine => subscribeToOpenContract(contract_id = this.contractId) { this.contractId = contract_id; - const request_object = { - proposal_open_contract: 1, - contract_id, - subscribe: 1, - }; - - doUntilDone(() => api_base.api.send(request_object)) + doUntilDone(() => this.api.send({ proposal_open_contract: 1, contract_id, subscribe: 1 })) .then(data => { const { populateConfig } = DBotStore.instance; populateConfig(data.proposal_open_contract); @@ -67,7 +59,7 @@ export default Engine => }) .catch(error => { if (error.error.code !== 'AlreadySubscribed') { - doUntilDone(() => api_base.api.send(request_object)).then( + doUntilDone(() => this.api.send({ proposal_open_contract: 1, contract_id, subscribe: 1 })).then( response => (this.openContractId = response.proposal_open_contract.id) ); } diff --git a/packages/bot-skeleton/src/services/tradeEngine/trade/Proposal.js b/packages/bot-skeleton/src/services/tradeEngine/trade/Proposal.js index 515d40b9421a..17e7914b298a 100644 --- a/packages/bot-skeleton/src/services/tradeEngine/trade/Proposal.js +++ b/packages/bot-skeleton/src/services/tradeEngine/trade/Proposal.js @@ -1,7 +1,6 @@ import { localize } from '@deriv/translations'; import { proposalsReady, clearProposals } from './state/actions'; import { tradeOptionToProposal, doUntilDone } from '../utils/helpers'; -import { api_base } from '../../api/api-base'; export default Engine => class Proposal extends Engine { @@ -70,7 +69,7 @@ export default Engine => Promise.all( this.proposal_templates.map(proposal => { - doUntilDone(() => api_base.api.send(proposal)).catch(error => { + doUntilDone(() => this.api.send(proposal)).catch(error => { // We intercept ContractBuyValidationError as user may have specified // e.g. a DIGITUNDER 0 or DIGITOVER 9, while one proposal may be invalid // the other is valid. We will error on Purchase rather than here. @@ -95,7 +94,7 @@ export default Engine => } observeProposals() { - const subscription = api_base.api.onMessage().subscribe(response => { + this.api.onMessage().subscribe(response => { if (response.data.msg_type === 'proposal') { const { passthrough, proposal } = response.data; if ( @@ -109,7 +108,6 @@ export default Engine => } } }); - api_base.pushSubscription(subscription); } unsubscribeProposals() { @@ -130,7 +128,7 @@ export default Engine => return Promise.resolve(); } - return doUntilDone(() => api_base.api.forget(proposal.id)).then(() => { + return doUntilDone(() => this.api.forget(proposal.id)).then(() => { removeForgetProposalById(proposal.id); }); }) diff --git a/packages/bot-skeleton/src/services/tradeEngine/trade/Purchase.js b/packages/bot-skeleton/src/services/tradeEngine/trade/Purchase.js index cd3730f840eb..800c54201f93 100644 --- a/packages/bot-skeleton/src/services/tradeEngine/trade/Purchase.js +++ b/packages/bot-skeleton/src/services/tradeEngine/trade/Purchase.js @@ -3,7 +3,6 @@ import { BEFORE_PURCHASE } from './state/constants'; import { contractStatus, info, log } from '../utils/broadcast'; import { getUUID, recoverFromError, doUntilDone } from '../utils/helpers'; import { log_types } from '../../../constants/messages'; -import { api_base } from '../../api/api-base'; let delayIndex = 0; let purchase_reference; @@ -42,7 +41,7 @@ export default Engine => buy_price: buy.buy_price, }); }; - const action = () => api_base.api.send({ buy: id, price: askPrice }); + const action = () => this.api.send({ buy: id, price: askPrice }); this.isSold = false; contractStatus({ id: 'contract.purchase_sent', diff --git a/packages/bot-skeleton/src/services/tradeEngine/trade/Sell.js b/packages/bot-skeleton/src/services/tradeEngine/trade/Sell.js index d2dc6bb7a3dc..203cb9d6bdee 100644 --- a/packages/bot-skeleton/src/services/tradeEngine/trade/Sell.js +++ b/packages/bot-skeleton/src/services/tradeEngine/trade/Sell.js @@ -3,7 +3,6 @@ import { contractStatus, log } from '../utils/broadcast'; import { recoverFromError, doUntilDone } from '../utils/helpers'; import { log_types } from '../../../constants/messages'; import { observer as globalObserver } from '../../../utils/observer'; -import { api_base } from '../../api/api-base'; export default Engine => class Sell extends Engine { @@ -43,9 +42,9 @@ export default Engine => const contract_id = this.contractId; const sellContractAndGetContractInfo = () => { - return doUntilDone(() => api_base.api.send({ sell: contract_id, price: 0 })) + return doUntilDone(() => this.api.send({ sell: contract_id, price: 0 })) .then(sell_response => { - doUntilDone(() => api_base.api.send({ proposal_open_contract: 1, contract_id })).then( + doUntilDone(() => this.api.send({ proposal_open_contract: 1, contract_id })).then( () => sell_response ); }) @@ -71,7 +70,7 @@ export default Engine => // For every other error, check whether the contract is not actually already sold. return doUntilDone(() => - api_base.api.send({ + this.api.send({ proposal_open_contract: 1, contract_id, }) diff --git a/packages/bot-skeleton/src/services/tradeEngine/trade/index.js b/packages/bot-skeleton/src/services/tradeEngine/trade/index.js index a165ea37f8dc..145bfcf67219 100644 --- a/packages/bot-skeleton/src/services/tradeEngine/trade/index.js +++ b/packages/bot-skeleton/src/services/tradeEngine/trade/index.js @@ -15,7 +15,6 @@ import { doUntilDone } from '../utils/helpers'; import { expectInitArg } from '../utils/sanitize'; import { createError } from '../../../utils/error'; import { observer as globalObserver } from '../../../utils/observer'; -import { api_base } from '../../api/api-base'; const watchBefore = store => watchScope({ @@ -65,6 +64,7 @@ const watchScope = ({ store, stopScope, passScope, passFlag }) => { export default class TradeEngine extends Balance(Purchase(Sell(OpenContract(Proposal(Ticks(Total(class {}))))))) { constructor($scope) { super(); + this.api = $scope.api; this.observer = $scope.observer; this.$scope = $scope; this.observe(); @@ -106,13 +106,17 @@ export default class TradeEngine extends Balance(Purchase(Sell(OpenContract(Prop if (this.token === token) { return Promise.resolve(); } + + doUntilDone(() => this.api.authorize(token)).catch(e => { + this.$scope.observer.emit('Error', e); + }); return new Promise(resolve => { // Try to recover from a situation where API doesn't give us a correct response on // "proposal_open_contract" which would make the bot run forever. When there's a "sell" // event, wait a couple seconds for the API to give us the correct "proposal_open_contract" // response, if there's none after x seconds. Send an explicit request, which _should_ // solve the issue. This is a backup! - api_base.api.onMessage().subscribe(({ data }) => { + this.api.onMessage().subscribe(({ data }) => { if (data.msg_type === 'transaction' && data.transaction.action === 'sell') { this.transaction_recovery_timeout = setTimeout(() => { const { contract } = this.data; @@ -120,14 +124,26 @@ export default class TradeEngine extends Balance(Purchase(Sell(OpenContract(Prop const is_open_contract = contract.status === 'open'; if (is_same_contract && is_open_contract) { doUntilDone(() => { - api_base.api.send({ proposal_open_contract: 1, contract_id: contract.contract_id }); + this.api.send({ proposal_open_contract: 1, contract_id: contract.contract_id }); }, ['PriceMoved']); } }, 1500); } - this.accountInfo = api_base.account_info; - this.token = api_base.token; - resolve(); + if (data.msg_type === 'authorize') { + this.accountInfo = data; + this.token = token; + + // Only subscribe to balance in browser, not for tests. + if (document) { + doUntilDone(() => this.api.send({ balance: 1, subscribe: 1 })).then(r => { + this.balance = Number(r.balance.balance); + resolve(); + }); + } else { + resolve(); + } + doUntilDone(() => this.api.send({ transaction: 1, subscribe: 1 })); + } }); }); } diff --git a/packages/bot-skeleton/src/services/tradeEngine/utils/cliTools.js b/packages/bot-skeleton/src/services/tradeEngine/utils/cliTools.js index 63cb063a7dc2..bac5c53d459d 100644 --- a/packages/bot-skeleton/src/services/tradeEngine/utils/cliTools.js +++ b/packages/bot-skeleton/src/services/tradeEngine/utils/cliTools.js @@ -1,9 +1,11 @@ import TicksService from '../../api/ticks_service'; import Observer from '../../../utils/observer'; +import { generateDerivApiInstance } from '../../api/appId'; export const createScope = () => { const observer = new Observer(); - const ticksService = new TicksService(); + const api = generateDerivApiInstance(); + const ticksService = new TicksService(api); const stopped = false; - return { observer, ticksService, stopped }; + return { observer, api, ticksService, stopped }; }; diff --git a/packages/bot-skeleton/src/services/tradeEngine/utils/helpers.js b/packages/bot-skeleton/src/services/tradeEngine/utils/helpers.js index 8a996f9ec836..ecb02e769017 100644 --- a/packages/bot-skeleton/src/services/tradeEngine/utils/helpers.js +++ b/packages/bot-skeleton/src/services/tradeEngine/utils/helpers.js @@ -130,17 +130,13 @@ export const shouldThrowError = (error, errors_to_ignore = []) => { return !is_ignorable_error; }; -export const recoverFromError = (promiseFn, recoverFn, errors_to_ignore, delay_index, api_base) => { +export const recoverFromError = (promiseFn, recoverFn, errors_to_ignore, delay_index) => { return new Promise((resolve, reject) => { const promise = promiseFn(); if (promise) { promise.then(resolve).catch(error => { - /** - * if bot is not running there is no point of recovering from error - * `!api_base.is_running` will check the bot status if it is not running it will kick out the control from loop - */ - if (shouldThrowError(error, errors_to_ignore) || (api_base && !api_base.is_running)) { + if (shouldThrowError(error, errors_to_ignore)) { reject(error); return; } @@ -176,13 +172,7 @@ export const recoverFromError = (promiseFn, recoverFn, errors_to_ignore, delay_i }); }; -/** - * @param {*} promiseFn api call - it could be api call or subscription - * @param {*} errors_to_ignore list of errors to ignore - * @param {*} api_base instance of APIBase class to check if the bot is running or not - * @returns a new promise - */ -export const doUntilDone = (promiseFn, errors_to_ignore, api_base) => { +export const doUntilDone = (promiseFn, errors_to_ignore) => { let delay_index = 1; return new Promise((resolve, reject) => { @@ -192,7 +182,7 @@ export const doUntilDone = (promiseFn, errors_to_ignore, api_base) => { }; const repeatFn = () => { - recoverFromError(promiseFn, recoverFn, errors_to_ignore, delay_index, api_base).then(resolve).catch(reject); + recoverFromError(promiseFn, recoverFn, errors_to_ignore, delay_index).then(resolve).catch(reject); }; repeatFn(); diff --git a/packages/bot-skeleton/src/services/tradeEngine/utils/interpreter.js b/packages/bot-skeleton/src/services/tradeEngine/utils/interpreter.js index 788d172dbe39..d43cb67f01d0 100644 --- a/packages/bot-skeleton/src/services/tradeEngine/utils/interpreter.js +++ b/packages/bot-skeleton/src/services/tradeEngine/utils/interpreter.js @@ -4,7 +4,6 @@ import { createScope } from './cliTools'; import Interface from '../Interface'; import { unrecoverable_errors } from '../../../constants/messages'; import { observer as globalObserver } from '../../../utils/observer'; -import { api_base } from '../../api/api-base'; JSInterpreter.prototype.takeStateSnapshot = function () { const newStateStack = cloneThorough(this.stateStack, undefined, undefined, undefined, true); @@ -181,14 +180,16 @@ const Interpreter = () => { } function terminateSession() { + const { connection } = $scope.api; + if (connection.readyState === 0) { + connection.addEventListener('open', () => connection.close()); + } else if (connection.readyState === 1) { + connection.close(); + } + $scope.stopped = true; $scope.is_error_triggered = false; globalObserver.emit('bot.stop'); - const { ticksService } = $scope; - // Unsubscribe previous ticks_history subscription - ticksService.unsubscribeFromTicksService(); - // Unsubscribe the subscriptions from Proposal, Balance and OpenContract - api_base.clearSubscriptions(); } function run(code) { diff --git a/packages/bot-web-ui/src/components/trade-animation/trade-animation.jsx b/packages/bot-web-ui/src/components/trade-animation/trade-animation.jsx index de40ff31ad8c..738ed174987a 100644 --- a/packages/bot-web-ui/src/components/trade-animation/trade-animation.jsx +++ b/packages/bot-web-ui/src/components/trade-animation/trade-animation.jsx @@ -85,16 +85,9 @@ const TradeAnimation = ({ info_direction, toggleAnimationInfoModal, cashier_validation, - performSelfExclusionCheck, }) => { const [is_button_disabled, updateIsButtonDisabled] = React.useState(false); const is_unavailable_for_payment_agent = cashier_validation?.includes('WithdrawServiceUnavailableForPA'); - - // perform self-exclusion checks which will be stored under the self-exclusion-store - React.useEffect(() => { - performSelfExclusionCheck(); - }, []); - React.useEffect(() => { if (is_button_disabled) { setTimeout(() => { @@ -102,7 +95,6 @@ const TradeAnimation = ({ }, 1000); } }, [is_button_disabled]); - const status_classes = ['', '', '']; let progress_status = contract_stage - @@ -182,7 +174,6 @@ TradeAnimation.propTypes = { is_stop_button_disabled: PropTypes.bool, onRunButtonClick: PropTypes.func, onStopButtonClick: PropTypes.func, - performSelfExclusionCheck: PropTypes.func, profit: PropTypes.number, should_show_overlay: PropTypes.bool, }; @@ -196,7 +187,6 @@ export default connect(({ summary_card, run_panel, toolbar, ui, client }) => ({ is_stop_button_disabled: run_panel.is_stop_button_disabled, onRunButtonClick: run_panel.onRunButtonClick, onStopButtonClick: run_panel.onStopButtonClick, - performSelfExclusionCheck: run_panel.performSelfExclusionCheck, profit: summary_card.profit, should_show_overlay: run_panel.should_show_overlay, toggleAnimationInfoModal: toolbar.toggleAnimationInfoModal, diff --git a/packages/bot-web-ui/src/stores/app-store.js b/packages/bot-web-ui/src/stores/app-store.js index 862140f7d1e5..2088fa4b7da7 100644 --- a/packages/bot-web-ui/src/stores/app-store.js +++ b/packages/bot-web-ui/src/stores/app-store.js @@ -39,7 +39,7 @@ export default class AppStore { onUnmount() { DBot.terminateBot(); - DBot.terminateConnection(); + if (Blockly.derivWorkspace) { clearInterval(Blockly.derivWorkspace.save_workspace_interval); Blockly.derivWorkspace.dispose(); diff --git a/packages/bot-web-ui/src/stores/run-panel-store.js b/packages/bot-web-ui/src/stores/run-panel-store.js index c35b2390467e..c0144b8e494a 100644 --- a/packages/bot-web-ui/src/stores/run-panel-store.js +++ b/packages/bot-web-ui/src/stores/run-panel-store.js @@ -32,7 +32,6 @@ export default class RunPanelStore { toggleDrawer: action.bound, setActiveTabIndex: action.bound, onCloseDialog: action.bound, - performSelfExclusionCheck: action.bound, showStopMultiplierContractDialog: action.bound, showLoginDialog: action.bound, showRealAccountDialog: action.bound, @@ -131,11 +130,6 @@ export default class RunPanelStore { ); } - async performSelfExclusionCheck() { - const { self_exclusion } = this.root_store; - await self_exclusion.checkRestriction(); - } - async onRunButtonClick() { const { core, summary_card, route_prompt_dialog, self_exclusion } = this.root_store; const { client, ui } = core; @@ -154,6 +148,7 @@ export default class RunPanelStore { */ if (is_ios || isSafari()) this.preloadAudio(); + await self_exclusion.checkRestriction(); if (!self_exclusion.should_bot_run) { self_exclusion.setIsRestricted(true); return; diff --git a/packages/p2p/src/translations/fr.json b/packages/p2p/src/translations/fr.json index 377fe2a81fef..e4022ee5e8ce 100644 --- a/packages/p2p/src/translations/fr.json +++ b/packages/p2p/src/translations/fr.json @@ -2,7 +2,7 @@ "6794664": "Annonces qui correspondent à votre solde et à votre limite P2P Deriv.", "19789721": "Personne ne t'a bloqué. Ouaii !", "21103557": "Solde P2P dérivé = dépôts qui ne peuvent pas être annulés (virements bancaires, etc.) + une partie des dépôts qui peuvent être annulés (paiements par carte de crédit, etc.)", - "24711354": "Total des ordres <0>30j | <1>tous", + "24711354": "Total des commandes <0>30j | <1>à vie", "47573834": "Taux fixe (1 {{account_currency}})", "50672601": "Acheté", "51881712": "Vous avez déjà une annonce avec le même taux de change pour cette paire de devises et ce type d'ordre.

Veuillez définir un taux différent pour votre annonce.", @@ -307,7 +307,7 @@ "-2059312414": "Détails de l'annonce", "-1769584466": "Statistiques", "-2090878601": "Limite journalière", - "-130547447": "Volume des trades <0>30d | <1>tous", + "-130547447": "Volume des trades <0>30d | <1>à vie", "-1792280476": "Choisissez votre mode de paiement", "-293182503": "Annuler l'ajout de ce mode de paiement ?", "-1850127397": "Si vous choisissez d'annuler, les données que vous avez saisies seront perdues.", diff --git a/packages/p2p/src/translations/id.json b/packages/p2p/src/translations/id.json index fadb811baa60..647a3c20d4a8 100644 --- a/packages/p2p/src/translations/id.json +++ b/packages/p2p/src/translations/id.json @@ -2,7 +2,7 @@ "6794664": "Iklan yang sesuai dengan saldo dan batas P2P Deriv Anda.", "19789721": "Tidak ada yang memblokir Anda. Yay!", "21103557": "Saldo Deriv P2P = deposit yang tidak dapat dibatalkan (melalui tranfer bank, dsb) + sejumlah deposit yang mungkin dapat dibatalkan (melalui kartu kredit, dsb)", - "24711354": "Total order <0>30hari | <1>semua", + "24711354": "Total order <0>30hari | <1>seumur hidup", "47573834": "Harga tetap (1 {{account_currency}})", "50672601": "Membeli", "51881712": "Anda sudah membuat iklan dengan nilai tukar yang sama untuk pasangan mata uang dan jenis order.

Mohon pilih nilai tukar lain untuk iklan Anda.", @@ -307,7 +307,7 @@ "-2059312414": "Detail iklan", "-1769584466": "Statistik", "-2090878601": "Batas harian", - "-130547447": "Transaksi <0>30 hari | <1>semua", + "-130547447": "Volume transaksi <0>30 hari | <1>seumur hidup", "-1792280476": "Pilih metode pembayaran Anda", "-293182503": "Batalkan penambahan metode pembayaran ini?", "-1850127397": "Jika Anda memilih untuk membatalkan, detail yang Anda masukkan akan hilang.", diff --git a/packages/translations/src/translations/it.json b/packages/translations/src/translations/it.json index 4b387ac0744b..b3d410f48790 100644 --- a/packages/translations/src/translations/it.json +++ b/packages/translations/src/translations/it.json @@ -245,7 +245,7 @@ "327534692": "Il valore di durata non è consentito. Per avviare il bot, inserire {{min}}.", "328539132": "Ripete le istruzioni ad esso relative per un numero specifico di volte", "329404045": "<0>Passa al conto reale<1> per creare un conto {{account_title}} {{platform}}.", - "332886946": "<1>Hai bisogno di aiuto per usare Acuity? <0/>Consulta questa <2>guida utente.", + "332886946": "<1>Hai bisogno di aiuto per usare Acuity? <0/>Consulta questa <2>guida per l'utente.", "333456603": "Limiti per i prelievi", "334680754": "Passa al tuo conto reale per creare un conto Deriv MT5", "334942497": "Tempo di acquista", @@ -517,7 +517,7 @@ "665089217": "Invia <0>il documenti di verifica dell'identità per autenticare il tuo conto e accedere alla cassa.", "665777772": "XLM/USD", "665872465": "Nell'esempio sottostante, è stato selezionato il prezzo di apertura, che viene poi assegnato a una variabile chiamata \"op\".", - "666724936": "Inserisci un numero ID valido.", + "666724936": "Inserisci un numero di ID valido.", "668344562": "Sintetici, FX maggiori (lotti standard/micro), FX minori, panieri di indici, materie prime e criptovalute", "672008428": "ZEC/USD", "673915530": "Giurisdizione e scelta delle legge applicabile", @@ -710,7 +710,7 @@ "918447723": "Reale", "920125517": "Aggiungi conto demo", "921901739": "- i dati del conto bancario collegato al tuo conto", - "924046954": "Carica un documento che mostri il tuo nome e il numero di conto bancario o le informazioni del conto.", + "924046954": "Carica un documento che mostri il tuo nome e il numero di conto bancario o i dettagli del conto.", "926813068": "Fisso/variabile", "929608744": "Non puoi effettuare prelievi", "930346117": "Le lettere maiuscole non sono di grande aiuto", @@ -778,7 +778,7 @@ "1006664890": "Silenzioso", "1009032439": "Sempre", "1010198306": "Questo blocco crea una lista con stringhe e numeri.", - "1010337648": "Non siamo stati in grado di verificare il documento a verifica della proprietà.", + "1010337648": "Non siamo stati in grado di verificare la tua prova di proprietà.", "1012102263": "Non potrai accedere al tuo conto fino a questa data (massimo 6 settimane da oggi).", "1015201500": "Stabilisci le opzioni di trading come durata e puntata.", "1016220824": "Devi passare a un conto reale per usare questa opzione. <0/>Per farlo, seleziona un conto reale da <1>Cambia conto.", @@ -855,7 +855,7 @@ "1086118495": "Hub per i trader", "1088138125": "Tick {{current_tick}} - ", "1089085289": "Numero di telefono", - "1096078516": "Verificheremo i documenti e ti aggiorneremo sullo stato della procedura entro 3 giorni.", + "1096078516": "Analizzeremo i documenti e ti aggiorneremo sullo stato entro 3 giorni.", "1096175323": "Occorre un conto Deriv", "1098147569": "Acquistare materie prime o azioni di una società.", "1098622295": "\"i\" inizia con il valore 1, e aumenta di 2 a ogni interazione. La ripetizione si ripete fino a quando \"i\" raggiunge il valore di 12, dopodiché termina.", @@ -972,7 +972,7 @@ "1232353969": "0-5 operazioni negli ultimi 12 mesi", "1233300532": "Payout", "1234292259": "Fonte di ricchezza", - "1234764730": "Carica uno screenshot del tuo nome e indirizzo email dalla sezione delle informazioni personali.", + "1234764730": "Carica uno screenshot del tuo nome e indirizzo email dalla sezione dei dettagli personali.", "1235426525": "50%", "1237330017": "Pensionato", "1238311538": "Amministratore", @@ -1234,7 +1234,7 @@ "1540585098": "Rifiuta", "1541969455": "Entrambi", "1544642951": "Selezionando \"Solo ascendente\", ottieni il payout se tick consecutivi superano successivamente il punto di entrata. Non ottieni alcun payout se qualsiasi tick è minore o uguale a uno dei tick precedenti.", - "1547148381": "Le dimensioni del file sono troppo grandi (consentiti solo fino a 8MB). Carica un altro file.", + "1547148381": "Il file è troppo grande (sono consentiti solo fino a 8MB). Carica un altro file.", "1548765374": "La verifica del numero di documento non è andata a buon fine", "1549098835": "Totale prelievo", "1551172020": "Paniere AUD", @@ -1332,7 +1332,7 @@ "1675030608": "Per creare questo conto, abbiamo bisogno prima che tu invii nuovamente la prova dell'indirizzo.", "1677027187": "Forex", "1677990284": "Le mie app", - "1680666439": "Carica l'estratto conto bancario con il tuo nome, il numero di conto e la cronologia delle transazioni.", + "1680666439": "Carica lo estratto conto bancario con il tuo nome, il numero di conto e la cronologia delle transazioni.", "1682409128": "Strategia senza nome", "1682636566": "Invia di nuovo e-mail a", "1683963454": "Il contratto verrà chiuso automaticamente al successivo prezzo disponibile dell'asset il {{date}} alle {{timestamp}}.", @@ -1367,7 +1367,7 @@ "1723398114": "Una recente bolletta delle utenze (ad es. elettricità, acqua, gas, telefono o internet)", "1723589564": "Rappresenta il numero massimo di contratti in essere nel tuo portafoglio. Ogni riga presente sul tuo portafoglio vale una posizione aperta. Una volta raggiunto il valore massimo, non potrai aprire nuove posizioni senza prima chiudere una posizione esistente.", "1724696797": "È possibile avere un solo conto fiat.", - "1725958461": "Numero del conto", + "1725958461": "Numero di conto", "1726472773": "Funzione che non restituisce un valore", "1726565314": "Chiudi il conto", "1727681395": "Totale asset attivi nei conti demo Deriv e {{platform_name_mt5}}.", @@ -1433,7 +1433,7 @@ "1791971912": "Recente", "1793913365": "Per depositare denaro, passa al conto {{currency_symbol}}.", "1794815502": "Scarica la cronologia delle tue operazioni.", - "1796787905": "Carica il/i seguente/i documento/i.", + "1796787905": "Carica il/i documento/i seguente/i.", "1798943788": "Puoi solo effettuare depositi.", "1801093206": "Ottieni l'elenco candele", "1801927731": "Conti {{platform_name_dxtrade}}", @@ -1610,7 +1610,7 @@ "1988153223": "Indirizzo e-mail", "1988302483": "Take profit:", "1988601220": "Valore della durata", - "1990331072": "Documento a verifica della proprietà", + "1990331072": "Prova di proprietà", "1990735316": "Aumento pari a", "1991448657": "Non conosci il tuo numero di identificazione fiscale? Clicca <0>qui per saperne di più.", "1991524207": "Indice Jump 100", @@ -1656,7 +1656,7 @@ "2037665157": "Espandi tutti i blocchi", "2037906477": "ottieni sotto elenco da #", "2042050260": "- Prezzo d'acquisto: il prezzo d'acquisto (puntata) del contratto", - "2042115724": "Carica uno screenshot del tuo conto e della pagina delle informazioni personali con il tuo nome, numero di conto, numero di telefono e indirizzo email.", + "2042115724": "Carica uno screenshot del tuo conto e della pagina dei dettagli personali con il tuo nome, numero di conto, numero di telefono e indirizzo email.", "2042778835": "La presente politica sui reclami potrebbe cambiare nel tempo, e si applica ai conti registrati con {{legal_entity_name}}.", "2044086432": "Quello di chiusura è l'ultimo tick entro l'orario di termine. Se selezioni un orario di termine preciso, quest'ultimo sarà l'orario selezionato.", "2046273837": "Ultimo tick", @@ -1702,7 +1702,7 @@ "2096456845": "Data di nascita*", "2097170986": "Tether (Omni)", "2097381850": "Calcola la linea della Media mobile semplice da un elenco con un periodo", - "2097932389": "Carica 2 schermate separate dalla pagina delle informazioni personali e dalla pagina del conto tramite la pagina <0>https://app.astropay.com/profile", + "2097932389": "Carica 2 schermate separate dalla pagina dei dettagli personali e dalla pagina del conto tramite <0>https://app.astropay.com/profile", "2100713124": "conto", "2101972779": "Utilizzando un elenco di tick, ripropone l'esempio precedente.", "2102572780": "Il codice deve comprendere 6 caratteri.", @@ -1821,7 +1821,7 @@ "-922751756": "Meno di un anno", "-542986255": "Nessuna", "-1337206552": "Secondo le tue conoscenze, il trading con i CFD ti consente di", - "-456863190": "Metti una posizione sul movimento del prezzo di un asset il cui risultato è un rendimento fisso o nullo.", + "-456863190": "Metti una posizione sul movimento del prezzo di un asset il cui risultato è un rendimento fisso o nulla.", "-1314683258": "Effettuare un investimento a lungo termine per un profitto garantito.", "-1546090184": "Come influisce la leva sul trading di CFD?", "-1636427115": "La leva finanziaria ti aiuta a mitigare il rischio.", @@ -1939,13 +1939,13 @@ "-1030759620": "Funzionari governativi", "-1196936955": "Carica uno screenshot del tuo nome e indirizzo email dalla sezione delle informazioni personali.", "-1286823855": "Carica l'estratto conto della bolletta del cellulare con il tuo nome e numero di telefono.", - "-1309548471": "Carica l'estratto conto bancario con il tuo nome e le informazioni del conto.", - "-1410396115": "Carica una foto che mostri il tuo nome e le prime sei e le ultime quattro cifre del numero della tua carta. Se la carta non riporta il tuo nome, carica l'estratto conto bancario con il tuo nome e il numero della carta nella cronologia delle transazioni.", - "-3805155": "Carica uno screenshot di una delle seguenti informazioni per elaborare la transazione:", + "-1309548471": "Carica il tuo estratto conto bancario con il tuo nome e i dettagli del conto.", + "-1410396115": "Carica una foto che mostri il tuo nome e le prime sei e ultime quattro cifre del numero della tua carta. Se la carta non riporta il tuo nome, carica l'estratto conto bancario con il tuo nome e il numero della carta nella cronologia delle transazioni.", + "-3805155": "Carica uno screenshot di uno dei seguenti elementi per elaborare la transazione:", "-1523487566": "- la sezione del profilo del tuo conto sul sito web", "-613062596": "- la pagina delle informazioni sul conto sull'app", "-1718304498": "ID utente", - "-609424336": "Carica uno screenshot del tuo nome, numero di conto e indirizzo email dalla sezione delle informazioni personali dell'app o della sezione del profilo del tuo conto sul sito web.", + "-609424336": "Carica uno screenshot del tuo nome, numero di conto e indirizzo email dalla sezione dei dettagli personali dell'app o della sezione del profilo del tuo conto sul sito web.", "-1954436643": "Carica uno screenshot del tuo nome utente nella pagina delle informazioni generali all'<0>indirizzo https://onlinenaira.com/members/index.htm", "-79853954": "Carica uno screenshot del tuo numero di conto e del numero di telefono nella pagina del conto bancario/portafoglio mobile all'<0>indirizzo https://onlinenaira.com/members/bank.htm", "-1192882870": "Carica uno screenshot del tuo nome e del tuo numero di conto dalla sezione dei dettagli personali.", @@ -2039,10 +2039,10 @@ "-1725454783": "Non riuscito", "-839094775": "Indietro", "-856213726": "Dovrai inoltre consegnare un documento di verifica dell'identità.", - "-987011273": "Il documento a verifica della proprietà non è richiesto.", - "-808299796": "Al momento non è necessario presentare un documento a verifica della proprietà. Ti informeremo se in futuro sarà richiesto.", - "-179726573": "Abbiamo ricevuto il tuo documento a verifica della proprietà.", - "-813779897": "La verifica della proprietà è andata a buon fine.", + "-987011273": "La tua prova di proprietà non è richiesta.", + "-808299796": "Al momento non è necessario presentare una prova di proprietà. Ti informeremo se in futuro sarà richiesta una prova della proprietà.", + "-179726573": "Abbiamo ricevuto la tua prova di proprietà.", + "-813779897": "La verifica della proprietà è stata superata.", "-1389323399": "Devi inserire {{min_number}}-{{max_number}} caratteri.", "-1313806160": "Richiedi una nuova password e controlla di aver ricevuto un'e-mail con il nuovo token.", "-329713179": "Ok", @@ -2377,7 +2377,7 @@ "-451858550": "Facendo click su \"Continua\" verrai reindirizzato a {{ service }}, un fornitore di servizi di pagamento esterno. {{ website_name }} declina qualsiasi responsabilità per i contenuti o i servizi forniti da {{ service }}. Se riscontri problemi relativi ai servizi di {{ service }}, contatta direttamente {{ service }}.", "-2005265642": "Fiat onramp è un servizio di cassa che permette di convertire valute fiat in criptovalute per ricaricare i conti per criptovalute di Deriv. Qui sono elencati gli scambi di criptovalute di parti terze; è necessario creare un conto apposito per utilizzare i loro servizi.", "-1593063457": "Seleziona strumento di pagamento", - "-953082600": "Alcuni metodi di pagamento possono non essere elencati qui, anche se gli agenti di pagamento potrebbero comunque offrirli. Se non riesci a trovare il tuo metodo preferito, contatta direttamente gli agenti di pagamento per ulteriori verifiche.", + "-953082600": "Alcuni metodi di pagamento potrebbero non essere elencati qui, ma gli agenti di pagamento potrebbero comunque offrirli. Se non riesci a trovare il tuo metodo preferito, contatta direttamente gli agenti di pagamento per verificare ulteriormente.", "-2004264970": "L'indirizzo di portafoglio deve comprendere dai 25 ai 64 caratteri.", "-1707299138": "L'indirizzo di portafoglio {{currency_symbol}}", "-38063175": "Portafoglio in {{account_text}}", @@ -2767,8 +2767,8 @@ "-1719731099": "Grazie all'autenticazione a due fattori, il conto è protetto sia dalla password che dal telefono: in questo modo solo tu puoi accedere al conto anche se qualcuno conosce la password.", "-2087822170": "Sei offline", "-1669693571": "Verifica la tua connessione.", - "-1706642239": "<1>È richiesto <0>un documento a verifica della proprietà", - "-553262593": "<0><1>Il tuo conto è attualmente bloccato<2><3>Carica il documento a verifica della <4>proprietà per sbloccarlo. <5>", + "-1706642239": "<1>È richiesta <0>una prova di proprietà", + "-553262593": "<0><1>Il tuo conto è attualmente bloccato<2><3>Carica la prova di <4>proprietà per sbloccare il tuo conto. <5>", "-1834929362": "Carica il documento", "-1043638404": "<0>Verifica della proprietà <1>non riuscita", "-1766760306": "<0><1>Carica il documento <2>con i dati corretti.<3>", @@ -2955,7 +2955,7 @@ "-1300381594": "Ottieni gli strumenti di trading Acuity", "-860609405": "Password", "-742647506": "Trasferisci fondi", - "-1972393174": "Fai trading con CFD sui nostri sintetici, panieri e sugli FX derivati.", + "-1972393174": "Fai trading con CFD sui nostri sintetici, sui panieri e sugli FX derivati.", "-1357917360": "Terminale web", "-1454896285": "L'app per Desktop di MT5 non è supportata da Windows XP, Windows 2003 e Windows Vista.", "-810388996": "Scarica l'app mobile Deriv X", diff --git a/packages/translations/src/translations/ru.json b/packages/translations/src/translations/ru.json index 6d0d7f372f9c..49d90352585e 100644 --- a/packages/translations/src/translations/ru.json +++ b/packages/translations/src/translations/ru.json @@ -566,7 +566,7 @@ "724203548": "Вы можете отправить жалобу на платформу <0>онлайн-урегулирования споров (ODR) Европейской Комиссии. Это не относится к клиентам из Великобритании.", "728042840": "Чтобы продолжить торговать у нас, пожалуйста, подтвердите свое место жительства.", "728824018": "Испанский индекс", - "729651741": "Выберите фото", + "729651741": "Выберите фотографию", "730473724": "Этот блок выполняет логическую операцию «И» или «ИЛИ» с заданными значениями.", "731382582": "BNB/USD", "734390964": "Недостаточно средств на счете", @@ -709,7 +709,7 @@ "915735109": "Вернуться на {{platform_name}}", "918447723": "Реальный", "920125517": "Добавить демо-счет", - "921901739": "- данные банковского счета, привязанного к вашему счету", + "921901739": "- данные вашего банковского счета, привязанного к вашему счету", "924046954": "Загрузите документ с вашим именем и номером банковского счета или реквизитами счета.", "926813068": "Фиксированный/переменный", "929608744": "Вы не можете выводить средства", @@ -855,7 +855,7 @@ "1086118495": "Центр трейдера", "1088138125": "Тик {{current_tick}} - ", "1089085289": "Номер мобильного телефона", - "1096078516": "Мы рассмотрим ваши документы и уведомим вас об их статусе в течение 3 дней.", + "1096078516": "Мы рассмотрим ваши документы и уведомим вас о их статусе в течение 3 дней.", "1096175323": "Вам понадобится счет Deriv", "1098147569": "Приобретайте товары или акции компании.", "1098622295": "«i» начинается со значения 1 и увеличивается на 2 в каждом повторении. Цикл будет повторяться до тех пор, пока «i» не достигнет значения 12, и затем цикл будет прерван.", @@ -946,7 +946,7 @@ "1201773643": "числовой", "1203297580": "Этот блок отправляет сообщение в Telegram-канал.", "1204223111": "В этом примере цены открытия из списка свечей присваиваются переменной с именем \"candle_list\".", - "1206227936": "Как скрыть карту?", + "1206227936": "Как замаскировать карту?", "1206821331": "Вооруженные силы", "1208729868": "Тики", "1208903663": "Неверный ключ", @@ -1192,7 +1192,7 @@ "1481977420": "Помогите нам верифицировать ваш запрос на вывод средств.", "1484336612": "Этот блок используется для завершения или продолжения цикла и может быть размещен в любом месте блока цикла.", "1487086154": "Ваши документы успешно отправлены", - "1488548367": "Загрузить снова", + "1488548367": "Загрузите снова", "1490583127": "DBot пока не готов к использованию на реальных счетах", "1491392301": "<0>Продано за: {{sold_for}}", "1492686447": "Ваш счет MT5 Финансовый STP будет открыт в Deriv (FX) Ltd. Все операции на этом счете регулируются правилами и руководящими принципами Управления финансовых услуг Лабуана (LFSA). Правила и принципы Управления финансовых услуг Лабуана (LFSA) не распространяются ни на один из ваших других счетов, включая счет Deriv.", @@ -1234,7 +1234,7 @@ "1540585098": "Отклонить", "1541969455": "Оба", "1544642951": "Выбрав \"Только вверх\", вы получите выплату, если несколько тиков подряд будут расти по отношению к котировке на входе. Если любой тик покажет снижение или будет равен одному из предыдущих тиков, вы не получите выплату.", - "1547148381": "Файл слишком большой (разрешено не более 8 МБ). Попробуйте другой файл.", + "1547148381": "Этот файл слишком велик (разрешено не более 8 МБ). Пожалуйста, загрузите еще один файл.", "1548765374": "Не удалось верифицировать номер документа", "1549098835": "Общая сумма вывода", "1551172020": "Индекс AUD", @@ -1433,7 +1433,7 @@ "1791971912": "Недавние", "1793913365": "Чтобы внести средства, перейдите на свой счет {{currency_symbol}}.", "1794815502": "Загрузить историю транзакций.", - "1796787905": "Загрузите следующие документы.", + "1796787905": "Пожалуйста, загрузите следующие документы.", "1798943788": "Вы можете делать только депозиты.", "1801093206": "Получить список свечей", "1801927731": "счета {{platform_name_dxtrade}}", @@ -1944,7 +1944,7 @@ "-3805155": "Загрузите скриншот одного из следующих изображений для обработки транзакции:", "-1523487566": "- раздел профиля вашей учетной записи на сайте", "-613062596": "- страница «Информация об учетной записи» в приложении", - "-1718304498": "ID пользователя", + "-1718304498": "Идентификатор пользователя", "-609424336": "Загрузите скриншот своего имени, номера счета и адреса электронной почты из раздела личных данных приложения или раздела профиля своей учетной записи на веб-сайте.", "-1954436643": "Загрузите скриншот своего имени пользователя на странице «Общая информация» по адресу <0>https://onlinenaira.com/members/index.htm", "-79853954": "Загрузите скриншот номера своего счета и номера телефона на странице «Банковский счет/мобильный кошелек» по адресу <0>https://onlinenaira.com/members/bank.htm", diff --git a/packages/translations/src/translations/th.json b/packages/translations/src/translations/th.json index c30b93cfd7fe..b2fb527430ee 100644 --- a/packages/translations/src/translations/th.json +++ b/packages/translations/src/translations/th.json @@ -589,7 +589,7 @@ "759783233": "สําหรับข้อมูลเพิ่มเติมและความช่วยเหลือให้คําปรึกษาและบริการสนับสนุนต่าง โปรดไปที่ <0>begambleaware.org", "760528514": "โปรดทราบว่า การเปลี่ยนค่าของ \"i\" จะไม่เปลี่ยนแปลงค่าของรายการตัวต้นฉบับในลิสต์", "761576760": "ฝากเงินเข้าบัญชีของคุณเพื่อเริ่มทำการซื้อขาย", - "762185380": "<0>เพิ่มทวีผลที่ได้รับ โดย <0>มีความเสี่ยงเพียงเฉพาะ ทุนทรัพย์ที่คุณลงไป", + "762185380": "<0>ได้ผลตอบแทนเพิ่มทวีคูณ โดย <0>เสี่ยงเพียงเฉพาะ สิ่งที่คุณวางเดิมพัน", "762871622": "{{remaining_time}}วินาที", "763019867": "บัญชีเกมของคุณมีกำหนดที่จะถูกปิด", "764366329": "วงเงินในการซื้อขาย", @@ -2888,7 +2888,7 @@ "-895091803": "หากคุณกำลังมองหาสัญญาการซื้อขายส่วนต่าง", "-1447215751": "ไม่แน่ใจ? ลองนี่สิ", "-2338797": "<0>เพิ่มผลตอบแทนสูงสุด โดย <0>เสี่ยงมากกว่า สิ่งที่คุณวางเดิมพัน", - "-1682067341": "รับ <0>ผลที่ได้รับในอัตราคงที่ โดย <0>เสี่ยงเพียง ทุนทรัพย์ที่คุณลงไป", + "-1682067341": "รับ <0>ผลตอบแทนอัตราคงที่ โดย <0>เสี่ยงเพียง สิ่งที่คุณวางเดิมพัน", "-1744351732": "ไม่แน่ใจว่าจะเริ่มต้นที่ไหน?", "-943710774": "นโยบายการร้องเรียนนี้ซึ่งอาจมีการเปลี่ยนแปลงเป็นครั้งคราว มีผลบังคับใช้กับบัญชีของคุณที่ลงทะเบียนกับ {{legal_entity_name}} ซึ่งมีที่อยู่สำนักงานที่จดทะเบียนไว้ที่ First Floor, Millennium House, Victoria Road, Douglas, Isle of Man, IM2 4RW บริษัทนี้ได้รับใบอนุญาตและถูกกำกับควบคุมตามกฎหมายโดย (1) Gambling Supervision Commission ในเกาะไอล์ออฟแมน (ปัจจุบัน <0>ใบอนุญาต ออกเมื่อวันที่ 31 สิงหาคม ค. ศ. 2017) และ (2) Gambling Commission ในสหราชอาณาจักร (<1>ใบอนุญาตเลขที่ 39172)", "-255056078": "นโยบายการร้องเรียนนี้ซึ่งอาจมีการเปลี่ยนแปลงเป็นครั้งคราว มีผลบังคับใช้กับบัญชีของคุณที่ลงทะเบียนกับ {{legal_entity_name}} ซึ่งมีที่อยู่สำนักงานที่จดทะเบียนไว้ที่ Level 3, Triq Dun Karm, Birkirkara, BKR 9033 ประเทศมอลตา บริษัทได้รับใบอนุญาตและถูกกำกับควบคุมตามกฎหมายโดย Malta Gaming Authority ในประเทศมอลตาสำหรับผลิตภัณฑ์การพนันเท่านั้น <0>ใบอนุญาตเลขที่ MGA/B2C/102/2000 และสำหรับลูกค้าที่อาศัยอยู่ในสหราชอาณาจักรโดย UK Gambling Commission (เลขที่บัญชี 39495)", @@ -3216,7 +3216,7 @@ "-313112159": "บล็อกนี้จะคล้ายกับบล็อกด้านบน แต่ต่างกันที่ว่าบล๊อกนี้จะส่งคืนค่ามาอันหนึ่ง โดยค่าที่ส่งคืนนั้นสามารถถูกกำหนดให้กับตัวแปรที่คุณเลือกได้", "-1783320173": "คืนค่าภายในฟังก์ชันก่อนกําหนด", "-1485521724": "การส่งคืนตามเงื่อนไข", - "-1482801393": "ผลที่ได้รับ", + "-1482801393": "ผลตอบแทน", "-46453136": "ได้รับ", "-1838027177": "อย่างแรก", "-1182568049": "รับรายการในลิสต์",