adding to pin modal to resume

This commit is contained in:
Gabriel Bazán 2017-05-09 12:19:08 -03:00
commit 282f549ed0
4 changed files with 310 additions and 12 deletions

View file

@ -17,7 +17,7 @@ angular.module('copayApp.services').factory('glideraService', function($http, $l
* Development: 'testnet'
* Production: 'livenet'
*/
credentials.NETWORK = 'livenet';
credentials.NETWORK = 'testnet';
//credentials.NETWORK = 'testnet';
if (credentials.NETWORK == 'testnet') {
@ -127,7 +127,7 @@ angular.module('copayApp.services').factory('glideraService', function($http, $l
});
});
});
});
});
};
var _get = function(endpoint, token) {
@ -365,7 +365,7 @@ angular.module('copayApp.services').factory('glideraService', function($http, $l
getPermissions(accessToken, credentials.NETWORK, true, function(err, permissions) {
if (err) return cb(err);
storageService.getGlideraStatus(credentials.NETWORK, function(err, status) {
if (lodash.isString(status)) status = JSON.parse(status);
storageService.getGlideraTxs(credentials.NETWORK, function(err, txs) {
@ -386,17 +386,21 @@ angular.module('copayApp.services').factory('glideraService', function($http, $l
root.updateStatus = function(data) {
storageService.getGlideraToken(credentials.NETWORK, function(err, accessToken) {
if (err) return;
getPermissions(accessToken, credentials.NETWORK, false, function(err, permissions) {
if (err) return;
data.permissions = permissions;
data.price = {};
root.buyPrice(accessToken, {qty: 1}, function(err, buy) {
root.buyPrice(accessToken, {
qty: 1
}, function(err, buy) {
if (err) return;
data.price['buy'] = buy.price;
});
root.sellPrice(accessToken, {qty: 1}, function(err, sell) {
root.sellPrice(accessToken, {
qty: 1
}, function(err, sell) {
if (err) return;
data.price['sell'] = sell.price;
});
@ -405,12 +409,12 @@ angular.module('copayApp.services').factory('glideraService', function($http, $l
if (err) return;
data.status = status;
storageService.setGlideraStatus(credentials.NETWORK, JSON.stringify(status), function() {});
});
});
root.getLimits(accessToken, function(err, limits) {
data.limits = limits;
});
});
if (permissions.transaction_history) {
root.getTransactions(accessToken, function(err, txs) {
if (err) return;
@ -431,8 +435,8 @@ angular.module('copayApp.services').factory('glideraService', function($http, $l
data.personalInfo = info;
});
}
});
});
});
});
};
var register = function() {