add usage to wallets table

This commit is contained in:
Matias Alejo Garcia 2014-12-01 17:21:39 -03:00
commit 2402a22f0a
5 changed files with 81 additions and 7 deletions

View file

@ -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);
});