clear scope scanned data
This commit is contained in:
parent
d7a2eeafa8
commit
132a5a3efb
2 changed files with 9 additions and 11 deletions
|
|
@ -50,19 +50,19 @@
|
|||
<span translate>Type the Recovery Phrase (usually 12 words)</span>:
|
||||
</label>
|
||||
|
||||
<div class="qr-scanner-input-import" ng-show="!fromQR">
|
||||
<div class="qr-scanner-input-import" ng-show="!dataFromQR">
|
||||
<qr-scanner on-scan="processWalletInfo(data)"></qr-scanner>
|
||||
</div>
|
||||
|
||||
<div class="lock-fromQR">
|
||||
<div ng-show="fromQR" class="left m10l">
|
||||
<div class="lock-fromQR" ng-show="dataFromQR">
|
||||
<div class="left m10l">
|
||||
<i class="fi-lock color-greeni"></i>
|
||||
</div>
|
||||
<div ng-show="fromQR" class="right icon-close-import" ng-click="fromQR = null">
|
||||
<div class="right icon-close-import" ng-click="dataFromQR = null">
|
||||
<i class="icon-close-circle size-14"></i>
|
||||
</div>
|
||||
</div>
|
||||
<textarea class="form-control m10t" ng-disabled="fromQR" name="words" ng-model="words" rows="2" autocapitalize="off" spellcheck="false"></textarea>
|
||||
<textarea class="form-control m10t" ng-disabled="dataFromQR" name="words" ng-model="words" rows="2" autocapitalize="off" spellcheck="false"></textarea>
|
||||
|
||||
<div class="m10t oh" ng-init="hideAdv=true">
|
||||
<a class="button outline light-gray expand tiny p10i" ng-click="hideAdv=!hideAdv">
|
||||
|
|
|
|||
|
|
@ -8,12 +8,11 @@ angular.module('copayApp.controllers').controller('importController',
|
|||
var reader = new FileReader();
|
||||
var defaults = configService.getDefaults();
|
||||
var errors = bwcService.getErrors();
|
||||
var dataFromQR = null;
|
||||
$scope.dataFromQR = null;
|
||||
$scope.bwsurl = defaults.bws.url;
|
||||
$scope.derivationPath = derivationPathHelper.default;
|
||||
$scope.account = 1;
|
||||
$scope.importErr = false;
|
||||
$scope.fromQR = null;
|
||||
|
||||
var updateSeedSourceSelect = function() {
|
||||
$scope.seedOptions = [];
|
||||
|
|
@ -35,7 +34,7 @@ angular.module('copayApp.controllers').controller('importController',
|
|||
};
|
||||
|
||||
$scope.processWalletInfo = function(code) {
|
||||
$scope.fromQR = null;
|
||||
$scope.dataFromQR = null;
|
||||
$scope.importErr = false;
|
||||
$scope.error = null;
|
||||
var parsedCode = code.split('|');
|
||||
|
|
@ -60,9 +59,8 @@ angular.module('copayApp.controllers').controller('importController',
|
|||
$scope.testnetEnabled = info.network == 'testnet' ? true : false;
|
||||
|
||||
$timeout(function() {
|
||||
$scope.fromQR = true;
|
||||
$scope.words = null;
|
||||
dataFromQR = info.data;
|
||||
$scope.dataFromQR = info.data;
|
||||
$rootScope.$apply();
|
||||
}, 1);
|
||||
};
|
||||
|
|
@ -251,7 +249,7 @@ angular.module('copayApp.controllers').controller('importController',
|
|||
opts.networkName = pathData.networkName;
|
||||
opts.derivationStrategy = pathData.derivationStrategy;
|
||||
|
||||
var words = form.words.$modelValue || dataFromQR;
|
||||
var words = form.words.$modelValue || $scope.dataFromQR;
|
||||
$scope.error = null;
|
||||
|
||||
if (!words) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue