diff --git a/controllers/send-widget.controller.es6 b/controllers/send-widget.controller.es6 index 918d762..827924d 100644 --- a/controllers/send-widget.controller.es6 +++ b/controllers/send-widget.controller.es6 @@ -126,8 +126,14 @@ export default class SendWidgetController { this.memoBlocked = false; } - if (this.destination in knownAccounts && knownAccounts[this.destination].memo_required) { + if (this.destination in knownAccounts && knownAccounts[this.destination].requiredMemoType) { this.memo = true; + this.memoType = knownAccounts[this.destination].requiredMemoType; + let alert = new Alert({ + text: 'The payment destination (' + knownAccounts[this.destination].name +') requires you to specify a memo to identify your account.', + type: Alert.TYPES.WARNING + }); + this.memoAlertGroup.show(alert); } this.loadingDestination = false; @@ -209,18 +215,6 @@ export default class SendWidgetController { this.amountAlertGroup.show(alert); } - // check if the destination requires a memo - if (this.destination in knownAccounts && knownAccounts[this.destination].memo_required && !this.memoValue) { - let alert = new Alert({ - title: '', - text: 'The payment destination (' + knownAccounts[this.destination].name +') requires you to specify a memo to identify your account.', - type: Alert.TYPES.ERROR - }); - this.memoAlertGroup.show(alert); - this.sending = false; - return; - } - if (this.memo) { let memo, memoError; try { diff --git a/known_accounts.es6 b/known_accounts.es6 index 153ecc6..f5b88c2 100644 --- a/known_accounts.es6 +++ b/known_accounts.es6 @@ -1,27 +1,27 @@ const knownAccounts = { 'GCGNWKCJ3KHRLPM3TM6N7D3W5YKDJFL6A2YCXFXNMRTZ4Q66MEMZ6FI2': { name: 'Poloniex', - memo_required: true + requiredMemoType: 'MEMO_ID' }, 'GA5XIGA5C7QTPTWXQHY6MCJRMTRZDOSHR6EFIBNDQTCQHG262N4GGKTM': { name: 'Kraken', - memo_required: true + requiredMemoType: 'MEMO_ID' }, 'GB6YPGW5JFMMP2QB2USQ33EUWTXVL4ZT5ITUNCY3YKVWOJPP57CANOF3': { name: 'Bittrex', - memo_required: true + requiredMemoType: 'MEMO_TEXT' }, 'GB7GRJ5DTE3AA2TCVHQS2LAD3D7NFG7YLTOEWEBVRNUUI2Q3TJ5UQIFM': { name: 'BTC38', - memo_required: true + requiredMemoType: 'MEMO_ID' }, 'GBV4ZDEPNQ2FKSPKGJP2YKDAIZWQ2XKRQD4V4ACH3TCTFY6KPY3OAVS7': { name: 'Changelly', - memo_required: true + requiredMemoType: 'MEMO_ID' }, 'GC4KAS6W2YCGJGLP633A6F6AKTCV4WSLMTMIQRSEQE5QRRVKSX7THV6S': { name: 'BitcoinIndonesia', - memo_required: true + requiredMemoType: 'MEMO_TEXT' } }; export default knownAccounts;