Merge pull request #188 from Bitcoin-com/wallet/sprint/17
Upgrade the branch 335 from Wallet/sprint/17
This commit is contained in:
commit
89ad8f46b4
23 changed files with 1931 additions and 108 deletions
11
Gruntfile.js
11
Gruntfile.js
|
|
@ -165,11 +165,22 @@ module.exports = function(grunt) {
|
|||
src: [
|
||||
'src/js/app.js',
|
||||
'src/js/routes.js',
|
||||
|
||||
'src/js/directives/*.js',
|
||||
'!src/js/directives/*.spec.js',
|
||||
|
||||
'src/js/filters/*.js',
|
||||
'!src/js/filters/*.spec.js',
|
||||
|
||||
'src/js/models/*.js',
|
||||
'!src/js/models/*.spec.js',
|
||||
|
||||
'src/js/services/*.js',
|
||||
'!src/js/services/*.spec.js',
|
||||
|
||||
'src/js/controllers/**/*.js',
|
||||
'!src/js/controllers/**/*.spec.js',
|
||||
|
||||
'src/js/translations.js',
|
||||
'src/js/appConfig.js',
|
||||
'src/js/externalServices.js',
|
||||
|
|
|
|||
|
|
@ -72,6 +72,8 @@
|
|||
<plugin name="cordova-plugin-queries-schemes" spec="~0.1.5" />
|
||||
<plugin name="cordova-plugin-firebase" spec="https://github.com/arnesson/cordova-plugin-firebase.git" />
|
||||
<plugin name="cordova-plugin-wkwebview-inputfocusfix" spec="https://github.com/onderceylan/cordova-plugin-wkwebview-inputfocusfix.git" />
|
||||
<!-- Changes in error descriptions may break the use of cordova-plugin-secure-storage -->
|
||||
<plugin name="cordova-plugin-secure-storage" spec="2.6.8" />
|
||||
<!-- Supported Platforms -->
|
||||
<engine name="ios" spec="~4.5.3" />
|
||||
<engine name="android" spec="~6.3.0" />
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@
|
|||
"apply:copay": "npm i fs-extra && cd app-template && node apply.js copay && npm i && cordova prepare",
|
||||
"apply:bitpay": "npm i fs-extra && cd app-template && node apply.js bitpay && npm i && cordova prepare",
|
||||
"apply:bitcoincom": "npm i fs-extra && cd app-template && node apply.js bitcoincom && npm i && cordova prepare",
|
||||
"test": "echo \"no package tests configured\"",
|
||||
"test": "karma start test/karma.conf.js --single-run",
|
||||
"clean": "trash platforms && trash plugins && cordova prepare",
|
||||
"unstage-package": "git reset package.json",
|
||||
"clean-all": "git clean -dfx"
|
||||
|
|
@ -127,6 +127,10 @@
|
|||
"cordova": "^6.3.1",
|
||||
"grunt": "^1.0.1",
|
||||
"ionic": "^3.6.0",
|
||||
"jasmine-core": "^3.1.0",
|
||||
"karma": "^2.0.2",
|
||||
"karma-chrome-launcher": "^2.2.0",
|
||||
"karma-jasmine": "^1.1.2",
|
||||
"trash-cli": "^1.4.0",
|
||||
"lodash": "^4.17.4",
|
||||
"pre-commit": "^1.1.3"
|
||||
|
|
|
|||
|
|
@ -60,11 +60,14 @@ angular.module('copayApp.controllers').controller('tabScanController', function(
|
|||
});
|
||||
|
||||
$scope.$on("$ionicView.afterEnter", function() {
|
||||
var capabilities = scannerService.getCapabilities();
|
||||
if (capabilities.hasPermission) {
|
||||
// try initializing and refreshing status any time the view is entered
|
||||
if(!scannerService.isInitialized()) {
|
||||
scannerService.gentleInitialize();
|
||||
}
|
||||
activate();
|
||||
}
|
||||
});
|
||||
|
||||
function activate(){
|
||||
|
|
|
|||
|
|
@ -9,12 +9,12 @@ function Profile() {
|
|||
this.version = '1.0.0';
|
||||
};
|
||||
|
||||
Profile.create = function(opts) {
|
||||
opts = opts || {};
|
||||
Profile.create = function(appVersion) {
|
||||
|
||||
var x = new Profile();
|
||||
x.appVersion = appVersion;
|
||||
x.createdOn = Date.now();
|
||||
x.credentials = opts.credentials || [];
|
||||
x.credentials = [];
|
||||
x.disclaimerAccepted = true;
|
||||
x.checked = {};
|
||||
return x;
|
||||
|
|
@ -23,6 +23,7 @@ Profile.create = function(opts) {
|
|||
Profile.fromObj = function(obj) {
|
||||
var x = new Profile();
|
||||
|
||||
x.appVersion = obj.appVersion;
|
||||
x.createdOn = obj.createdOn;
|
||||
x.credentials = obj.credentials;
|
||||
x.disclaimerAccepted = obj.disclaimerAccepted;
|
||||
|
|
@ -62,6 +63,39 @@ Profile.prototype.isDeviceChecked = function(ua) {
|
|||
return this.checkedUA == ua;
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {Profile} other
|
||||
*/
|
||||
Profile.prototype.merge = function(other) {
|
||||
|
||||
var newCredentials = [];
|
||||
var otherCredentialsLength = other.credentials.length;
|
||||
var thisProfile = this;
|
||||
|
||||
other.credentials.forEach(function(otherCredential) {
|
||||
var credentialExists = false;
|
||||
thisProfile.credentials.forEach(function(thisCredential) {
|
||||
if (otherCredential.walletId === thisCredential.walletId) {
|
||||
credentialExists = true;
|
||||
}
|
||||
});
|
||||
if (!credentialExists) {
|
||||
newCredentials.push(otherCredential);
|
||||
}
|
||||
});
|
||||
|
||||
Array.prototype.push.apply(this.credentials, newCredentials);
|
||||
};
|
||||
|
||||
/**
|
||||
* It's a simple operation, but it means that all the profile logic stays
|
||||
* in this file.
|
||||
* @param {string} appVersion - ie "4.11.0"
|
||||
*/
|
||||
Profile.prototype.setAppVersion = function(appVersion) {
|
||||
this.appVersion = appVersion;
|
||||
}
|
||||
|
||||
Profile.prototype.setChecked = function(ua, walletId) {
|
||||
if (this.checkedUA != ua) {
|
||||
|
|
|
|||
|
|
@ -115,8 +115,8 @@ angular.module('copayApp.services').factory('configService', function(storageSer
|
|||
|
||||
bitcoinAlias: 'btc',
|
||||
bitcoinCashAlias: 'bch',
|
||||
bitcoinWalletColor: '#fab915', // Observatory
|
||||
bitcoinCashWalletColor: '#26B03C', // Dollar Green
|
||||
bitcoinWalletColor: '#535353', // Dark Grey
|
||||
bitcoinCashWalletColor: '#eeb640', // Observatory
|
||||
|
||||
homeSectionIsHidden: {
|
||||
services: false
|
||||
|
|
|
|||
6
src/js/services/desktopSecureStorageService.js
Normal file
6
src/js/services/desktopSecureStorageService.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.services').factory('desktopSecureStorageService', function($log) {
|
||||
// Placeholder
|
||||
return {};
|
||||
});
|
||||
|
|
@ -20,8 +20,7 @@ angular.module('copayApp.services')
|
|||
if (isChromeApp || isNW) {
|
||||
chrome.storage.local.get(k,
|
||||
function(data) {
|
||||
//TODO check for errors
|
||||
return cb(null, data[k]);
|
||||
return cb(chrome.runtime.lastError, data[k]);
|
||||
});
|
||||
} else {
|
||||
return cb(null, ls.getItem(k));
|
||||
|
|
@ -56,16 +55,24 @@ angular.module('copayApp.services')
|
|||
|
||||
obj[k] = v;
|
||||
|
||||
chrome.storage.local.set(obj, cb);
|
||||
chrome.storage.local.set(obj, function(){
|
||||
cb(chrome.runtime.lastError);
|
||||
});
|
||||
} else {
|
||||
try {
|
||||
ls.setItem(k, v);
|
||||
} catch (e) {
|
||||
return cb(e);
|
||||
}
|
||||
return cb();
|
||||
}
|
||||
};
|
||||
|
||||
root.remove = function(k, cb) {
|
||||
if (isChromeApp || isNW) {
|
||||
chrome.storage.local.remove(k, cb);
|
||||
chrome.storage.local.remove(k, function(){
|
||||
cb(chrome.runtime.lastError);
|
||||
});
|
||||
} else {
|
||||
ls.removeItem(k);
|
||||
return cb();
|
||||
|
|
|
|||
88
src/js/services/mobileSecureStorageService.js
Normal file
88
src/js/services/mobileSecureStorageService.js
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.services').factory('mobileSecureStorageService', function($log, appConfigService, platformInfo) {
|
||||
var root = {};
|
||||
|
||||
var isReady = false;
|
||||
var initialisationFailed = false;
|
||||
var pending = [];
|
||||
|
||||
var storage = null;
|
||||
|
||||
if (platformInfo.isCordova) {
|
||||
storage = new cordova.plugins.SecureStorage(
|
||||
function () {
|
||||
isReady = true;
|
||||
for (var i = 0; i < pending.length; i++) {
|
||||
pending[i]();
|
||||
}
|
||||
pending = [];
|
||||
},
|
||||
function (error) {
|
||||
initialisationFailed = true;
|
||||
},
|
||||
appConfigService.packageNameId);
|
||||
}
|
||||
|
||||
root.get = function(key, cb) {
|
||||
|
||||
if (!platformInfo.isMobile) {
|
||||
cb(new Error('mobileSecureStorageService is only available on mobile.'));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isReady) {
|
||||
if (initialisationFailed) {
|
||||
cb(new Error('mobileSecureStorageService initialisation failed.'));
|
||||
} else {
|
||||
pending.push(function(){ root.get(key, cb); });
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
storage.get(
|
||||
function (value) {
|
||||
cb(null, value);
|
||||
},
|
||||
function (error) {
|
||||
$log.debug('mss get failed. ' + error);
|
||||
if (error.message === 'Failure in SecureStorage.get() - The specified item could not be found in the keychain' || // iOS
|
||||
error.message === 'Key [_SS_profile] not found.') { // Android
|
||||
// The callback expects no error, but also no value, if it cannot be found.
|
||||
cb(null, null);
|
||||
} else {
|
||||
cb(new Error(error));
|
||||
}
|
||||
},
|
||||
key);
|
||||
};
|
||||
|
||||
root.set = function(key, value, cb) {
|
||||
|
||||
if (!platformInfo.isMobile) {
|
||||
cb(new Error('mobileSecureStorageService is only available on mobile.'));
|
||||
}
|
||||
|
||||
if (!isReady) {
|
||||
if (initialisationFailed) {
|
||||
cb(new Error('mobileSecureStorageService initialisation failed.'));
|
||||
} else {
|
||||
pending.push(function(){ root.set(key, value, cb); });
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
storage.set(
|
||||
function (value) {
|
||||
cb();
|
||||
},
|
||||
function (error) {
|
||||
cb(new Error(error));
|
||||
},
|
||||
key, value);
|
||||
|
||||
};
|
||||
|
||||
return root;
|
||||
});
|
||||
|
||||
|
|
@ -706,7 +706,7 @@ angular.module('copayApp.services')
|
|||
configService.get(function(err) {
|
||||
if (err) $log.debug(err);
|
||||
|
||||
var p = Profile.create();
|
||||
var p = Profile.create(appConfigService.version);
|
||||
storageService.storeNewProfile(p, function(err) {
|
||||
if (err) return cb(err);
|
||||
root.bindProfile(p, function(err) {
|
||||
|
|
|
|||
53
src/js/services/rateService.spec.js
Normal file
53
src/js/services/rateService.spec.js
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
describe('rateService', function() {
|
||||
var $httpBackend, rateService, requestHandler;
|
||||
|
||||
beforeEach(function() {
|
||||
module('ngLodash');
|
||||
module('copayApp.services');
|
||||
|
||||
inject(function($injector){
|
||||
$httpBackend = $injector.get('$httpBackend');
|
||||
|
||||
requestHandler = $httpBackend.when('GET', 'https://www.bitcoin.com/special/rates.json')
|
||||
.respond([
|
||||
{
|
||||
"code": "BTC",
|
||||
"name": "Bitcoin",
|
||||
"rate": 1
|
||||
},
|
||||
{
|
||||
"code": "BCH_BTC",
|
||||
"name": "Bitcoin Cash",
|
||||
"rate": 6.739397
|
||||
},
|
||||
{
|
||||
"code": "USD",
|
||||
"name": "US Dollar",
|
||||
"rate": 7602.04
|
||||
}
|
||||
]);
|
||||
|
||||
rateService = $injector.get('rateService');
|
||||
|
||||
$httpBackend.flush();
|
||||
});
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
$httpBackend.verifyNoOutstandingExpectation();
|
||||
$httpBackend.verifyNoOutstandingRequest();
|
||||
});
|
||||
|
||||
it('get rates', function() {
|
||||
|
||||
$httpBackend.expectGET('https://www.bitcoin.com/special/rates.json');
|
||||
|
||||
rateService.updateRates();
|
||||
|
||||
$httpBackend.flush();
|
||||
|
||||
var usdRate = rateService.getRate('USD');
|
||||
|
||||
expect(usdRate).toEqual(7602.04);
|
||||
});
|
||||
});
|
||||
32
src/js/services/secureStorageService.js
Normal file
32
src/js/services/secureStorageService.js
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.services').factory('secureStorageService', function(desktopSecureStorageService, localStorageService, $log, mobileSecureStorageService, platformInfo) {
|
||||
var root = {};
|
||||
|
||||
// To make wrong code look wrong
|
||||
function alteredKeyIndicatingDesireForSecureStorage(key) {
|
||||
return key + ":desiredSecure";
|
||||
}
|
||||
|
||||
root.get = function(k, cb) {
|
||||
if (platformInfo.isMobile) {
|
||||
mobileSecureStorageService.get(k, cb);
|
||||
} else if (platformInfo.isNW) {
|
||||
desktopSecureStorageService.get(k, cb);
|
||||
} else { // Browser
|
||||
localStorageService.get(alteredKeyIndicatingDesireForSecureStorage(k), cb);
|
||||
}
|
||||
}
|
||||
|
||||
root.set = function(k, v, cb) {
|
||||
if (platformInfo.isMobile) {
|
||||
mobileSecureStorageService.set(k, v, cb);
|
||||
} else if (platformInfo.isNW) {
|
||||
desktopSecureStorageService.set(k, v, cb);
|
||||
} else { // Browser
|
||||
localStorageService.set(alteredKeyIndicatingDesireForSecureStorage(k), v, cb);
|
||||
}
|
||||
}
|
||||
|
||||
return root;
|
||||
});
|
||||
308
src/js/services/secureStorageService.spec.js
Normal file
308
src/js/services/secureStorageService.spec.js
Normal file
|
|
@ -0,0 +1,308 @@
|
|||
describe('secureStorageService in browser', function(){
|
||||
var localStorage,
|
||||
sss;
|
||||
|
||||
beforeEach(function(){
|
||||
module('ngLodash');
|
||||
module('copayApp.services');
|
||||
|
||||
localStorage = {
|
||||
get: jasmine.createSpy(),
|
||||
set: jasmine.createSpy()
|
||||
};
|
||||
|
||||
platformInfoStub = {
|
||||
};
|
||||
|
||||
module(function($provide) {
|
||||
$provide.value('localStorageService', localStorage);
|
||||
$provide.value('platformInfo', platformInfoStub);
|
||||
});
|
||||
|
||||
inject(function($injector){
|
||||
sss = $injector.get('secureStorageService');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
it('get fails', function() {
|
||||
var error, key, result;
|
||||
|
||||
localStorage.get.and.callFake(function(k, cb){
|
||||
key = k;
|
||||
cb(new Error('Get error.'), null);
|
||||
});
|
||||
|
||||
sss.get('a1234', function(e, res) {
|
||||
error = e;
|
||||
result = res;
|
||||
});
|
||||
|
||||
expect(error.message).toBe('Get error.');
|
||||
expect(result).toBeFalsy();
|
||||
expect(key).toBe('a1234:desiredSecure');
|
||||
});
|
||||
|
||||
it('get succeeds', function() {
|
||||
var error, key, result;
|
||||
|
||||
localStorage.get.and.callFake(function(k, cb){
|
||||
key = k;
|
||||
cb(null, 'The result 1.');
|
||||
});
|
||||
|
||||
sss.get('a123', function(e, res) {
|
||||
error = e;
|
||||
result = res;
|
||||
});
|
||||
|
||||
expect(error).toBeFalsy();
|
||||
expect(result).toBe('The result 1.');
|
||||
expect(key).toBe('a123:desiredSecure');
|
||||
});
|
||||
|
||||
it('set fails', function() {
|
||||
var error, key, value;
|
||||
|
||||
localStorage.set.and.callFake(function(k, v, cb){
|
||||
key = k;
|
||||
value = v;
|
||||
cb(new Error('Set error.'));
|
||||
});
|
||||
|
||||
sss.set('a12345', 'The value 1.', function(e) {
|
||||
error = e;
|
||||
});
|
||||
|
||||
expect(error.message).toBe('Set error.');
|
||||
expect(key).toBe('a12345:desiredSecure');
|
||||
expect(value).toBe('The value 1.');
|
||||
});
|
||||
|
||||
it('set succeeds', function() {
|
||||
var error, key, value;
|
||||
|
||||
localStorage.set.and.callFake(function(k, v, cb){
|
||||
key = k;
|
||||
value = v;
|
||||
cb(null);
|
||||
});
|
||||
|
||||
sss.set('ab123', 'The value 2.', function(e) {
|
||||
error = e;
|
||||
});
|
||||
|
||||
expect(error).toBeFalsy();
|
||||
expect(key).toBe('ab123:desiredSecure');
|
||||
expect(value).toBe('The value 2.')
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
describe('secureStorageService on desktop', function(){
|
||||
var desktopSss,
|
||||
sss;
|
||||
|
||||
beforeEach(function(){
|
||||
module('ngLodash');
|
||||
module('copayApp.services');
|
||||
|
||||
desktopSss = {
|
||||
get: jasmine.createSpy(),
|
||||
set: jasmine.createSpy()
|
||||
};
|
||||
|
||||
platformInfoStub = {
|
||||
isNW: true
|
||||
};
|
||||
|
||||
module(function($provide) {
|
||||
$provide.value('desktopSecureStorageService', desktopSss);
|
||||
$provide.value('platformInfo', platformInfoStub);
|
||||
});
|
||||
|
||||
inject(function($injector){
|
||||
sss = $injector.get('secureStorageService');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
it('get fails', function() {
|
||||
var error, key, result;
|
||||
|
||||
desktopSss.get.and.callFake(function(k, cb){
|
||||
key = k;
|
||||
cb(new Error('Get error.'), null);
|
||||
});
|
||||
|
||||
sss.get('a1234', function(e, res) {
|
||||
error = e;
|
||||
result = res;
|
||||
});
|
||||
|
||||
expect(error.message).toBe('Get error.');
|
||||
expect(result).toBeFalsy();
|
||||
expect(key).toBe('a1234');
|
||||
});
|
||||
|
||||
it('get succeeds', function() {
|
||||
var error, key, result;
|
||||
|
||||
desktopSss.get.and.callFake(function(k, cb){
|
||||
key = k;
|
||||
cb(null, 'The result 1.');
|
||||
});
|
||||
|
||||
sss.get('a123', function(e, res) {
|
||||
error = e;
|
||||
result = res;
|
||||
});
|
||||
|
||||
expect(error).toBeFalsy();
|
||||
expect(result).toBe('The result 1.');
|
||||
expect(key).toBe('a123');
|
||||
});
|
||||
|
||||
it('set fails', function() {
|
||||
var error, key, value;
|
||||
|
||||
desktopSss.set.and.callFake(function(k, v, cb){
|
||||
key = k;
|
||||
value = v;
|
||||
cb(new Error('Set error.'));
|
||||
});
|
||||
|
||||
sss.set('a12345', 'The value 1.', function(e) {
|
||||
error = e;
|
||||
});
|
||||
|
||||
expect(error.message).toBe('Set error.');
|
||||
expect(key).toBe('a12345');
|
||||
expect(value).toBe('The value 1.');
|
||||
});
|
||||
|
||||
it('set succeeds', function() {
|
||||
var error, key, value;
|
||||
|
||||
desktopSss.set.and.callFake(function(k, v, cb){
|
||||
key = k;
|
||||
value = v;
|
||||
cb(null);
|
||||
});
|
||||
|
||||
sss.set('ab123', 'The value 2.', function(e) {
|
||||
error = e;
|
||||
});
|
||||
|
||||
expect(error).toBeFalsy();
|
||||
expect(key).toBe('ab123');
|
||||
expect(value).toBe('The value 2.')
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('secureStorageService on mobile', function(){
|
||||
var mobileSss,
|
||||
sss;
|
||||
|
||||
beforeEach(function(){
|
||||
module('ngLodash');
|
||||
module('copayApp.services');
|
||||
|
||||
mobileSss = {
|
||||
get: jasmine.createSpy(),
|
||||
set: jasmine.createSpy()
|
||||
};
|
||||
|
||||
platformInfoStub = {
|
||||
isMobile: true
|
||||
};
|
||||
|
||||
module(function($provide) {
|
||||
$provide.value('mobileSecureStorageService', mobileSss);
|
||||
$provide.value('platformInfo', platformInfoStub);
|
||||
});
|
||||
|
||||
inject(function($injector){
|
||||
sss = $injector.get('secureStorageService');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
it('get fails', function() {
|
||||
var error, key, result;
|
||||
|
||||
mobileSss.get.and.callFake(function(k, cb){
|
||||
key = k;
|
||||
cb(new Error('Get error.'), null);
|
||||
});
|
||||
|
||||
sss.get('a1234', function(e, res) {
|
||||
error = e;
|
||||
result = res;
|
||||
});
|
||||
|
||||
expect(error.message).toBe('Get error.');
|
||||
expect(result).toBeFalsy();
|
||||
expect(key).toBe('a1234');
|
||||
});
|
||||
|
||||
it('get succeeds', function() {
|
||||
var error, key, result;
|
||||
|
||||
mobileSss.get.and.callFake(function(k, cb){
|
||||
key = k;
|
||||
cb(null, 'The result 1.');
|
||||
});
|
||||
|
||||
sss.get('a123', function(e, res) {
|
||||
error = e;
|
||||
result = res;
|
||||
});
|
||||
|
||||
expect(error).toBeFalsy();
|
||||
expect(result).toBe('The result 1.');
|
||||
expect(key).toBe('a123');
|
||||
});
|
||||
|
||||
it('set fails', function() {
|
||||
var error, key, value;
|
||||
|
||||
mobileSss.set.and.callFake(function(k, v, cb){
|
||||
key = k;
|
||||
value = v;
|
||||
cb(new Error('Set error.'));
|
||||
});
|
||||
|
||||
sss.set('a12345', 'The value 1.', function(e) {
|
||||
error = e;
|
||||
});
|
||||
|
||||
expect(error.message).toBe('Set error.');
|
||||
expect(key).toBe('a12345');
|
||||
expect(value).toBe('The value 1.');
|
||||
});
|
||||
|
||||
it('set succeeds', function() {
|
||||
var error, key, value;
|
||||
|
||||
mobileSss.set.and.callFake(function(k, v, cb){
|
||||
key = k;
|
||||
value = v;
|
||||
cb(null);
|
||||
});
|
||||
|
||||
sss.set('ab123', 'The value 2.', function(e) {
|
||||
error = e;
|
||||
});
|
||||
|
||||
expect(error).toBeFalsy();
|
||||
expect(key).toBe('ab123');
|
||||
expect(value).toBe('The value 2.')
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
angular.module('copayApp.services')
|
||||
.factory('storageService', function(logHeader, fileStorageService, localStorageService, sjcl, $log, lodash, platformInfo, $timeout) {
|
||||
.factory('storageService', function(appConfigService, logHeader, fileStorageService, localStorageService, sjcl, $log, lodash, platformInfo, secureStorageService, $timeout) {
|
||||
|
||||
var root = {};
|
||||
var storage;
|
||||
|
|
@ -116,34 +116,138 @@ angular.module('copayApp.services')
|
|||
};
|
||||
|
||||
root.storeNewProfile = function(profile, cb) {
|
||||
storage.create('profile', profile.toObj(), cb);
|
||||
root.storeProfile(profile, cb);
|
||||
};
|
||||
|
||||
root.storeProfile = function(profile, cb) {
|
||||
storage.set('profile', profile.toObj(), cb);
|
||||
var profileString = profile.toObj();
|
||||
if (platformInfo.isNW) {
|
||||
storage.set('profile', profileString, cb);
|
||||
} else {
|
||||
secureStorageService.set('profile', profileString, cb);
|
||||
}
|
||||
};
|
||||
|
||||
root.getProfile = function(cb) {
|
||||
storage.get('profile', function(err, str) {
|
||||
if (err || !str)
|
||||
return cb(err);
|
||||
/**
|
||||
* @callback getProfileCallback
|
||||
* @param {Error} error - falsy if profile not found.
|
||||
* @param {Profile} profile - falsy if error or profile not found.
|
||||
*/
|
||||
|
||||
decryptOnMobile(str, function(err, str) {
|
||||
if (err) return cb(err);
|
||||
var p, err;
|
||||
|
||||
/**
|
||||
* @param {Error} error
|
||||
* @param {String} profileStr - containing the profile
|
||||
* @param {getProfileCallback} cb
|
||||
*/
|
||||
function _onOldProfileRetrieved(error, profileStr, cb) {
|
||||
if (error) {
|
||||
return cb(error, null);
|
||||
}
|
||||
|
||||
if (!profileStr) {
|
||||
// No profiles found. No errors either.
|
||||
return cb(null, null);
|
||||
}
|
||||
|
||||
decryptOnMobile(profileStr, function(decryptErr, decryptedStr) {
|
||||
if (decryptErr) return cb(decryptErr, null);
|
||||
var profile;
|
||||
try {
|
||||
p = Profile.fromString(str);
|
||||
profile = Profile.fromString(decryptedStr);
|
||||
} catch (e) {
|
||||
$log.debug('Could not read profile:', e);
|
||||
err = new Error('Could not read profile:' + p);
|
||||
return(new Error('Could not read profile.'), null);
|
||||
}
|
||||
return cb(err, p);
|
||||
cb(null, profile)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {Profile} oldProfile
|
||||
* @param {Profile} secureProfile - may be falsy if no secure profile found.
|
||||
* @param {getProfileCallback} cb
|
||||
*/
|
||||
function _migrateProfiles(oldProfile, secureProfile, cb) {
|
||||
var newProfile;
|
||||
|
||||
if (secureProfile) {
|
||||
secureProfile.merge(oldProfile);
|
||||
newProfile = secureProfile;
|
||||
} else {
|
||||
newProfile = oldProfile;
|
||||
newProfile.setAppVersion(appConfigService.version);
|
||||
}
|
||||
|
||||
root.storeNewProfile(newProfile, function(storeErr) {
|
||||
if (storeErr) {
|
||||
cb(storeErr, null);
|
||||
return;
|
||||
}
|
||||
|
||||
storage.remove('profile', function(removeErr){
|
||||
if (removeErr) {
|
||||
cb(removeErr, null);
|
||||
return;
|
||||
}
|
||||
|
||||
cb(null, newProfile);
|
||||
});
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
root.deleteProfile = function(cb) {
|
||||
storage.remove('profile', cb);
|
||||
/**
|
||||
*
|
||||
* @param {getProfileCallback} cb
|
||||
*/
|
||||
root.getProfile = function(cb) {
|
||||
if (platformInfo.isNW) {
|
||||
storage.get('profile', function(getErr, getStr) {
|
||||
_onOldProfileRetrieved(getErr, getStr, cb);
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
secureStorageService.get('profile', function(secureErr, secureStr) {
|
||||
var secureProfile;
|
||||
var oldProfile;
|
||||
|
||||
if (secureErr) {
|
||||
return cb(secureErr, null);
|
||||
}
|
||||
|
||||
if (secureStr) {
|
||||
try {
|
||||
secureProfile = Profile.fromString(secureStr);
|
||||
$log.debug('profile: ' + JSON.stringify(secureProfile));
|
||||
} catch (e) {
|
||||
$log.error(e);
|
||||
return cb(e, null);
|
||||
}
|
||||
}
|
||||
|
||||
storage.get('profile', function(getErr, getStr) {
|
||||
_onOldProfileRetrieved(getErr, getStr, function(oldErr, oldProfile){
|
||||
if (oldErr) {
|
||||
return cb(oldErr, null);
|
||||
}
|
||||
|
||||
if (!oldProfile) {
|
||||
if (secureProfile) {
|
||||
return cb(null, secureProfile);
|
||||
} else {
|
||||
// No profiles found. No errors either.
|
||||
return cb(null, null);
|
||||
}
|
||||
}
|
||||
_migrateProfiles(oldProfile, secureProfile, cb);
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
root.setFeedbackInfo = function(feedbackValues, cb) {
|
||||
|
|
|
|||
1119
src/js/services/storageService.spec.js
Normal file
1119
src/js/services/storageService.spec.js
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -40,7 +40,7 @@
|
|||
border-radius: $v-icon-border-radius;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
box-shadow: $v-hovering-box-shadow;
|
||||
box-shadow: 0px 0px 9px 0px rgba(0, 0, 0, 0.3);
|
||||
background-repeat:no-repeat;
|
||||
background-clip: padding-box;
|
||||
background-size: 103%;
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ $v-wallet-color-map: (
|
|||
3: (color: #d0b136, name: 'Metallic Gold'),
|
||||
4: (color: #9edd72, name: 'Feijoa'),
|
||||
5: (color: #29bb9c, name: 'Shamrock'),
|
||||
6: (color: #26B03C, name: 'Dollar Green'),
|
||||
7: (color: #fab915, name: 'Observatory'),
|
||||
6: (color: #eeb640, name: 'Light Orange'),
|
||||
7: (color: #535353, name: 'Dark Grey'),
|
||||
8: (color: #77dada, name: 'Turquoise Blue'),
|
||||
9: (color: #4a90e2, name: 'Cornflower Blue'),
|
||||
10: (color: #484ed3, name: 'Free Speech Blue'),
|
||||
|
|
|
|||
|
|
@ -474,4 +474,10 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
background: #494949;
|
||||
|
||||
ion-content {
|
||||
margin-bottom: constant(safe-area-inset-bottom); /* iOS 11.0 */
|
||||
margin-bottom: env(safe-area-inset-bottom); /* iOS 11.2 */
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
#view-confirm {
|
||||
background-color: #ffffff;
|
||||
background-color: #494949;
|
||||
@extend .deflash-blue;
|
||||
.item-note {
|
||||
float: none;
|
||||
|
|
@ -30,4 +30,11 @@
|
|||
.toggle {
|
||||
cursor: pointer;
|
||||
}
|
||||
ion-content {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
slide-to-accept, slide-to-accept-success {
|
||||
margin-bottom: constant(safe-area-inset-bottom); /* iOS 11.0 */
|
||||
margin-bottom: env(safe-area-inset-bottom); /* iOS 11.2 */
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,6 +131,7 @@
|
|||
.bp-content {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
height: calc(100% - env(safe-area-inset-bottom) * 2);
|
||||
|
||||
&.status-bar {
|
||||
margin-top: 20px;
|
||||
|
|
@ -157,6 +158,8 @@
|
|||
|
||||
padding-top: 0;
|
||||
top: 0;
|
||||
margin-bottom: 16px;
|
||||
|
||||
.scroll {
|
||||
background: rgb(248, 248, 249);
|
||||
min-height: 300px;
|
||||
|
|
|
|||
91
test/karma.conf.js
Normal file
91
test/karma.conf.js
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
// Karma configuration
|
||||
// Generated on Tue Jun 05 2018 16:39:51 GMT+1200 (NZST)
|
||||
|
||||
module.exports = function(config) {
|
||||
config.set({
|
||||
|
||||
// base path that will be used to resolve all patterns (eg. files, exclude)
|
||||
basePath: '..',
|
||||
|
||||
|
||||
// frameworks to use
|
||||
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
|
||||
frameworks: ['jasmine'],
|
||||
|
||||
|
||||
// list of files / patterns to load in the browser
|
||||
files: [
|
||||
'node_modules/angular/angular.js',
|
||||
|
||||
// From Gruntfile.js
|
||||
'bower_components/qrcode-generator/js/qrcode.js',
|
||||
'bower_components/qrcode-generator/js/qrcode_UTF8.js',
|
||||
'bower_components/moment/min/moment-with-locales.js',
|
||||
'bower_components/angular-moment/angular-moment.js',
|
||||
'bower_components/ng-lodash/build/ng-lodash.js',
|
||||
'bower_components/angular-qrcode/angular-qrcode.js',
|
||||
'bower_components/angular-gettext/dist/angular-gettext.js',
|
||||
'bower_components/ng-csv/build/ng-csv.js',
|
||||
'bower_components/ionic-toast/dist/ionic-toast.bundle.min.js',
|
||||
'bower_components/angular-clipboard/angular-clipboard.js',
|
||||
'bower_components/angular-md5/angular-md5.js',
|
||||
'bower_components/angular-mocks/angular-mocks.js',
|
||||
'bower_components/ngtouch/src/ngTouch.js',
|
||||
'angular-bitauth/angular-bitauth.js',
|
||||
'angular-bitcore-wallet-client/angular-bitcore-wallet-client.js',
|
||||
|
||||
'bower_components/ionic/release/js/ionic.bundle.min.js',
|
||||
'bitcoin-cash-js/bitcoin-cash-js.js',
|
||||
|
||||
'src/js/**/*.js'
|
||||
],
|
||||
|
||||
|
||||
// list of files / patterns to exclude
|
||||
exclude: [
|
||||
],
|
||||
|
||||
|
||||
// preprocess matching files before serving them to the browser
|
||||
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
|
||||
preprocessors: {
|
||||
},
|
||||
|
||||
|
||||
// test results reporter to use
|
||||
// possible values: 'dots', 'progress'
|
||||
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
|
||||
reporters: ['progress'],
|
||||
|
||||
|
||||
// web server port
|
||||
port: 9876,
|
||||
|
||||
|
||||
// enable / disable colors in the output (reporters and logs)
|
||||
colors: true,
|
||||
|
||||
|
||||
// level of logging
|
||||
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
|
||||
logLevel: config.LOG_INFO,
|
||||
|
||||
|
||||
// enable / disable watching file and executing tests whenever any file changes
|
||||
autoWatch: false,
|
||||
|
||||
|
||||
// start these browsers
|
||||
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
|
||||
browsers: ['Chrome'],
|
||||
|
||||
|
||||
// Continuous Integration mode
|
||||
// if true, Karma captures browsers, runs the tests and exits
|
||||
singleRun: false,
|
||||
|
||||
// Concurrency level
|
||||
// how many browser should be started simultaneous
|
||||
concurrency: Infinity
|
||||
})
|
||||
}
|
||||
|
|
@ -10005,7 +10005,7 @@ ion-view.deflash-blue:before, ion-view#view-amount:before, ion-view#view-confirm
|
|||
border-radius: 3px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.3);
|
||||
box-shadow: 0px 0px 9px 0px rgba(0, 0, 0, 0.3);
|
||||
background-repeat: no-repeat;
|
||||
background-clip: padding-box;
|
||||
background-size: 103%; }
|
||||
|
|
@ -10726,6 +10726,12 @@ textarea.d-block {
|
|||
#tab-home .card .item-sub:before {
|
||||
width: 90%; } }
|
||||
|
||||
#tab-home .card-banner {
|
||||
padding: 0; }
|
||||
#tab-home .card-banner__img {
|
||||
width: 100%;
|
||||
display: block; }
|
||||
|
||||
#tab-home .wallet-coin-logo {
|
||||
vertical-align: middle;
|
||||
margin-right: 5px; }
|
||||
|
|
@ -11305,13 +11311,13 @@ textarea.d-block {
|
|||
|
||||
/* background-color and color defaults should be the same */
|
||||
.wallet-background-color-default {
|
||||
background-color: #fab915; }
|
||||
background-color: #535353; }
|
||||
|
||||
.wallet-color-default {
|
||||
color: #fab915; }
|
||||
color: #535353; }
|
||||
|
||||
.cashwallet-color-default {
|
||||
color: #26B03C; }
|
||||
color: #eeb640; }
|
||||
|
||||
/* generate classes for all colors */
|
||||
.wallet-color-0 {
|
||||
|
|
@ -11357,17 +11363,17 @@ textarea.d-block {
|
|||
margin-left: 2.4rem; }
|
||||
|
||||
.wallet-color-6 {
|
||||
background: #26B03C; }
|
||||
background: #eeb640; }
|
||||
|
||||
.wallet-color-6:before {
|
||||
content: "Dollar Green";
|
||||
content: "Light Orange";
|
||||
margin-left: 2.4rem; }
|
||||
|
||||
.wallet-color-7 {
|
||||
background: #fab915; }
|
||||
background: #535353; }
|
||||
|
||||
.wallet-color-7:before {
|
||||
content: "Observatory";
|
||||
content: "Dark Grey";
|
||||
margin-left: 2.4rem; }
|
||||
|
||||
.wallet-color-8 {
|
||||
|
|
|
|||
|
|
@ -1,62 +1 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Wallet"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 40 40"
|
||||
style="enable-background:new 0 0 40 40;"
|
||||
xml:space="preserve"
|
||||
sodipodi:docname="icon-wallet.svg"
|
||||
inkscape:version="0.92.1 r15371"><metadata
|
||||
id="metadata10"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs8" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1015"
|
||||
id="namedview6"
|
||||
showgrid="false"
|
||||
inkscape:pagecheckerboard="true"
|
||||
inkscape:zoom="19.825"
|
||||
inkscape:cx="12.559899"
|
||||
inkscape:cy="26.610103"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Wallet" /><style
|
||||
type="text/css"
|
||||
id="style2">
|
||||
.st0{fill:none;stroke:#FFFFFF;}
|
||||
</style><text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:42.66666667px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
|
||||
x="-7.263556"
|
||||
y="11.197982"
|
||||
id="text4493"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan4491"
|
||||
x="-7.263556"
|
||||
y="46.588608" /></text>
|
||||
<g
|
||||
aria-label=""
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24.29528046px;line-height:125%;font-family:icomoon;-inkscape-font-specification:icomoon;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.607382px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
id="text4497"><path
|
||||
d="m 30.194736,19.685663 h -3.226717 q -0.735501,0 -1.233744,0.521969 -0.498243,0.498243 -0.498243,1.210019 0,0.711776 0.498243,1.233745 0.521969,0.498243 1.233744,0.498243 h 3.226717 q 0.308437,0 0.521969,-0.213533 0.237259,-0.237259 0.237259,-0.545695 v -2.016698 q 0,-0.260984 -0.237259,-0.474517 -0.213532,-0.213533 -0.521969,-0.213533 z m -11.649397,2.06415 h -2.775925 v 3.155539 h 2.704748 q 0.166081,0 0.379613,-0.02372 0.237259,-0.02373 0.427066,-0.0949 0.379614,-0.166081 0.616872,-0.569421 0.237259,-0.403339 0.237259,-0.901582 0,-0.711776 -0.450791,-1.138842 -0.427066,-0.427065 -1.138842,-0.427065 z m 8.42268,2.396312 q -1.138841,0 -1.94552,-0.782954 -0.782953,-0.806679 -0.782953,-1.94552 0,-1.138841 0.782953,-1.945521 0.806679,-0.806679 1.94552,-0.806679 h 3.226717 q 0,0 0,0 0,0 0,0 v -3.962218 q 0,-0.949035 -0.664324,-1.589633 -0.664324,-0.664324 -1.589632,-0.664324 V 11.45279 q 0,-0.735502 -0.521969,-1.233745 Q 26.920568,9.7208021 26.208792,9.7208021 H 9.5295125 q -0.7117758,0 -1.2337447,0.5219689 -0.498243,0.498243 -0.498243,1.210019 v 16.655553 q 0,0.949035 0.664324,1.613359 0.6643241,0.640598 1.5896322,0.640598 h 17.913025 q 0.949034,0 1.589632,-0.640598 0.664324,-0.664324 0.664324,-1.613359 v -3.962218 q 0,0 0,0 0,0 0,0 H 26.968019 Z M 9.6481418,12.449276 q -0.3558879,0 -0.6168723,-0.260984 Q 8.770285,11.927307 8.770285,11.571419 v 0 q 0,-0.355888 0.2609845,-0.616872 0.2609844,-0.260985 0.6168723,-0.260985 H 26.090163 q 0.355888,0 0.616872,0.260985 0.260984,0.260984 0.260984,0.616872 v 0.877857 H 9.6481418 Z M 19.779084,25.783209 q -0.332162,0.118629 -0.664324,0.166081 -0.332162,0.02373 -0.711776,0.02373 h -0.521969 v 0.711776 q 0,0.118629 -0.07118,0.213533 -0.07118,0.07118 -0.189807,0.07118 h -0.759228 q -0.118629,0 -0.213533,-0.07118 -0.07118,-0.0949 -0.07118,-0.213533 v -0.711776 h -0.854131 v 0.711776 q 0,0.118629 -0.07118,0.213533 -0.07118,0.07118 -0.189807,0.07118 H 14.70175 q -0.118629,0 -0.213533,-0.07118 -0.07118,-0.0949 -0.07118,-0.213533 v -0.711776 h -0.711776 q -0.0949,0 -0.166081,-0.07118 -0.04745,-0.07118 -0.04745,-0.142355 v -0.640598 q 0,-0.0949 0.04745,-0.142355 0.07118,-0.07118 0.166081,-0.07118 h 0.711776 v -6.951677 h -0.782954 q -0.07118,0 -0.118629,-0.04745 -0.02373,-0.04745 -0.02373,-0.11863 v -0.711775 q 0,-0.07118 0.02373,-0.11863 0.04745,-0.04745 0.118629,-0.04745 h 0.782954 v -0.735502 q 0,-0.0949 0.07118,-0.166081 0.0949,-0.0949 0.213533,-0.0949 h 0.759227 q 0.11863,0 0.189807,0.0949 0.07118,0.07118 0.07118,0.166081 v 0.735502 h 0.854131 v -0.735502 q 0,-0.0949 0.07118,-0.166081 0.0949,-0.0949 0.213533,-0.0949 h 0.759228 q 0.118629,0 0.189807,0.0949 0.07118,0.07118 0.07118,0.166081 v 0.735502 h 0.332162 q 0.498243,0 0.877857,0.07118 0.379614,0.04745 0.711776,0.213533 0.545695,0.237259 0.877857,0.782953 0.355888,0.521969 0.355888,1.233745 0,0.664324 -0.308437,1.186293 -0.28471,0.498243 -0.830405,0.759228 v 0.04745 q 0.711776,0.189807 1.115116,0.806679 0.403339,0.616873 0.403339,1.3761 0.02373,0.877857 -0.474517,1.518455 -0.474517,0.640599 -1.162567,0.877857 z m 0,-6.47716 q 0,-0.379613 -0.166081,-0.688049 -0.142355,-0.332163 -0.427066,-0.498244 -0.166081,-0.07118 -0.403339,-0.118629 -0.237259,-0.04745 -0.521969,-0.04745 H 15.79314 v 2.7522 h 2.681022 q 0.593146,0 0.949034,-0.379614 0.355888,-0.403339 0.355888,-1.020212 z"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.607382px"
|
||||
id="path4499" /></g></svg>
|
||||
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70 70"><title>icon-wallet</title><path d="M45.65,41.24a2.74,2.74,0,1,0-2.73-2.75h0a2.74,2.74,0,0,0,2.73,2.74m0-3.46a.72.72,0,1,1-.72.72.7.7,0,0,1,.68-.72h0" style="fill:#fff"/><path d="M50.83,14.51H15.17A4.46,4.46,0,0,0,10.71,19V51.75a3.9,3.9,0,0,0,3.88,3.88H54.85a3.88,3.88,0,0,0,3.88-3.88h0V25.29a3.88,3.88,0,0,0-3.88-3.88h-3V15.52a1,1,0,0,0-1-1m-35.66,2H49.82v4.89H15.17a2.45,2.45,0,0,1,0-4.89M56.72,43.84H39.9a.69.69,0,0,1-.72-.66V33.92a.69.69,0,0,1,.66-.72H56.72ZM54.85,23.43a1.85,1.85,0,0,1,1.87,1.83v5.93H39.9a2.73,2.73,0,0,0-2.73,2.73h0v9.2a2.73,2.73,0,0,0,2.73,2.73H56.72v5.9a1.85,1.85,0,0,1-1.83,1.87H14.59a1.85,1.85,0,0,1-1.86-1.84V22.69l.21.13a4.61,4.61,0,0,0,2.23.61Z" style="fill:#fff"/><path d="M29.83,38.06h0a3.91,3.91,0,0,0,2.11-3.61,4,4,0,0,0-2.3-3.77,6.89,6.89,0,0,0-2.94-.5h-.63V28.77a.5.5,0,0,0-.48-.48h-1.4a.49.49,0,0,0-.49.48v1.37H22.13V28.77a.49.49,0,0,0-.49-.48h-1.4a.5.5,0,0,0-.48.48v1.37H18.33a.31.31,0,0,0-.31.31v1.33a.31.31,0,0,0,.31.31h1.43V44.94H18.41a.38.38,0,0,0-.39.39h0V46.5a.38.38,0,0,0,.39.39h1.35v1.35a.49.49,0,0,0,.48.49h1.4a.49.49,0,0,0,.49-.49h0V46.88H23.7v1.35a.49.49,0,0,0,.49.49h1.4a.49.49,0,0,0,.48-.49V46.88H27a8,8,0,0,0,2.52-.3,4.63,4.63,0,0,0,3.08-4.46,4,4,0,0,0-2.77-4.06m-7.7-6H26.7a3.69,3.69,0,0,1,1.73.33,2.41,2.41,0,0,1,1.09,2.2,2.37,2.37,0,0,1-2.16,2.56H22.13ZM28.59,44.7a4,4,0,0,1-1.49.24h-5V39.13h5.16a2.71,2.71,0,0,1,2.92,2.49,2.41,2.41,0,0,1,0,.38,2.8,2.8,0,0,1-1.59,2.7" style="fill:#fff"/></svg>
|
||||
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 1.5 KiB |
Loading…
Add table
Add a link
Reference in a new issue