have address type toggle on send and receive for bch

This commit is contained in:
Kadir Sekha 2018-01-31 12:23:44 -04:00
commit c239aa5714
3 changed files with 31 additions and 4 deletions

View file

@ -117,6 +117,7 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
}
$scope.btx = txFormatService.processTx($scope.wallet.coin, tx);
$scope.addressDisplayType = 'legacy';
var cashaddrDate = new Date(2018, 0, 15);
var txDate = new Date(($scope.btx.createdOn || $scope.btx.time) * 1000);
@ -132,6 +133,9 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
o.cashAddr = bchAddresses.cashaddr;
});
}
$scope.canToggleAddressType = true;
$scope.addressDisplayType = 'cashAddr';
}
$scope.btx.displayAddress = $scope.btx.addressTo;
@ -245,4 +249,8 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
}
};
$scope.displayAddress = function(type) {
$scope.addressDisplayType = type;
}
});