fix storage name log

This commit is contained in:
JDonadio 2017-02-21 16:27:51 -05:00
commit 867e7535de

View file

@ -3,14 +3,19 @@ angular.module('copayApp.services')
.factory('storageService', function(logHeader, fileStorageService, localStorageService, sjcl, $log, lodash, platformInfo, $timeout) { .factory('storageService', function(logHeader, fileStorageService, localStorageService, sjcl, $log, lodash, platformInfo, $timeout) {
var root = {}; var root = {};
var storage;
// File storage is not supported for writing according to // File storage is not supported for writing according to
// https://github.com/apache/cordova-plugin-file/#supported-platforms // https://github.com/apache/cordova-plugin-file/#supported-platforms
var shouldUseFileStorage = platformInfo.isCordova && !platformInfo.isWP; var shouldUseFileStorage = platformInfo.isCordova && !platformInfo.isWP;
$log.debug('Using file storage:', shouldUseFileStorage);
if (shouldUseFileStorage) {
var storage = shouldUseFileStorage ? fileStorageService : localStorageService; $log.debug('Using: FileStorage');
storage = fileStorageService;
} else {
$log.debug('Using: LocalStorage');
storage = localStorageService;
}
var getUUID = function(cb) { var getUUID = function(cb) {
// TO SIMULATE MOBILE // TO SIMULATE MOBILE
@ -483,7 +488,7 @@ angular.module('copayApp.services')
storage.get('bitpayAccounts-v2-' + network, function(err, allAccountsStr) { storage.get('bitpayAccounts-v2-' + network, function(err, allAccountsStr) {
if (err) return cb(err); if (err) return cb(err);
if (!allAccountsStr) if (!allAccountsStr)
return cb(null, {}); return cb(null, {});
var allAccounts = {}; var allAccounts = {};