Skip to content

Commit

Permalink
Address without prefix not working bug fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
spasma committed Sep 27, 2018
1 parent dba95d0 commit 4015ad0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/js/controllers/tab-scan.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ angular.module('copayApp.controllers').controller('tabScanController', function(
});

function handleSuccessfulScan(contents){
$log.debug('Scan returned: "' + contents + '"');
$log.debug('Scan returned: ', contents);
scannerService.pausePreview();
// Sometimes (testing in Chrome, when reading QR Code) data is an object
// that has a string data.result.
Expand Down
4 changes: 2 additions & 2 deletions src/js/directives/incomingDataMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ angular.module('copayApp.directives')
scope.type = "url";
} else if (scope.data.parsed.publicAddress) {
scope.type = "bitcoinAddress";
var prefix = scope.data.parsed.isTestnet ? 'bchtest:' : 'bitcoincash:';
scope.data.toAddress = (prefix + scope.data.parsed.publicAddress.cashAddr) || scope.data.parsed.publicAddress.legacy || scope.data.parsed.publicAddress.bitpay;
var prefix = scope.data.coin === 'bch' ? (scope.data.parsed.isTestnet ? 'bchtest:' : 'bitcoincash:') : '';
scope.data.toAddress = (scope.data.parsed.publicAddress.cashAddr ? prefix + scope.data.parsed.publicAddress.cashAddr : false) || scope.data.parsed.publicAddress.legacy || scope.data.parsed.publicAddress.bitpay;
} else {
scope.type = "text";
}
Expand Down

0 comments on commit 4015ad0

Please sign in to comment.