remove protocolHandler, only apply on bitcoincash: + support legacy&bitpay address types
This commit is contained in:
parent
c63bc06c76
commit
6b20a01e25
2 changed files with 3 additions and 2 deletions
|
|
@ -75,7 +75,7 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
|||
}
|
||||
|
||||
try {
|
||||
clipboardService.copyToClipboard($scope.protocolHandler + ":" + $scope.addr);
|
||||
clipboardService.copyToClipboard($scope.wallet.coin == 'bch' && $scope.bchAddressType.type == 'cashaddr' ? 'bitcoincash:' + $scope.addr : $scope.addr);
|
||||
} catch (error) {
|
||||
$log.debug("Error copying to clipboard:");
|
||||
$log.debug(error);
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@
|
|||
angular.module('copayApp.services').factory('clipboardService', function ($http, $log, platformInfo, nodeWebkitService, gettextCatalog, ionicToast, clipboard) {
|
||||
var root = {};
|
||||
|
||||
root.copyToClipboard = function (data, scope) {
|
||||
root.copyToClipboard = function (data) {
|
||||
if (!data) return;
|
||||
|
||||
$log.debug("Copy '"+data+"' to clipboard");
|
||||
if (platformInfo.isCordova) {
|
||||
cordova.plugins.clipboard.copy(data);
|
||||
} else if (platformInfo.isNW) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue