Commit 2b4ac4eb authored by Samuel Alphée Richard's avatar Samuel Alphée Richard
Browse files

Merge branch 'blurt-swap-validation' into 'dev'

add validation to blurt-swap; deactivate transfers to blurtlink

See merge request !275
parents d1927320 03b26a5d
Pipeline #421658362 failed with stages
in 22 seconds
......@@ -632,6 +632,8 @@
"each_account_segment_should_end_with_a_letter_or_digit": "Each account segment should end with a letter or digit.",
"each_account_segment_should_be_longer": "Each account segment should be longer.",
"verified_exchange_no_memo": "You must include a memo for your exchange transfer.",
"suspended_exchange": "This exchange account is no longer active.",
"invalid_memo": "Memo for deposits to Hive-Engine/Tribaldex should start with SWAP.BLURT.",
"badactor": "Use caution sending to this account. Please double check your spelling for possible phishing.",
"memo_has_privatekey": "Please do not include what appears to be a private key or password.",
"memo_is_privatekey": "Do not use private keys in memos.",
......
......@@ -621,6 +621,8 @@
"each_account_segment_should_end_with_a_letter_or_digit": "Each account segment should end with a letter or digit.",
"each_account_segment_should_be_longer": "Each account segment should be longer.",
"verified_exchange_no_memo": "Tienes que incluir un memo para la transferencia al exchange",
"suspended_exchange": "This exchange account is no longer active.",
"invalid_memo": "Memo for deposits to Hive-Engine/Tribaldex should start with SWAP.BLURT.",
"badactor": "Use caution sending to this account. Please double check your spelling for possible phishing.",
"memo_has_privatekey": "Please do not include what appears to be a private key or password.",
"memo_is_privatekey": "Do not use private keys in memos.",
......
......@@ -621,6 +621,8 @@
"each_account_segment_should_end_with_a_letter_or_digit": "Each account segment should end with a letter or digit.",
"each_account_segment_should_be_longer": "Each account segment should be longer.",
"verified_exchange_no_memo": "Vous devez inclure un mémo pour votre transfert vers un marché d'échanges.",
"suspended_exchange": "This exchange account is no longer active.",
"invalid_memo": "Memo for deposits to Hive-Engine/Tribaldex should start with SWAP.BLURT.",
"badactor": "Use caution sending to this account. Please double check your spelling for possible phishing.",
"memo_has_privatekey": "Please do not include what appears to be a private key or password.",
"memo_is_privatekey": "Do not use private keys in memos.",
......
......@@ -620,6 +620,8 @@
"each_account_segment_should_end_with_a_letter_or_digit": "Each account segment should end with a letter or digit.",
"each_account_segment_should_be_longer": "Each account segment should be longer.",
"verified_exchange_no_memo": "Devi includere una memo per il trasferimento.",
"suspended_exchange": "This exchange account is no longer active.",
"invalid_memo": "Memo for deposits to Hive-Engine/Tribaldex should start with SWAP.BLURT.",
"badactor": "Use caution sending to this account. Please double check your spelling for possible phishing.",
"memo_has_privatekey": "Please do not include what appears to be a private key or password.",
"memo_is_privatekey": "Do not use private keys in memos.",
......
......@@ -620,6 +620,8 @@
"each_account_segment_should_end_with_a_letter_or_digit": "Each account segment should end with a letter or digit.",
"each_account_segment_should_be_longer": "Each account segment should be longer.",
"verified_exchange_no_memo": "取引所へ送信するときはメモが必要です。",
"suspended_exchange": "This exchange account is no longer active.",
"invalid_memo": "Memo for deposits to Hive-Engine/Tribaldex should start with SWAP.BLURT.",
"badactor": "Use caution sending to this account. Please double check your spelling for possible phishing.",
"memo_has_privatekey": "Please do not include what appears to be a private key or password.",
"memo_is_privatekey": "Do not use private keys in memos.",
......
......@@ -620,6 +620,8 @@
"each_account_segment_should_end_with_a_letter_or_digit": "Each account segment should end with a letter or digit.",
"each_account_segment_should_be_longer": "Each account segment should be longer.",
"verified_exchange_no_memo": "You must include a memo for your exchange transfer.",
"suspended_exchange": "This exchange account is no longer active.",
"invalid_memo": "Memo for deposits to Hive-Engine/Tribaldex should start with SWAP.BLURT.",
"badactor": "Use caution sending to this account. Please double check your spelling for possible phishing.",
"memo_has_privatekey": "Please do not include what appears to be a private key or password.",
"memo_is_privatekey": "Do not use private keys in memos.",
......
......@@ -622,6 +622,8 @@
"each_account_segment_should_end_with_a_letter_or_digit": "Each account segment should end with a letter or digit.",
"each_account_segment_should_be_longer": "Each account segment should be longer.",
"verified_exchange_no_memo": "Musisz dodać memo w swoim transferze.",
"suspended_exchange": "This exchange account is no longer active.",
"invalid_memo": "Memo for deposits to Hive-Engine/Tribaldex should start with SWAP.BLURT.",
"badactor": "Use caution sending to this account. Please double check your spelling for possible phishing.",
"memo_has_privatekey": "Please do not include what appears to be a private key or password.",
"memo_is_privatekey": "Do not use private keys in memos.",
......
......@@ -633,6 +633,8 @@
"each_account_segment_should_end_with_a_letter_or_digit": "Each account segment should end with a letter or digit.",
"each_account_segment_should_be_longer": "Each account segment should be longer.",
"verified_exchange_no_memo": "Для перевода на биржу Вы должны указать примечание.",
"suspended_exchange": "This exchange account is no longer active.",
"invalid_memo": "Memo for deposits to Hive-Engine/Tribaldex should start with SWAP.BLURT.",
"badactor": "Use caution sending to this account. Please double check your spelling for possible phishing.",
"memo_has_privatekey": "Please do not include what appears to be a private key or password.",
"memo_is_privatekey": "Do not use private keys in memos.",
......
......@@ -621,6 +621,8 @@
"each_account_segment_should_end_with_a_letter_or_digit": "Each account segment should end with a letter or digit.",
"each_account_segment_should_be_longer": "Each account segment should be longer.",
"verified_exchange_no_memo": "如果你要转账到交易所,你必须填写备注。",
"suspended_exchange": "This exchange account is no longer active.",
"invalid_memo": "Memo for deposits to Hive-Engine/Tribaldex should start with SWAP.BLURT.",
"badactor": "Use caution sending to this account. Please double check your spelling for possible phishing.",
"memo_has_privatekey": "Please do not include what appears to be a private key or password.",
"memo_is_privatekey": "Do not use private keys in memos.",
......
import tt from 'counterpart';
import BadActorList from 'app/utils/BadActorList';
import VerifiedExchangeList from 'app/utils/VerifiedExchangeList';
import SuspendedExchangeList from 'app/utils/SuspendedExchangeList';
import { PrivateKey, PublicKey } from '@blurtfoundation/blurtjs/lib/auth/ecc';
export function validate_account_name(value) {
......@@ -63,6 +64,12 @@ export function validate_account_name_with_memo(name, memo) {
if (VerifiedExchangeList.includes(name) && !memo) {
return tt('chainvalidation_js.verified_exchange_no_memo');
}
if (SuspendedExchangeList.includes(name)) {
return tt('chainvalidation_js.suspended_exchange');
}
if (name == 'blurt-swap' && memo && !memo.startsWith('SWAP.BLURT')) {
return tt('chainvalidation_js.invalid_memo');
}
return validate_account_name(name);
}
......
const list = `
bittrex
blocktrades
changelly
deepcrypto8
gopax-deposit
hitbtc-exchange
poloniex
upbit-exchange
onepagex
blurtlink
`
.trim()
.split('\n');
export default list;
const list = `
bittrex
blocktrades
changelly
deepcrypto8
gopax-deposit
hitbtc-exchange
poloniex
upbit-exchange
onepagex
ionomy
probitblurt
blurtlink
blurt-swap
stexofficial
`
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment