From d64b4c335c03ebba683ed7447b4bb2c444146eae Mon Sep 17 00:00:00 2001 From: Kadir Sekha Date: Wed, 31 Jan 2018 15:35:52 -0400 Subject: [PATCH] fixed bug which was stopping sending to contacts --- src/js/controllers/tab-send.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/js/controllers/tab-send.js b/src/js/controllers/tab-send.js index 20e36fdbf..489d7c4e7 100644 --- a/src/js/controllers/tab-send.js +++ b/src/js/controllers/tab-send.js @@ -189,6 +189,13 @@ angular.module('copayApp.controllers').controller('tabSendController', function( //Error is already formated return popupService.showAlert(err); } + + if (item.recipientType && item.recipientType == 'contact') { + if (addr.indexOf('bch') == 0 || addr.indexOf('btc') == 0) { + addr = addr.substring(3); + } + } + $log.debug('Got toAddress:' + addr + ' | ' + item.name); return $state.transitionTo('tabs.send.amount', { recipientType: item.recipientType, @@ -197,7 +204,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function( toEmail: item.email, toColor: item.color, coin: item.coin - }) + }); }); }); };