add warning for old wallets

This commit is contained in:
Matias Alejo Garcia 2014-10-11 14:33:45 -03:00
parent dd0dc9c6ad
commit 29bbfa184c
9 changed files with 8 additions and 48 deletions

View File

@ -13,9 +13,7 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
}, function(anyWallet) {
$scope.retreiving = false;
$scope.anyProfile = anyProfile;
console.log('[createProfile.js.15:anyProfile:]',anyProfile); //TODO
$scope.anyWallet = anyWallet;
console.log('[createProfile.js.17:anyWallet:]',anyWallet); //TODO
});
});
@ -32,7 +30,7 @@ console.log('[createProfile.js.17:anyWallet:]',anyWallet); //TODO
network: config.network,
networkName: config.networkName,
walletDefaults: config.wallet,
passphrase: config.passphrase,
passphraseConfig: config.passphraseConfig,
}, function(err, iden, firstWallet) {
controllerUtils.bindProfile($scope, iden, firstWallet);
});

View File

@ -24,7 +24,7 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc
network: config.network,
networkName: config.networkName,
walletDefaults: config.wallet,
passphrase: config.passphrase,
passphraseConfig: config.passphraseConfig,
}, function(err, iden, firstWallet) {
if (err && !iden) {
console.log('Error:' + err)

View File

@ -45,8 +45,8 @@ Profile.create = function(email, password, storage, cb) {
Profile.any = function(storage, cb) {
storage.getFirst(Profile.key(''), function(err, val) {
return cb(val ? true : false);
storage.getFirst(Profile.key(''), function(err, v, k) {
return cb(k ? true : false);
});
};

View File

@ -163,7 +163,7 @@ Storage.prototype.getFirst = function(prefix, cb) {
});
if (keys.length === 0) return cb(new Error('not found'));
self._read(keys[0], function(v) {
if (_.isNull(v)) return cb(new Error('Could not decrypt data'));
if (_.isNull(v)) return cb(new Error('Could not decrypt data'), null, keys[0]);
return cb(null, v, keys[0]);
})
});

View File

@ -174,8 +174,8 @@ Wallet.key = function(str) {
Wallet.any = function(storage, cb) {
storage.getFirst(Wallet.key(''), function(err, val) {
return cb(val ? true : false);
storage.getFirst(Wallet.key(''), function(err, v, k) {
return cb(k ? true : false);
});
};

View File

@ -14,10 +14,6 @@ angular
templateUrl: 'views/createProfile.html',
validate: false
})
.when('/open', {
templateUrl: 'views/open.html',
validate: false
})
.when('/join', {
templateUrl: 'views/join.html',
validate: true

View File

@ -4,7 +4,7 @@
<i class="size-36 fi-alert"></i>
</div>
<div>
Copay now needs a profile to access your wallets. <br>
Copay now needs a profile to access wallets. <br>
You can import current your wallets after creating your profile.
</div>
</div>

View File

@ -1,6 +1,5 @@
<div class="home" ng-controller="HomeController">
<p>( TODO: if user has wallets (wallet::) show message: Copay now needs a profile to ... , you can import your wallets after creating your profile )
<div data-alert class="loading-screen" ng-show="retreiving">
<i class="size-60 fi-bitcoin-circle icon-rotate spinner"></i>
Retreiving information from storage...

View File

@ -1,33 +0,0 @@
<div class="open" ng-controller="OpenController">
<div data-alert class="loading-screen" ng-show="retreiving">
<i class="size-60 fi-bitcoin-circle icon-rotate spinner"></i>
Retreiving information from storage...
</div>
<div data-alert class="loading-screen" ng-show="loading && !failure && !retreiving">
<i class="size-60 fi-bitcoin-circle icon-rotate spinner"></i>
<span translate>Connecting...</span>
</div>
<div class="row" ng-show="!loading && !retreiving">
<div class="large-4 columns logo-setup">
<img src="img/logo-negative-beta.svg" alt="Copay" width="146" height="59">
<div ng-include="'views/includes/version.html'"></div>
</div>
<div class="large-8 columns">
<div class="box-setup">
<h1 translate class="text-white line-sidebar-b">Open Wallet</h1>
<form name="openForm" ng-submit="open(openForm)" novalidate>
<select class="form-control" ng-model="selectedWalletId" ng-options="w.id as w.show for w in wallets" required>
</select>
<input type="password" class="form-control"
placeholder="{{'Your password'|translate}}" name="openPassword" ng-model="openPassword" required>
<div class="text-right m20t">
<a href="#!/" class="back-button text-white m20r">&laquo; <span translate>Back</span></a>
<button translate type="submit" class="button white m0" ng-disabled="openForm.$invalid || loading">Open</button>
</div>
</form>
</div>
</div>
</div> <!-- End !loading -->
</div>