add usage to wallets table
This commit is contained in:
parent
b096fd50a7
commit
2402a22f0a
5 changed files with 81 additions and 7 deletions
|
|
@ -67,6 +67,21 @@ angular.module('copayApp.services')
|
|||
|
||||
};
|
||||
|
||||
root.setServerStatus = function(headers) {
|
||||
if (!headers)
|
||||
return;
|
||||
|
||||
if (headers['X-Email-Needs-Validation'])
|
||||
$rootScope.needsEmailConfirmation = true;
|
||||
else
|
||||
$rootScope.needsEmailConfirmation = null;
|
||||
|
||||
if (headers['X-Quota-Per-Item'])
|
||||
$rootScope.quotaPerItem = parseInt(headers['X-Quota-Per-Item']);
|
||||
|
||||
if (headers['X-Quota-Items-Limit'])
|
||||
$rootScope.quotaItems = parseInt(headers['X-Quota-Items-Limit']);
|
||||
};
|
||||
|
||||
root.open = function(email, password, cb) {
|
||||
var opts = {
|
||||
|
|
@ -81,6 +96,7 @@ angular.module('copayApp.services')
|
|||
|
||||
copay.Identity.open(opts, function(err, iden, headers) {
|
||||
if (err) return cb(err);
|
||||
root.setServerStatus(headers);
|
||||
root.bind(iden);
|
||||
return cb(null, iden);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue