Skip to content

Commit

Permalink
Merge branch 'master' of github.com:binary-com/deriv-app into cashier…
Browse files Browse the repository at this point in the history
…-errorcomponent-testcase
  • Loading branch information
ashrafali-v committed Apr 1, 2022
2 parents 608e11b + 8f2c9d3 commit 67c1b10
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default Engine =>
}

getLastDigit() {
return new Promise(resolve => this.getLastTick().then(tick => resolve(getLastDigit(tick))));
return new Promise(resolve => this.getLastTick(false, true).then(tick => resolve(getLastDigit(tick))));
}

getLastDigitList() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@ export const getDirection = ticks => {
return direction;
};

export const getLastDigit = tick => (Number.isInteger(tick) ? tick % 10 : Number(tick.toString().slice(-1)));
export const getLastDigit = tick => {
let number_string = tick;
if (typeof number_string === 'number') {
number_string = String(number_string);
}
return number_string[number_string.length - 1];
};

const getBackoffDelayInMs = (error, delay_index) => {
const base_delay = 2.5;
Expand Down
7 changes: 6 additions & 1 deletion packages/core/src/Stores/client-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -1249,7 +1249,12 @@ export default class ClientStore extends BaseStore {

if (has_action) {
const query_string = filterUrlQuery(search, ['platform', 'code', 'action']);
window.location.replace(`${redirect_route}/redirect?${query_string}`);
if ([routes.cashier_withdrawal, routes.cashier_pa].includes(redirect_route)) {
// Set redirect path for cashier withdrawal and payment agent withdrawal (after getting PTA redirect_url)
window.location.replace(`/redirect?${query_string}`);
} else {
window.location.replace(`${redirect_route}/redirect?${query_string}`);
}
} else {
window.location.replace(`${redirect_route}/?${filterUrlQuery(search, ['platform'])}`);
}
Expand Down
72 changes: 36 additions & 36 deletions packages/p2p/src/translations/pt.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"6794664": "Ads that match your Deriv P2P balance and limit.",
"6794664": "Anúncios que correspondem ao seu saldo e limite Deriv P2P.",
"21103557": "Deriv Saldo P2P = depósitos que não podem ser revertidos (transferências bancárias, etc.) + uma parte dos depósitos que podem ser revertidos (pagamentos com cartão de crédito, etc.)",
"24711354": "Total orders <0>30d</0> | <1>lifetime</1>",
"47573834": "Fixed rate (1 {{account_currency}})",
"47573834": "Taxa fixa (1 {{account_currency}})",
"50672601": "Adquiridos",
"51881712": "Você já tem um anúncio com a mesma taxa de câmbio para este par de moedas e tipo de pedido. <br/><br/>Por favor, defina uma taxa diferente para seu anúncio.",
"55916349": "All",
"55916349": "Tudo",
"68867477": "ID do pedido {{ id }}",
"121738739": "Enviar",
"122280248": "Avg release time <0>30d</0>",
"145959105": "Escolha um apelido",
"150156106": "Save changes",
"150156106": "Salvar alterações",
"160092151": "Choose payment method",
"173939998": "Avg. pay time <0>30d</0>",
"197477687": "Edit {{ad_type}} ad",
Expand All @@ -33,19 +33,19 @@
"523301614": "Liberar {{amount}} {{currency}}",
"525380157": "Pedido de compra de {{offered_currency}}",
"531912261": "Nome do banco, número da conta, nome do beneficiário",
"554135844": "Edit",
"554135844": "Editar",
"580715136": "Por favor, registre-se conosco!",
"587882987": "Anunciantes",
"592082899": "Não pode repetir caracteres mais de 5 vezes.",
"611376642": "Clear",
"611376642": "Limpar",
"649549724": "Eu não recebi nenhum pagamento.",
"662578726": "Available",
"662578726": "Disponível",
"671582270": "O valor máximo disponível é {{value}}",
"683273691": "Taxa (1 {{ account_currency }})",
"728383001": "Eu recebi mais do que o valor combinado.",
"767789372": "Aguarde pagamento",
"782834680": "Tempo restante",
"783454335": "Yes, remove",
"783454335": "Sim, remover",
"829867834": "This field has exceeded maximum length of 200 characters.",
"830703311": "Meu perfil",
"838024160": "Detalhes bancários",
Expand Down Expand Up @@ -79,7 +79,7 @@
"1202500203": "Pagar agora",
"1236083813": "Seus dados de pagamento",
"1258285343": "Ops, algo deu errado",
"1265751551": "Deriv P2P Balance",
"1265751551": "Saldo Deriv P2P",
"1286797620": "Ativo",
"1287051975": "Apelido muito longo",
"1314266187": "Joined today",
Expand All @@ -90,13 +90,13 @@
"1366244749": "Limites",
"1371193412": "Cancelar",
"1381949324": "<0>Address</0> verified",
"1422356389": "No results for \"{{text}}\".",
"1422356389": "Nenhum resultado para \"{{text}}\".",
"1430413419": "O máximo é {{value}} {{currency}}",
"1438140245": "To avoid loss of funds, please do not use cash transactions. We recommend using e-wallets or bank transfers.",
"1438140245": "Para evitar a perda de fundos, não use transações em dinheiro. Recomendamos o uso de carteiras eletrônicas ou transferências bancárias.",
"1448855725": "Add payment methods",
"1467483693": "Pedidos anteriores",
"1474532322": "Ordenar por",
"1505293001": "Trade partners",
"1505293001": "Parceiros de negociação",
"1538160426": "Certifique-se de ter pago {{amount}} {{currency}} a {{other_user_name}}.",
"1555610869": "You're editing an ad to buy <0>{{ target_amount }} {{ target_currency }}</0> for <0>{{ local_amount }} {{ local_currency }}</0> ({{ price_rate }} {{local_currency}}/{{ target_currency }})",
"1583335572": "Se o anúncio não receber um pedido por {{adverts_archive_period}} dias, ele será desativado.",
Expand All @@ -109,9 +109,9 @@
"1675716253": "Limite mín",
"1678804253": "Comprar {{ currency }}",
"1703154819": "You're editing an ad to sell <0>{{ target_amount }} {{ target_currency }}</0>...",
"1721422292": "Show my real name",
"1734661732": "Your DP2P balance is {{ dp2p_balance }}",
"1747523625": "Go back",
"1721422292": "Mostrar meu nome verdadeiro",
"1734661732": "Seu saldo DP2P é {{dp2p_balance}}",
"1747523625": "Voltar",
"1752096323": "{{field_name}} não deve estar abaixo do Limite mín",
"1767817594": "Buy completion <0>30d</0>",
"1794470010": "Fiz o pagamento integral, mas o vendedor não liberou os fundos.",
Expand All @@ -125,12 +125,12 @@
"1928240840": "Vender {{ currency }}",
"1976156928": "Você vai enviar",
"1992961867": "Taxa (1 {{currency}})",
"2020104747": "Filter",
"2020104747": "Filtros",
"2039361923": "Você está criando um anúncio para vender...",
"2063890788": "Cancelado",
"2086563542": "Taxa de câmbio (padrão)",
"2091671594": "Status",
"2096014107": "Apply",
"2096014107": "Aplicar",
"2121837513": "O mínimo é {{value}} {{currency}}",
"2142425493": "ID Anúncio",
"2144972362": "Use o chat ao vivo para entrar em contato com nossa equipe de Suporte ao Cliente para obter ajuda.",
Expand Down Expand Up @@ -165,7 +165,7 @@
"-92830427": "Instruções do vendedor",
"-1940034707": "Instruções do comprador",
"-137444201": "Comprar",
"-1306639327": "Payment methods",
"-1306639327": "Métodos de Pagamento",
"-1102534097": "Nenhum anúncio",
"-904197848": "Limits {{min_order_amount_limit_display}}-{{max_order_amount_limit_display}} {{currency}}",
"-464361439": "{{- avg_buy_time_in_minutes}} min",
Expand All @@ -178,31 +178,31 @@
"-494667560": "Pedidos",
"-679691613": "Meus anúncios",
"-55126326": "Vendedor",
"-835196958": "Receive payment to",
"-835196958": "Receber o pagamento para",
"-1218007718": "You may choose up to 3.",
"-2144314441": "Valor de compra",
"-1974067943": "Seus dados bancários",
"-412680608": "Add payment method",
"-412680608": "Adicionar método de pagamento",
"-1657433201": "Não há anúncios correspondentes.",
"-198897319": "Taxa de conclusão: {{total_completion_rate}}%",
"-1862812590": "Limits {{ min_order }}–{{ max_order }} {{ currency }}",
"-375836822": "Comprar {{account_currency}}",
"-1035421133": "Vendas {{account_currency}}",
"-1325806155": "Não há anúncios.",
"-227512949": "Check your spelling or use a different term.",
"-1554938377": "Search payment method",
"-227512949": "Verifique a ortografia ou use um termo diferente.",
"-1554938377": "Pesquisar método de pagamento",
"-1285759343": "Pesquisar",
"-75934135": "Matching ads",
"-1856204727": "Reset",
"-75934135": "Anúncios que correspondem",
"-1856204727": "Resetar",
"-1638172550": "Para habilitar este recurso, você deve completar o seguinte:",
"-559300364": "Seu caixa do Deriv P2P está bloqueado",
"-674715853": "Seu anúncio excede o limite diário",
"-744406": "Your ad is not listed on <0>Buy/Sell</0> because the amount exceeds your daily limit of {{limit}} {{currency}}.\n <1 /><1 />You can still see your ad on <0>My ads</0>. If you’d like to increase your daily limit, please contact us via <2>live chat</2>.",
"-329713179": "Ok",
"-480724783": "Você já tem um anúncio com esta taxa",
"-1072444041": "Atualize seu anúncio",
"-1406830100": "Payment method",
"-984140537": "Add",
"-1406830100": "Método de pagamento",
"-984140537": "Adicionar",
"-1561775203": "Comprar {{currency}}",
"-1527285935": "Vendas {{currency}}",
"-592818187": "Seu saldo Deriv P2P é {{ dp2p_balance }}",
Expand All @@ -225,24 +225,24 @@
"-1395240684": "Venda {{id}}",
"-1318334333": "Desativar",
"-1667041441": "Taxa (1 {{ offered_currency }})",
"-2057238438": "Some of your ads don't contain payment methods. To make it easier for people to pay you, please add payment methods to all your ads.",
"-2057238438": "Alguns de seus anúncios não contêm métodos de pagamento. Para que seja mais fácil para as pessoas pagarem a você, adicione métodos de pagamento a todos os seus anúncios.",
"-792015701": "O caixa Deriv P2P não está disponível em seu país.",
"-1220275347": "You may choose up to 3 payment methods for this ad.",
"-806152028": "Seus anúncios estão sendo exibidos",
"-179005984": "Salvar",
"-2059312414": "Ad details",
"-1769584466": "Stats",
"-2090878601": "Daily limit",
"-2059312414": "Detalhes do anúncio",
"-1769584466": "Estatísticas",
"-2090878601": "Limite diário",
"-130547447": "Trade volume <0>30d</0> | <1>lifetime</1>",
"-549609118": "This field can only include letters, numbers, spaces, and any of these symbols: -+._@",
"-1792280476": "Choose your payment method",
"-293182503": "Cancel adding this payment method?",
"-1850127397": "If you choose to cancel, the details you’ve entered will be lost.",
"-1792280476": "Escolha o seu método de pagamento",
"-293182503": "Cancelar a adição deste método de pagamento?",
"-1850127397": "Se você decidir cancelar, os detalhes inseridos serão perdidos.",
"-1889014820": "<0>Don’t see your payment method?</0> <1>Add new.</1>",
"-383030149": "You haven’t added any payment methods yet",
"-1269362917": "Add new",
"-146021156": "Delete {{payment_method_name}}?",
"-1846700504": "Are you sure you want to remove this payment method?",
"-1269362917": "Adicionar novo",
"-146021156": "Deletar {{payment_method_name}}?",
"-1846700504": "Tem certeza de que deseja remover este método de pagamento?",
"-231863107": "No",
"-532709160": "Seu apelido",
"-2008992756": "Quer cancelar este pedido?",
Expand Down
4 changes: 2 additions & 2 deletions packages/translations/src/translations/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@
"716428965": "(Kapalı)",
"718504300": "Posta/ZIP kodu",
"718710899": "{{currency}} hesabınıza para yatırma işlemi yaptığınızdan veya DMT5 ya da Deriv X'te gerçek bir hesap oluşturduğunuz için hesap para biriminizi değiştiremeyiz.",
"718724141": "İçinde sona eriyor",
"718724141": "Sona ereceği süre",
"720293140": "Oturumu kapat",
"720519019": "Parolamı sıfırla",
"721011817": "- İlk sayıyı ikinci sayının gücüne yükseltin",
Expand Down Expand Up @@ -2673,7 +2673,7 @@
"-529846150": "Saniye",
"-256210543": "Şu anda alım satım işlemi yapılamıyor.",
"-1050725091": "Bu hesap için DTrader kullanılamıyor",
"-402175529": "Tarih",
"-402175529": "Geçmiş",
"-902712434": "Anlaşma iptali",
"-988484646": "Anlaşma iptali (uygulandı)",
"-444882676": "Anlaşma iptali (etkin)",
Expand Down

0 comments on commit 67c1b10

Please sign in to comment.