fix merge conflicts

This commit is contained in:
Marty Alcala 2016-10-10 15:35:27 -04:00
commit 9adab04871
45 changed files with 404 additions and 369 deletions

View File

@ -17,6 +17,7 @@
"winAppName": "BitPayWallet",
"wpPublisherId": "{}",
"wpProductId": "{}",
"pushSenderId": "1036948132229",
"description": "Secure Bitcoin Storage",
"version": "0.14.0",
"androidVersion": "1",

View File

@ -32,7 +32,6 @@
<!-- Plugins -->
<plugin name="cordova-plugin-device" spec="~1.1.3"/>
<plugin name="cordova-plugin-globalization" spec="~1.0.4" />
<plugin name="cordova.plugins.diagnostic" spec="~3.2.1" />
<plugin name="cordova-plugin-splashscreen" spec="~4.0.0" />
<plugin name="cordova-plugin-statusbar" spec="~2.2.0" />
<plugin name="cordova-plugin-inappbrowser" spec="~1.5.0" />
@ -57,88 +56,88 @@
<plugin name="cordova-plugin-customurlscheme" spec="~4.2.0">
<variable name="URL_SCHEME" value="UNUSED" />
</plugin>
<plugin name="phonegap-plugin-push" spec="1.8.2" />
<plugin name="phonegap-plugin-push" spec="~1.8.2">
<variable name="SENDER_ID" value="*PUSHSENDERID*"/>
</plugin>
<!-- Supported Platforms -->
<engine name="ios" spec="~4.2.1" />
<engine name="android" spec="~5.2.2" />
<!-- <engine name="windows" spec="~4.4.2" /> -->
<!-- Platform Specific Settings -->
<platform name="ios">
<!-- <hook type="after_prepare" src="util/hooks/ios/add-custom-urls-to-plist.js" />
<hook type="after_prepare" src="util/hooks/ios/add-uistatusbarhidden-to-plist.js" /> -->
<!-- <icon src="resources/bitpay/ios/icon-60@3x.png" width="180" height="180" />
<icon src="resources/bitpay/ios/icon-60.png" width="60" height="60" />
<icon src="resources/bitpay/ios/icon-60@2x.png" width="120" height="120" />
<icon src="resources/bitpay/ios/icon-76.png" width="76" height="76" />
<icon src="resources/bitpay/ios/icon-76@2x.png" width="152" height="152" />
<icon src="resources/bitpay/ios/icon-40.png" width="40" height="40" />
<icon src="resources/bitpay/ios/icon-40@2x.png" width="80" height="80" />
<icon src="resources/bitpay/ios/icon.png" width="57" height="57" />
<icon src="resources/bitpay/ios/icon@2x.png" width="114" height="114" />
<icon src="resources/bitpay/ios/icon-72.png" width="72" height="72" />
<icon src="resources/bitpay/ios/icon-72@2x.png" width="144" height="144" />
<icon src="resources/bitpay/ios/icon-small.png" width="29" height="29" />
<icon src="resources/bitpay/ios/icon-small@2x.png" width="58" height="58" />
<icon src="resources/bitpay/ios/icon-50.png" width="50" height="50" />
<icon src="resources/bitpay/ios/icon-50@2x.png" width="100" height="100" /> -->
<icon src="resources/*PACKAGENAME*/ios/icon/icon-60@3x.png" width="180" height="180" />
<icon src="resources/*PACKAGENAME*/ios/icon/icon-60.png" width="60" height="60" />
<icon src="resources/*PACKAGENAME*/ios/icon/icon-60@2x.png" width="120" height="120" />
<icon src="resources/*PACKAGENAME*/ios/icon/icon-76.png" width="76" height="76" />
<icon src="resources/*PACKAGENAME*/ios/icon/icon-76@2x.png" width="152" height="152" />
<icon src="resources/*PACKAGENAME*/ios/icon/icon-83.5@2x.png" width="167" height="167" />
<icon src="resources/*PACKAGENAME*/ios/icon/icon-40.png" width="40" height="40" />
<icon src="resources/*PACKAGENAME*/ios/icon/icon-40@2x.png" width="80" height="80" />
<icon src="resources/*PACKAGENAME*/ios/icon/icon.png" width="57" height="57" />
<icon src="resources/*PACKAGENAME*/ios/icon/icon@2x.png" width="114" height="114" />
<icon src="resources/*PACKAGENAME*/ios/icon/icon-72.png" width="72" height="72" />
<icon src="resources/*PACKAGENAME*/ios/icon/icon-72@2x.png" width="144" height="144" />
<icon src="resources/*PACKAGENAME*/ios/icon/icon-small.png" width="29" height="29" />
<icon src="resources/*PACKAGENAME*/ios/icon/icon-small@2x.png" width="58" height="58" />
<icon src="resources/*PACKAGENAME*/ios/icon/icon-50.png" width="50" height="50" />
<icon src="resources/*PACKAGENAME*/ios/icon/icon-50@2x.png" width="100" height="100" />
<splash src="resources/bitpay/ios/splash/Default~iphone.png" width="320" height="480"/>
<splash src="resources/bitpay/ios/splash/Default@2x~iphone.png" width="640" height="960"/>
<splash src="resources/bitpay/ios/splash/Default-Portrait~ipad.png" width="768" height="1024"/>
<splash src="resources/bitpay/ios/splash/Default-Portrait@2x~ipad.png" width="1536" height="2048"/>
<splash src="resources/bitpay/ios/splash/Default-Landscape~ipad.png" width="1024" height="768"/>
<splash src="resources/bitpay/ios/splash/Default-Landscape@2x~ipad.png" width="2048" height="1536"/>
<splash src="resources/bitpay/ios/splash/Default-568h@2x~iphone.png" width="640" height="1136"/>
<splash src="resources/bitpay/ios/splash/Default-667h.png" width="750" height="1334"/>
<splash src="resources/bitpay/ios/splash/Default-736h.png" width="1242" height="2208"/>
<splash src="resources/bitpay/ios/splash/Default-Landscape-736h.png" width="2208" height="1242"/>
<splash src="resources/*PACKAGENAME*/ios/splash/Default~iphone.png" width="320" height="480"/>
<splash src="resources/*PACKAGENAME*/ios/splash/Default@2x~iphone.png" width="640" height="960"/>
<splash src="resources/*PACKAGENAME*/ios/splash/Default-Portrait~ipad.png" width="768" height="1024"/>
<splash src="resources/*PACKAGENAME*/ios/splash/Default-Portrait@2x~ipad.png" width="1536" height="2048"/>
<splash src="resources/*PACKAGENAME*/ios/splash/Default-Landscape~ipad.png" width="1024" height="768"/>
<splash src="resources/*PACKAGENAME*/ios/splash/Default-Landscape@2x~ipad.png" width="2048" height="1536"/>
<splash src="resources/*PACKAGENAME*/ios/splash/Default-568h@2x~iphone.png" width="640" height="1136"/>
<splash src="resources/*PACKAGENAME*/ios/splash/Default-667h.png" width="750" height="1334"/>
<splash src="resources/*PACKAGENAME*/ios/splash/Default-736h.png" width="1242" height="2208"/>
<splash src="resources/*PACKAGENAME*/ios/splash/Default-Landscape-736h.png" width="2208" height="1242"/>
</platform>
<platform name="android">
<hook type="after_prepare" src="util/hooks/android/add-custom-urls-to-android-manifest.js" />
<hook type="after_prepare" src="util/hooks/android/prohibit-cloud-backups-in-android-manifest.js" />
<!-- <icon src="resources/bitpay/android/icons/ldpi.png" density="ldpi" />
<icon src="resources/bitpay/android/icons/mdpi.png" density="mdpi" />
<icon src="resources/bitpay/android/icons/hdpi.png" density="hdpi" />
<icon src="resources/bitpay/android/icons/xhdpi.png" density="xhdpi" />
<icon src="resources/bitpay/android/icons/xxhdpi.png" density="xxhdpi" />
<icon src="resources/bitpay/android/icons/xxxhdpi.png" density="xxxhdpi" /> -->
<icon src="resources/*PACKAGENAME*/android/icon/drawable-ldpi-icon.png" density="ldpi" />
<icon src="resources/*PACKAGENAME*/android/icon/drawable-mdpi-icon.png" density="mdpi" />
<icon src="resources/*PACKAGENAME*/android/icon/drawable-hdpi-icon.png" density="hdpi" />
<icon src="resources/*PACKAGENAME*/android/icon/drawable-xhdpi-icon.png" density="xhdpi" />
<icon src="resources/*PACKAGENAME*/android/icon/drawable-xxhdpi-icon.png" density="xxhdpi" />
<icon src="resources/*PACKAGENAME*/android/icon/drawable-xxxhdpi-icon.png" density="xxxhdpi" />
<splash src="resources/bitpay/android/splash/drawable-land-hdpi-screen.png" density="land-hdpi"/>
<splash src="resources/bitpay/android/splash/drawable-land-ldpi-screen.png" density="land-ldpi"/>
<splash src="resources/bitpay/android/splash/drawable-land-mdpi-screen.png" density="land-mdpi"/>
<splash src="resources/bitpay/android/splash/drawable-land-xhdpi-screen.png" density="land-xhdpi"/>
<splash src="resources/bitpay/android/splash/drawable-land-xxhdpi-screen.png" density="land-xxhdpi"/>
<splash src="resources/bitpay/android/splash/drawable-land-xxxhdpi-screen.png" density="land-xxxhdpi"/>
<splash src="resources/*PACKAGENAME*/android/splash/drawable-land-hdpi-screen.png" density="land-hdpi"/>
<splash src="resources/*PACKAGENAME*/android/splash/drawable-land-ldpi-screen.png" density="land-ldpi"/>
<splash src="resources/*PACKAGENAME*/android/splash/drawable-land-mdpi-screen.png" density="land-mdpi"/>
<splash src="resources/*PACKAGENAME*/android/splash/drawable-land-xhdpi-screen.png" density="land-xhdpi"/>
<splash src="resources/*PACKAGENAME*/android/splash/drawable-land-xxhdpi-screen.png" density="land-xxhdpi"/>
<splash src="resources/*PACKAGENAME*/android/splash/drawable-land-xxxhdpi-screen.png" density="land-xxxhdpi"/>
<splash src="resources/bitpay/android/splash/drawable-port-hdpi-screen.png" density="port-hdpi"/>
<splash src="resources/bitpay/android/splash/drawable-port-ldpi-screen.png" density="port-ldpi"/>
<splash src="resources/bitpay/android/splash/drawable-port-mdpi-screen.png" density="port-mdpi"/>
<splash src="resources/bitpay/android/splash/drawable-port-xhdpi-screen.png" density="port-xhdpi"/>
<splash src="resources/bitpay/android/splash/drawable-port-xxhdpi-screen.png" density="port-xxhdpi"/>
<splash src="resources/bitpay/android/splash/drawable-port-xxxhdpi-screen.png" density="port-xxxhdpi"/>
</platform>
<platform name="wp8">
<plugin name="phonegap-plugin-barcodescanner" spec="https://github.com/jrontend/phonegap-plugin-barcodescanner" />
<splash src="resources/*PACKAGENAME*/android/splash/drawable-port-hdpi-screen.png" density="port-hdpi"/>
<splash src="resources/*PACKAGENAME*/android/splash/drawable-port-ldpi-screen.png" density="port-ldpi"/>
<splash src="resources/*PACKAGENAME*/android/splash/drawable-port-mdpi-screen.png" density="port-mdpi"/>
<splash src="resources/*PACKAGENAME*/android/splash/drawable-port-xhdpi-screen.png" density="port-xhdpi"/>
<splash src="resources/*PACKAGENAME*/android/splash/drawable-port-xxhdpi-screen.png" density="port-xxhdpi"/>
<splash src="resources/*PACKAGENAME*/android/splash/drawable-port-xxxhdpi-screen.png" density="port-xxxhdpi"/>
</platform>
<platform name="windows">
<!-- <icon src="resources/bitpay/windows/icons/storelogo.png" target="StoreLogo" />
<icon src="resources/bitpay/windows/icons/smalllogo.png" target="Square30x30Logo" />
<icon src="resources/bitpay/windows/icons/Square44x44Logo.png" target="Square44x44Logo" />
<icon src="resources/bitpay/windows/icons/Square70x70Logo.png" target="Square70x70Logo" />
<icon src="resources/bitpay/windows/icons/Square71x71Logo.png" target="Square71x71Logo" />
<icon src="resources/bitpay/windows/icons/Square150x150Logo.png" target="Square150x150Logo" />
<icon src="resources/bitpay/windows/icons/Square310x310Logo.png" target="Square310x310Logo" />
<icon src="resources/bitpay/windows/icons/Wide310x150Logo.png" target="Wide310x150Logo" /> -->
<icon src="resources/*PACKAGENAME*/windows/icon/StoreLogo.png" target="StoreLogo" />
<icon src="resources/*PACKAGENAME*/windows/icon/Square30x30Logo.png" target="Square30x30Logo" />
<icon src="resources/*PACKAGENAME*/windows/icon/Square44x44Logo.png" target="Square44x44Logo" />
<icon src="resources/*PACKAGENAME*/windows/icon/Square70x70Logo.png" target="Square70x70Logo" />
<icon src="resources/*PACKAGENAME*/windows/icon/Square71x71Logo.png" target="Square71x71Logo" />
<icon src="resources/*PACKAGENAME*/windows/icon/Square150x150Logo.png" target="Square150x150Logo" />
<icon src="resources/*PACKAGENAME*/windows/icon/Square310x310Logo.png" target="Square310x310Logo" />
<icon src="resources/*PACKAGENAME*/windows/icon/Wide310x150Logo.png" target="Wide310x150Logo" />
<splash src="resources/bitpay/windows/splash/splashscreen.png" width="620" height="300"/>
<splash src="resources/bitpay/windows/splash/splashscreenphone.png" width="1152" height="1920"/>
<splash src="resources/*PACKAGENAME*/windows/splash/SplashScreen.scale-100.png" width="620" height="300"/>
<splash src="resources/*PACKAGENAME*/windows/splash/SplashScreenPhone.scale-240.png" width="1152" height="1920"/>
</platform>
</widget>

View File

@ -17,6 +17,7 @@
"winAppName": "CopayWallet",
"wpPublisherId": "{31cdd08b-457c-413d-b440-f6665eec847d}",
"wpProductId": "{5381aa50-9069-11e4-84cc-293caf9cbdc8}",
"pushSenderId": "1036948132229",
"description": "A Secure Bitcoin Wallet",
"version": "2.5.0",
"androidVersion": "115",

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 885 B

After

Width:  |  Height:  |  Size: 885 B

Binary file not shown.

View File

@ -92,6 +92,8 @@ angular.module('copayApp.controllers').controller('amountController', function($
$scope.pushDigit = function(digit) {
if ($scope.amount && $scope.amount.length >= LENGTH_EXPRESSION_LIMIT) return;
if ($scope.amount.indexOf('.') > -1 && digit == '.') return;
if($scope.showAlternativeAmount && $scope.amount.indexOf('.') > -1 && $scope.amount[$scope.amount.indexOf('.') + 2]) return;
$scope.amount = ($scope.amount + digit).replace('..', '.');
checkFontSize();

View File

@ -27,7 +27,7 @@ angular.module('copayApp.controllers').controller('backupController',
});
};
$scope.initFlow = function() {
$scope.setFlow = function(step) {
if (!keys) return;
var words = keys.mnemonic;
@ -39,7 +39,7 @@ angular.module('copayApp.controllers').controller('backupController',
$scope.useIdeograms = words.indexOf("\u3000") >= 0;
$scope.data.passphrase = null;
$scope.customWords = [];
$scope.step = 1;
$scope.step = step || 1;
$scope.selectComplete = false;
$scope.backupError = false;
@ -72,10 +72,10 @@ angular.module('copayApp.controllers').controller('backupController',
var showBackupResult = function() {
if ($scope.backupError) {
var title = gettextCatalog.getString('Uh oh...');
var title = 'Uh oh...';
var message = gettextCatalog.getString("It's important that you write your backup phrase down correctly. If something happens to your wallet, you'll need this backup to recover your money. Please review your backup and try again.");
popupService.showAlert(title, message, function() {
$scope.goToStep(1);
$scope.setFlow(2);
})
} else {
openConfirmBackupModal();
@ -151,7 +151,7 @@ angular.module('copayApp.controllers').controller('backupController',
$scope.goToStep = function(n) {
if (n == 1)
$scope.initFlow();
$scope.setFlow();
if (n == 2)
$scope.step = 2;
if (n == 3) {
@ -203,7 +203,7 @@ angular.module('copayApp.controllers').controller('backupController',
}
$scope.credentialsEncrypted = false;
keys = k;
$scope.initFlow();
$scope.setFlow();
});
});

View File

@ -44,14 +44,20 @@ angular.module('copayApp.controllers').controller('confirmController', function(
var networkName = (new bitcore.Address($scope.toAddress)).network.name;
$scope.network = networkName;
$scope.notAvailable = false;
$scope.insuffientFunds = false;
$scope.noMatchingWallet = false;
var wallets = profileService.getWallets({
onlyComplete: true,
network: networkName,
});
if (!wallets || !wallets.length) {
$scope.noMatchingWallet = true;
}
var filteredWallets = [];
var index = 0;
var index = 0, enoughFunds = false;
lodash.each(wallets, function(w) {
walletService.getStatus(w, {}, function(err, status) {
@ -59,15 +65,20 @@ angular.module('copayApp.controllers').controller('confirmController', function(
$log.error(err);
} else {
if (!status.availableBalanceSat) $log.debug('No balance available in: ' + w.name);
if (status.availableBalanceSat > $scope.toAmount) filteredWallets.push(w);
if (status.availableBalanceSat > $scope.toAmount) {
filteredWallets.push(w);
enoughFunds = true;
}
}
if (++index == wallets.length) {
if (!lodash.isEmpty(filteredWallets)) {
$scope.wallets = lodash.clone(filteredWallets);
$scope.notAvailable = false;
} else {
$scope.notAvailable = true;
if (!enoughFunds)
$scope.insuffientFunds = true;
$log.warn('No wallet available to make the payment');
}
}

View File

@ -37,9 +37,24 @@ angular.module('copayApp.controllers').controller('createController',
};
$scope.showAdvChange = function() {
$scope.showAdv = !$scope.showAdv;
$scope.resizeView();
};
$scope.resizeView = function() {
$timeout(function() {
$ionicScrollDelegate.resize();
}, 10);
});
checkPasswordFields();
};
function checkPasswordFields() {
if (!$scope.encrypt) {
$scope.formData.passphrase = $scope.formData.createPassphrase = $scope.formData.passwordSaved = null;
$timeout(function() {
$scope.$apply();
});
}
};
function updateRCSelect(n) {
@ -160,7 +175,6 @@ angular.module('copayApp.controllers').controller('createController',
function _create(opts) {
ongoingProcess.set('creatingWallet', true);
$timeout(function() {
profileService.createWallet(opts, function(err, client) {
ongoingProcess.set('creatingWallet', false);
if (err) {
@ -173,11 +187,12 @@ angular.module('copayApp.controllers').controller('createController',
$log.debug('Remote preferences saved for:' + client.credentials.walletId)
});
if ($scope.seedSource.id == 'set') {
profileService.setBackupFlag(client.credentials.walletId);
}
$ionicHistory.removeBackView();
if (!client.isComplete()) {
$ionicHistory.nextViewOptions({
disableAnimate: true
@ -188,8 +203,7 @@ angular.module('copayApp.controllers').controller('createController',
walletId: client.credentials.walletId
});
}, 100);
}
else $state.go('tabs.home')
} else $state.go('tabs.home');
});
}, 100);
}

View File

@ -1,9 +1,20 @@
'use strict';
angular.module('copayApp.controllers').controller('exportController',
function($scope, $timeout, $log, $ionicHistory, backupService, walletService, storageService, profileService, platformInfo, gettextCatalog, $state, $stateParams, popupService) {
function($scope, $timeout, $log, $ionicHistory, $ionicScrollDelegate, backupService, walletService, storageService, profileService, platformInfo, gettextCatalog, $state, $stateParams, popupService) {
var wallet = profileService.getWallet($stateParams.walletId);
$scope.showAdvChange = function() {
$scope.showAdv = !$scope.showAdv;
$scope.resizeView();
};
$scope.resizeView = function() {
$timeout(function() {
$ionicScrollDelegate.resize();
});
};
var init = function() {
$scope.formData = {};
$scope.isEncrypted = wallet.isPrivKeyEncrypted();

View File

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('joinController',
function($scope, $rootScope, $timeout, $state, $ionicHistory, profileService, configService, storageService, applicationService, gettext, gettextCatalog, lodash, ledger, trezor, platformInfo, derivationPathHelper, ongoingProcess, walletService, $log, $stateParams, popupService) {
function($scope, $rootScope, $timeout, $state, $ionicHistory, $ionicScrollDelegate, profileService, configService, storageService, applicationService, gettext, gettextCatalog, lodash, ledger, trezor, platformInfo, derivationPathHelper, ongoingProcess, walletService, $log, $stateParams, popupService) {
var isChromeApp = platformInfo.isChromeApp;
var isDevel = platformInfo.isDevel;
@ -12,6 +12,26 @@ angular.module('copayApp.controllers').controller('joinController',
$scope.derivationPath = derivationPathHelper.default;
$scope.account = 1;
$scope.showAdvChange = function() {
$scope.showAdv = !$scope.showAdv;
$scope.resizeView();
};
$scope.resizeView = function() {
$timeout(function() {
$ionicScrollDelegate.resize();
});
checkPasswordFields();
};
function checkPasswordFields() {
if (!$scope.encrypt) {
$scope.passphrase = $scope.createPassphrase = $scope.passwordSaved = null;
$timeout(function() {
$scope.$apply();
});
}
};
this.onQrCodeScanned = function(data) {
$scope.secret = data;
@ -156,11 +176,10 @@ angular.module('copayApp.controllers').controller('joinController',
$state.transitionTo('tabs.copayers', {
walletId: client.credentials.walletId
});
}, 100);
}
else $state.go('tabs.home')
});
} else $state.go('tabs.home');
});
}, 100);
});
};
updateSeedSourceSelect();

View File

@ -1,10 +0,0 @@
'use strict';
angular.module('copayApp.controllers').controller('receiveTipsController', function($scope, $log, storageService) {
$scope.close = function() {
$log.debug('Receive tips accepted');
storageService.setReceiveTipsAccepted(true, function(err) {
$scope.receiveTipsModal.hide();
});
}
});

View File

@ -1,11 +0,0 @@
'use strict';
angular.module('copayApp.controllers').controller('scanTipsController', function($scope, $log, storageService) {
$scope.close = function() {
$log.debug('Scan tips accepted');
storageService.setScanTipsAccepted(true, function(err) {
$scope.$emit('TipsModalClosed', function() {});
$scope.scanTipsModal.hide();
});
}
});

View File

@ -73,28 +73,7 @@ angular.module('copayApp.controllers').controller('scannerController', function(
};
$scope.init = function() {
if (platformInfo.isCordova) scannerInit();
else checkTips();
};
function checkTips() {
//TODO addapt tips to the new QR plugin (mobile)
storageService.getScanTipsAccepted(function(err, accepted) {
if (err) $log.warn(err);
if (accepted) {
scannerInit();
return;
}
$timeout(function() {
$ionicModal.fromTemplateUrl('views/modals/scan-tips.html', {
scope: $scope
}).then(function(modal) {
$scope.scanTipsModal = modal;
$scope.scanTipsModal.show();
});
}, 1000);
});
scannerInit();
};
$scope.$on('TipsModalClosed', function(event) {

View File

@ -1,13 +1,32 @@
'use strict';
angular.module('copayApp.controllers').controller('notificationsController', function($scope, $state, $stateParams, profileService) {
angular.module('copayApp.controllers').controller('notificationsController', function($scope, $state, $timeout, $stateParams, profileService, configService) {
$scope.$on("$ionicView.enter", function(event, data) {
$scope.walletId = data.stateParams.walletId;
});
$scope.walletId = $stateParams.walletId;
$scope.allowNotif = function() {
profileService.pushNotificationsInit();
$timeout(function() {
profileService.pushNotificationsInit();
});
$state.go('onboarding.backupRequest', {
walletId: $scope.walletId
});
}
$scope.disableNotif = function() {
var opts = {
pushNotifications: {
enabled: false
}
};
configService.set(opts, function(err) {
if (err) $log.warn(err);
$state.go('onboarding.backupRequest', {
walletId: $scope.walletId
});
});
};
});

View File

@ -1,28 +1,40 @@
'use strict';
angular.module('copayApp.controllers').controller('tourController',
function($scope, $state, $log, $timeout, $filter, ongoingProcess, profileService, rateService) {
function($scope, $state, $log, $timeout, $filter, ongoingProcess, platformInfo, profileService, rateService) {
var tries = 0;
var isCordova = platformInfo.isCordova;
var isWP = platformInfo.isWP;
var usePushNotifications = isCordova && !isWP;
$scope.init = function() {
$scope.data = {
index: 0
};
$scope.options = {
loop: false,
effect: 'flip',
speed: 500,
spaceBetween: 100
}
$scope.data = {
index: 0
};
rateService.whenAvailable(function() {
var localCurrency = 'USD';
var btcAmount = 1;
var rate = rateService.toFiat(btcAmount * 1e8, localCurrency);
$scope.localCurrencySymbol = '$';
$scope.localCurrencyPerBtc = $filter('formatFiatAmount')(parseFloat(rate.toFixed(2), 10));
$scope.options = {
loop: false,
effect: 'flip',
speed: 500,
spaceBetween: 100
}
$scope.$on("$ionicSlides.sliderInitialized", function(event, data) {
$scope.slider = data.slider;
});
$scope.$on("$ionicSlides.slideChangeStart", function(event, data) {
$scope.data.index = data.slider.activeIndex;
});
$scope.$on("$ionicSlides.slideChangeEnd", function(event, data) {});
$scope.$on("$ionicView.enter", function(event, data) {
rateService.whenAvailable(function() {
var localCurrency = 'USD';
var btcAmount = 1;
var rate = rateService.toFiat(btcAmount * 1e8, localCurrency);
$scope.localCurrencySymbol = '$';
$scope.localCurrencyPerBtc = $filter('formatFiatAmount')(parseFloat(rate.toFixed(2), 10));
});
});
$scope.createDefaultWallet = function() {
@ -33,22 +45,22 @@ angular.module('copayApp.controllers').controller('tourController',
return $timeout(function() {
$log.warn('Retrying to create default wallet......');
if (tries == 3) {
tries == 0;
return $scope.createDefaultWallet();
} else {
tries += 1;
return $scope.createDefaultWallet();
}
return $scope.createDefaultWallet();
}, 3000);
};
ongoingProcess.set('creatingWallet', false);
var wallet = walletClient;
// $state.go('onboarding.collectEmail', {
// fromOnboarding: true,
// walletId: wallet.credentials.walletId
// });
$state.go('tabs.home');
var walletId = wallet.credentials.walletId;
if (!usePushNotifications) {
$state.go('onboarding.backupRequest', {
walletId: walletId
});
}
else {
$state.go('onboarding.notifications', {
walletId: walletId
});
}
});
};
@ -61,14 +73,4 @@ angular.module('copayApp.controllers').controller('tourController',
if ($scope.data.index != 2) $scope.slider.slideNext();
else $state.go('onboarding.welcome');
}
$scope.$on("$ionicSlides.sliderInitialized", function(event, data) {
$scope.slider = data.slider;
});
$scope.$on("$ionicSlides.slideChangeStart", function(event, data) {
$scope.data.index = data.slider.activeIndex;
});
$scope.$on("$ionicSlides.slideChangeEnd", function(event, data) {});
});

View File

@ -6,6 +6,11 @@ angular.module('copayApp.controllers').controller('preferencesController',
var walletId = wallet.credentials.walletId;
$scope.wallet = wallet;
$scope.encryptEnabled = {
value: walletService.isEncrypted(wallet)
};
$scope.encryptChange = function() {
if (!wallet) return;
var val = $scope.encryptEnabled.value;
@ -18,6 +23,9 @@ angular.module('copayApp.controllers').controller('preferencesController',
// ToDo show error?
$scope.encryptEnabled.value = false;
$timeout(function() {
$scope.$apply();
});
return;
}
profileService.updateCredentials(JSON.parse(wallet.export()), function() {
@ -32,6 +40,9 @@ angular.module('copayApp.controllers').controller('preferencesController',
// ToDo show error?
$scope.encryptEnabled.value = true;
$timeout(function() {
$scope.$apply();
});
return;
}
profileService.updateCredentials(JSON.parse(wallet.export()), function() {
@ -64,9 +75,7 @@ angular.module('copayApp.controllers').controller('preferencesController',
var config = configService.getSync();
$scope.encryptEnabled = {
value: walletService.isEncrypted(wallet)
};
if (wallet.isPrivKeyExternal)
$scope.externalSource = wallet.getPrivKeyExternalSourceName() == 'ledger' ? 'Ledger' : 'Trezor';

View File

@ -9,13 +9,17 @@ angular.module('copayApp.controllers').controller('preferencesNotificationsContr
var isCordova = platformInfo.isCordova;
var isIOS = platformInfo.isIOS;
$scope.appName = $window.appConfig.nameCase;
$scope.PNEnabledByUser = true;
$scope.isIOSApp = isIOS && isCordova;
if ($scope.isIOSApp) {
cordova.plugins.diagnostic.isRemoteNotificationsEnabled(function(isEnabled) {
$scope.PNEnabledByUser = isEnabled;
$scope.$digest();
});
try {
PushNotification.hasPermission(function(data) {
$scope.PNEnabledByUser = data.isEnabled;
});
} catch(e) {
$log.error(e);
};
}
$scope.pushNotifications = {
@ -23,15 +27,8 @@ angular.module('copayApp.controllers').controller('preferencesNotificationsContr
};
};
$scope.openSettings = function() {
cordova.plugins.diagnostic.switchToSettings(function() {
$log.debug('switched to settings');
}, function(err) {
$log.debug(err);
});
};
$scope.pushNotificationsChange = function() {
if (!$scope.pushNotifications) return;
var opts = {
pushNotifications: {
enabled: $scope.pushNotifications.value
@ -39,9 +36,9 @@ angular.module('copayApp.controllers').controller('preferencesNotificationsContr
};
configService.set(opts, function(err) {
if (opts.pushNotifications.enabled)
pushNotificationsService.enableNotifications(profileService.walletClients);
profileService.pushNotificationsInit();
else
pushNotificationsService.disableNotifications(profileService.walletClients);
pushNotificationsService.disableNotifications(profileService.getWallets());
if (err) $log.debug(err);
});
};

View File

@ -12,6 +12,12 @@ angular.module('copayApp.controllers').controller('tabHomeController',
$scope.name = $window.appConfig.nameCase;
$scope.homeTip = $stateParams.fromOnboarding;
if(!$scope.homeTip){
storageService.getHomeTipAccepted(function(error, value){
$scope.homeTip = (value == 'false') ? false : true;
});
}
$scope.openNotificationModal = function(n) {
wallet = profileService.getWallet(n.walletId);
@ -164,11 +170,8 @@ angular.module('copayApp.controllers').controller('tabHomeController',
};
$scope.hideHomeTip = function() {
$scope.homeTip = null;
$state.transitionTo($state.current, null, {
reload: true,
inherit: false,
notify: false
storageService.setHomeTipAccepted(false, function(error, value){
$scope.homeTip = false;
});
};

View File

@ -5,21 +5,6 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
$scope.isCordova = platformInfo.isCordova;
$scope.isNW = platformInfo.isNW;
$scope.checkTips = function(force) {
storageService.getReceiveTipsAccepted(function(err, accepted) {
if (err) $log.warn(err);
if (accepted && !force) return;
$timeout(function() {
$ionicModal.fromTemplateUrl('views/modals/receive-tips.html', {
scope: $scope
}).then(function(modal) {
$scope.receiveTipsModal = modal;
$scope.receiveTipsModal.show();
});
}, force ? 1 : 1000);
});
};
$scope.shareAddress = function(addr) {
if ($scope.generatingAddress) return;
@ -84,7 +69,6 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
});
};
if (!$scope.isCordova) $scope.checkTips();
$scope.$on('Wallet/Changed', function(event, wallet) {
if (!wallet) {
$log.debug('No wallet provided');

View File

@ -296,7 +296,8 @@ angular.module('copayApp.services')
if (!val) {
return cb(new Error('NONAGREEDDISCLAIMER: Non agreed disclaimer'));
}
if (usePushNotifications)
var config = configService.getSync();
if (config.pushNotifications.enabled && usePushNotifications)
root.pushNotificationsInit();
return cb();
});
@ -317,6 +318,8 @@ angular.module('copayApp.services')
var defaults = configService.getDefaults();
var push = pushNotificationsService.init(root.wallet);
if (!push) return;
push.on('notification', function(data) {
if (!data.additionalData.foreground) {
$log.debug('Push notification event: ', data.message);

View File

@ -11,10 +11,14 @@ angular.module('copayApp.services')
root.init = function(walletsClients) {
var defaults = configService.getDefaults();
var push = PushNotification.init(defaults.pushNotifications.config);
try {
var push = PushNotification.init(defaults.pushNotifications.config);
} catch(e) {
$log.error(e);
return;
};
push.on('registration', function(data) {
if (root.token) return;
$log.debug('Starting push notification registration');
root.token = data.registrationId;
var config = configService.getSync();
@ -31,7 +35,7 @@ angular.module('copayApp.services')
if (!config.pushNotifications.enabled) return;
if (!root.token) {
$log.warn('No token available for this device. Cannot set push notifications');
$log.warn('No token available for this device. Cannot set push notifications. Needs registration.');
return;
}

View File

@ -195,6 +195,14 @@ angular.module('copayApp.services')
storage.remove('config', cb);
};
root.getHomeTipAccepted = function(cb) {
storage.get('homeTip', cb);
};
root.setHomeTipAccepted = function(val, cb) {
storage.set('homeTip', val, cb);
};
root.setHideBalanceFlag = function(walletId, val, cb) {
storage.set('hideBalance-' + walletId, val, cb);
};
@ -361,21 +369,6 @@ angular.module('copayApp.services')
});
};
root.setScanTipsAccepted = function(val, cb) {
storage.set('scanTips', val, cb);
};
root.getScanTipsAccepted = function(cb) {
storage.get('scanTips', cb);
};
root.setReceiveTipsAccepted = function(val, cb) {
storage.set('receiveTips', val, cb);
};
root.getReceiveTipsAccepted = function(cb) {
storage.get('receiveTips', cb);
};
root.setBackupNeededModalFlag = function(walletId, val, cb) {
storage.set('showBackupNeededModal-' + walletId, val, cb);

View File

@ -22,18 +22,27 @@
font-size: 24px;
margin-top: .5rem;
line-height: 1.3;
@media(max-width: 350px) {
font-size: 20px;
}
}
.onboarding-description {
margin-top: 1rem;
font-size: 16px;
color: rgba(255,255,255,0.5);
line-height: 1.5;
@media(max-width: 350px) {
line-height: 1.3;
}
}
.onboarding-tldr {
font-size: 18px;
margin-top: 1rem;
margin-bottom: 1em;
line-height: 1.3;
@media(max-width: 350px) {
font-size: 16px;
}
}
}
@ -55,7 +64,7 @@
%onboarding-illustration {
position: absolute;
width: 100%;
height: 40%;
height: 45%;
margin-top: 25vh;
top: 0;
background-position: center;

View File

Before

Width:  |  Height:  |  Size: 841 B

After

Width:  |  Height:  |  Size: 841 B

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -51,7 +51,7 @@
</button>
</span>
<button ng-show="selectComplete" class="button button-standard button-primary" ng-click="goToStep(3);" translate>Confirm</button>
<button ng-show="selectComplete" class="button button-standard button-secondary button-clear" ng-click="initFlow();" translate>Clear</button>
<button ng-show="selectComplete" class="button button-standard button-secondary button-clear" ng-click="setFlow(2);" translate>Clear</button>
</div>
</div>
</div>

View File

@ -45,13 +45,19 @@
</div>
</div>
<div class="text-center" ng-show="notAvailable">
<span class="badge badge-assertive" translate>No wallet with enough funds</span>
<div class="text-center" ng-show="noMatchingWallet">
<span class="badge badge-assertive" translate>No appropiate wallet to make this payment</span>
</div>
<div class="text-center" ng-show="insuffientFunds">
<span class="badge badge-assertive" translate>Insufficient funds</span>
</div>
<wallets ng-if="wallets[0]" wallets="wallets"></wallets>
<div class="list card">
<div ng-show="wallets[0]" class="list card">
<div class="item item-icon-left item-icon-right" ng-click="showDescriptionPopup()">
<i class="icon ion-ios-chatbubble-outline size-21"></i>
<span ng-show="!description" translate>Add description</span>
@ -59,16 +65,15 @@
<i ng-show="!description" class="icon ion-ios-plus-empty size-21"></i>
</div>
</div>
<click-to-accept
ng-click="approve(statusChangeHandler)"
ng-if="hasClick"
ng-if="hasClick && wallets[0]"
click-send-status="sendStatus">
Click to pay
</click-to-accept>
</ion-content>
<slide-to-accept
ng-if="!hasClick"
ng-if="!hasClick && wallets[0]"
slide-on-confirm="onConfirm()"
slide-send-status="sendStatus">
Slide to pay

View File

@ -5,7 +5,7 @@
While the software has undergone beta testing and continues to be improved by feedback from the open-source user and developer community, we cannot guarantee that there will be no bugs in the software. You acknowledge that your use of this software is at your own discretion and in compliance with all applicable laws. You are responsible for safekeeping your passwords, private key pairs, PINs and any other codes you use to access the software.
</p>
<p translate>
IF YOU LOSE ACCESS TO YOUR COPAY WALLET OR YOUR ENCRYPTED PRIVATE KEYS AND YOU HAVE NOT SEPARATELY STORED A BACKUP OF YOUR WALLET AND CORRESPONDING PASSWORD, YOU ACKNOWLEDGE AND AGREE THAT ANY BITCOIN YOU HAVE ASSOCIATED WITH THAT COPAY WALLET WILL BECOME INACCESSIBLE. All transaction requests are irreversible. The authors of the software, employees and affiliates of Bitpay, copyright holders, and BitPay, Inc. cannot retrieve your private keys or passwords if you lose or forget them and cannot guarantee transaction confirmation as they do not have control over the Bitcoin network.
IF YOU LOSE ACCESS TO YOUR BITCOIN WALLET OR YOUR ENCRYPTED PRIVATE KEYS AND YOU HAVE NOT SEPARATELY STORED A BACKUP OF YOUR WALLET AND CORRESPONDING PASSWORD, YOU ACKNOWLEDGE AND AGREE THAT ANY BITCOIN YOU HAVE ASSOCIATED WITH THAT WALLET WILL BECOME INACCESSIBLE. All transaction requests are irreversible. The authors of the software, employees and affiliates of Bitpay, copyright holders, and BitPay, Inc. cannot retrieve your private keys or passwords if you lose or forget them and cannot guarantee transaction confirmation as they do not have control over the Bitcoin network.
</p>
<p translate>
To the fullest extent permitted by law, this software is provided “as is” and no representations or warranties can be made of any kind, express or implied, including but not limited to the warranties of merchantability, fitness or a particular purpose and noninfringement. You assume any and all risks associated with the use of the software. In no event shall the authors of the software, employees and affiliates of Bitpay, copyright holders, or BitPay, Inc. be held liable for any claim, damages or other liability, whether in an action of contract, tort, or otherwise, arising from, out of or in connection with the software. We reserve the right to modify this disclaimer from time to time.

View File

@ -40,10 +40,12 @@
</div>
</label>
<ion-toggle ng-model="showAdv" toggle-class="toggle-stable">
<div class="item item-divider"></div>
<a class="item" ng-click="showAdvChange()">
<span translate ng-show="!showAdv">Show advanced options</span>
<span translate ng-show="showAdv">Hide advanced options</span>
</ion-toggle>
</a>
<div ng-show="showAdv">
@ -69,23 +71,6 @@
<input type="number" id="account" ng-model="account" ignore-mouse-wheel>
</label>
<div class="card" ng-show="join.seedSourceId=='new' && createPassphrase">
<div class="item item-text-wrap">
<span translate>
WARNING: The password cannot be recovered. <b>Be sure to write it down</b>. The wallet can not be restored without the password.
</span>
</div>
</div>
<label class="item item-input item-stacked-label" ng-show="join.seedSourceId=='new'">
<span class="input-label" translate>Add a Password</span>
<input type="text"
placeholder="{{'Add an optional password to secure the recovery phrase'|translate}}"
autocapitalize="off"
name="createPassphrase"
ng-model="createPassphrase">
</label>
<label class="item item-input item-stacked-label" ng-show="join.seedSourceId=='set'">
<span class="input-label" translate>Wallet Recovery Phrase</span>
<input id="ext-master"
@ -96,8 +81,21 @@
ng-model="privateKey">
</label>
<label class="item item-input item-stacked-label" ng-show="join.seedSourceId=='set'">
<span class="input-label" translate>Password</span>
<ion-toggle ng-model="encrypt" toggle-class="toggle-positive" ng-change="resizeView()" ng-show="join.seedSourceId == 'new' || join.seedSourceId == 'set'">
<span translate>Encrypt with a Password</span>
</ion-toggle>
<label class="item item-input item-stacked-label" ng-show="join.seedSourceId == 'new' && encrypt">
<span class="input-label" translate>Add a Password</span>
<input type="text"
placeholder="{{'Add an optional password to secure the recovery phrase'|translate}}"
autocapitalize="off"
name="createPassphrase"
ng-model="createPassphrase">
</label>
<label class="item item-input item-stacked-label" ng-show="join.seedSourceId == 'set' && encrypt">
<span class="input-label" translate>Add a Password</span>
<input type="text"
placeholder="{{'The recovery phrase could require a password to be imported'|translate}}"
autocapitalize="off"
@ -105,6 +103,14 @@
ng-model="passphrase">
</label>
<div class="text-center box-notification error" ng-show="(join.seedSourceId =='new' || join.seedSourceId =='set') && encrypt">
<strong translate>This password cannot be recovered. If the password is lost, funds can only be recovered with a valid backup.</strong>
</div>
<ion-checkbox ng-model="passwordSaved" class="checkbox-positive" ng-show="encrypt">
<span class="toggle-label" translate>I have written it down</span>
</ion-checkbox>
<label class="item item-input item-stacked-label" ng-show="join.seedSourceId == 'set'">
<span class="input-label" translate>Derivation Path</span>
<input type="text"
@ -116,8 +122,9 @@
</div> <!-- advanced -->
</div> <!-- list -->
<button type="submit" class="button button-block button-positive" ng-disabled="joinForm.$invalid" translate>
Join
<button type="submit" class="button button-block button-positive"
ng-disabled="joinForm.$invalid || ((encrypt && !passwordSaved) || encrypt && ((join.seedSourceId == 'new' && !createPassphrase) || (join.seedSourceId == 'set' && !passphrase)))"
translate>Join
</button>
</form>
</ion-content>

View File

@ -1,15 +0,0 @@
<ion-modal-view ng-style="{opacity: '0.9'}" ng-controller="receiveTipsController">
<ion-nav-bar class="bar-ligt">
<ion-nav-buttons side="secondary">
<button class="button" ng-click="close()">
X
</button>
</ion-nav-buttons>
</ion-nav-bar>
<ion-content class="has-header">
<div class="text-center">
<h2>Receive bitcoin by sharing your address</h2>
<h3>Other bitcoin users can scan this code to send you money</h3>
</div>
</ion-content>
</ion-modal-view>

View File

@ -1,15 +0,0 @@
<ion-modal-view ng-style="{opacity: '0.9'}" ng-controller="scanTipsController">
<ion-nav-bar class="bar-ligt">
<ion-nav-buttons side="secondary">
<button class="button" ng-click="close()">
X
</button>
</ion-nav-buttons>
</ion-nav-bar>
<ion-content class="has-header">
<div class="text-center">
<h2>Scan the code to pay with bitcoin</h2>
<h3>QR codes could also contain a bitcoin wallet invitation, or an URL</h3>
</div>
</ion-content>
</ion-modal-view>

View File

@ -1,15 +1,17 @@
<ion-modal-view id="tx-status" ng-controller="txStatusController">
<div ng-if="type == 'broadcasted'" class="popup-txsent text-center m30tp">
<i class="icon ion-checkmark-round"></i>
<div ng-show="tx.amountStr" class="m20t size-36">
{{tx.amountStr}}
</div>
<div class="size-24 text-gray m20v">
<span ng-if="!fromBitPayCard" translate>Sent</span>
<span ng-if="fromBitPayCard" translate>Funds sent</span>
</div>
<div class="text-center m20t" ng-if="entryExist || !fromSendTab || fromPayPro">
<a class="button button-positive" ng-click="cancel()" translate>OKAY</a>
<div ng-if="type == 'broadcasted'">
<div class="popup-txsent text-center m30tp">
<i class="icon ion-checkmark-round"></i>
<div ng-show="tx.amountStr" class="m20t size-36">
{{tx.amountStr}}
</div>
<div class="size-24 text-gray m20v">
<span ng-if="!fromBitPayCard" translate>Sent</span>
<span ng-if="fromBitPayCard" translate>Funds sent</span>
</div>
<div class="text-center m20t" ng-if="entryExist || !fromSendTab || fromPayPro">
<a class="button button-positive" ng-click="cancel()" translate>OKAY</a>
</div>
</div>
<div class="collect-address" ng-if="!entryExist && fromSendTab && !fromPayPro">
<div class="row">

View File

@ -5,7 +5,7 @@
<div class="onboarding-illustration-notifications"></div>
<div id="cta-buttons">
<button class="button button-standard button-primary" ng-click="allowNotif()" translate>Allow notifications</button>
<button class="button button-standard button-secondary button-clear" href ui-sref="onboarding.backupRequest({walletId: walletId})" translate>Not now</button>
<button class="button button-standard button-secondary button-clear" ng-click="disableNotif()" translate>Not now</button>
</div>
</ion-content>
</ion-view>

View File

@ -1,4 +1,4 @@
<ion-view ng-controller="tourController" ng-init="init()" class="onboarding" id="onboarding-tour">
<ion-view ng-controller="tourController" class="onboarding" id="onboarding-tour">
<ion-nav-bar>
<ion-nav-title></ion-nav-title>
<ion-nav-buttons side="primary">
@ -6,9 +6,6 @@
<i class="icon ion-ios-arrow-thin-left"></i>
</button>
</ion-nav-buttons>
<ion-nav-buttons side="secondary">
<button class="button back-button button-clear" ng-show="data.index == 0" ng-click="createDefaultWallet()">{{'Skip' | translate}}</button>
</ion-nav-buttons>
</ion-nav-bar>
<ion-slides class="slides" options="options" slider="data.slider">
<ion-slide-page>

View File

@ -18,11 +18,8 @@
<div ng-show="!PNEnabledByUser && isIOSApp">
<div class="item item-divider" translate>Notifications</div>
<div class="padding text-light" translate>
Push notifications for Copay are currently disabled. Enable them in the Settings app.
Push notifications for {{appName}} are currently disabled. Enable them in the Settings app.
</div>
<a class="item" ng-click="openSettings()">
<span translate>Open Settings app</span>
</a>
</div>
</div>
</ion-content>

View File

@ -18,10 +18,12 @@
ng-blur="formFocus(false)">
</label>
<ion-toggle ng-model="showAdv" toggle-class="toggle-stable" ng-change="showAdvChange()">
<div class="item item-divider"></div>
<a class="item" ng-click="showAdvChange()">
<span translate ng-show="!showAdv">Show advanced options</span>
<span translate ng-show="showAdv">Hide advanced options</span>
</ion-toggle>
</a>
<div ng-show="showAdv">
<label class="item item-input item-stacked-label">
@ -41,20 +43,6 @@
<input type="number" ng-model="formData.account" ignore-mouse-wheel>
</label>
<div class="card" ng-show="seedSource.id == 'new' && createPassphrase">
<div class="item item-text-wrap" translate>
WARNING: The password cannot be recovered. <b>Be sure to write it down</b>. The wallet can not be restored without the password.
</div>
</div>
<label class="item item-input item-stacked-label" ng-show="seedSource.id == 'new'">
<span class="input-label" translate>Add a Password</span>
<input type="text"
placeholder="{{'Add an optional password to secure the recovery phrase'|translate}}"
autocapitalize="off"
ng-model="formData.createPassphrase">
</label>
<label class="item item-input item-stacked-label" ng-show="seedSource.id == 'set'">
<span class="input-label" translate>Wallet Recovery Phrase</span>
<input placeholder="{{'Enter the recovery phrase (BIP39)'|translate}}"
@ -63,14 +51,34 @@
ng-model="formData.privateKey">
</label>
<label class="item item-input item-stacked-label" ng-show="seedSource.id == 'set'">
<span class="input-label" translate>Password</span>
<ion-toggle ng-model="encrypt" toggle-class="toggle-positive" ng-change="resizeView()" ng-show="seedSource.id == 'new' || seedSource.id == 'set'">
<span translate>Encrypt with a Password</span>
</ion-toggle>
<label class="item item-input item-stacked-label" ng-show="seedSource.id == 'new' && encrypt">
<span class="input-label" translate>Add a Password</span>
<input type="text"
placeholder="{{'Add an optional password to secure the recovery phrase'|translate}}"
autocapitalize="off"
ng-model="formData.createPassphrase">
</label>
<label class="item item-input item-stacked-label" ng-show="seedSource.id == 'set' && encrypt">
<span class="input-label" translate>Add a Password</span>
<input type="text"
placeholder="{{'The recovery phrase could require a password to be imported'|translate}}"
autocapitalize="off"
ng-model="formData.passphrase">
</label>
<div class="text-center box-notification error" ng-show="(seedSource.id =='new' || seedSource.id =='set') && encrypt">
<strong translate>This password cannot be recovered. If the password is lost, funds can only be recovered with a valid backup.</strong>
</div>
<ion-checkbox ng-model="formData.passwordSaved" class="checkbox-positive" ng-show="encrypt">
<span class="toggle-label" translate>I have written it down</span>
</ion-checkbox>
<label class="item item-input item-stacked-label" ng-show="seedSource.id == 'set'">
<span class="input-label" translate>Derivation Path</span>
<input type="text"
@ -90,7 +98,8 @@
</div> <!-- advanced -->
</div> <!-- list -->
<button type="submit" class="button button-block button-positive" ng-disabled="setupForm.$invalid">
<button type="submit" class="button button-block button-positive"
ng-disabled="setupForm.$invalid || ((encrypt && !formData.passwordSaved) || encrypt && ((seedSource.id == 'new' && !formData.createPassphrase) || (seedSource.id == 'set' && !formData.passphrase)))">
<span translate>Create new wallet</span>
</button>
</form>

View File

@ -48,10 +48,12 @@
</select>
</label>
<ion-toggle ng-model="showAdv" toggle-class="toggle-stable" ng-change="showAdvChange()">
<div class="item item-divider"></div>
<a class="item" ng-click="showAdvChange()">
<span translate ng-show="!showAdv">Show advanced options</span>
<span translate ng-show="showAdv">Hide advanced options</span>
</ion-toggle>
</a>
<div ng-show="showAdv">
<label class="item item-input item-stacked-label">
@ -71,20 +73,6 @@
<input type="number" ng-model="formData.account" ignore-mouse-wheel>
</label>
<div class="card" ng-show="seedSource.id =='new' && formData.createPassphrase">
<div class="item item-text-wrap" translate>
WARNING: The password cannot be recovered. <b>Be sure to write it down</b>. The wallet can not be restored without the password.
</div>
</div>
<label class="item item-input item-stacked-label" ng-show="seedSource.id == 'new'">
<span class="input-label" translate>Add a Password</span>
<input type="text"
placeholder="{{'Add an optional password to secure the recovery phrase'|translate}}"
autocapitalize="off"
ng-model="formData.createPassphrase">
</label>
<label class="item item-input item-stacked-label" ng-show="seedSource.id == 'set'">
<span class="input-label" translate>Wallet Recovery Phrase</span>
<input placeholder="{{'Enter the recovery phrase (BIP39)'|translate}}"
@ -93,14 +81,34 @@
ng-model="formData.privateKey">
</label>
<label class="item item-input item-stacked-label" ng-show="seedSource.id == 'set'">
<span class="input-label" translate>Password</span>
<ion-toggle ng-model="encrypt" toggle-class="toggle-positive" ng-change="resizeView()" ng-show="seedSource.id == 'new' || seedSource.id == 'set'">
<span translate>Encrypt with a Password</span>
</ion-toggle>
<label class="item item-input item-stacked-label" ng-show="seedSource.id == 'new' && encrypt">
<span class="input-label" translate>Add a Password</span>
<input type="text"
placeholder="{{'Add an optional password to secure the recovery phrase'|translate}}"
autocapitalize="off"
ng-model="formData.createPassphrase">
</label>
<label class="item item-input item-stacked-label" ng-show="seedSource.id == 'set' && encrypt">
<span class="input-label" translate>Add a Password</span>
<input type="text"
placeholder="{{'The recovery phrase could require a password to be imported'|translate}}"
autocapitalize="off"
ng-model="formData.passphrase">
</label>
<div class="text-center box-notification error" ng-show="(seedSource.id =='new' || seedSource.id =='set') && encrypt">
<strong translate>This password cannot be recovered. If the password is lost, funds can only be recovered with a valid backup.</strong>
</div>
<ion-checkbox ng-model="formData.passwordSaved" class="checkbox-positive" ng-show="encrypt">
<span class="toggle-label" translate>I have written it down</span>
</ion-checkbox>
<label class="item item-input item-stacked-label" ng-show="seedSource.id == 'set'">
<span class="input-label" translate>Derivation Path</span>
<input type="text"
@ -120,7 +128,8 @@
</div> <!-- advanced -->
</div> <!-- list -->
<button type="submit" class="button button-block button-positive" ng-disabled="setupForm.$invalid">
<button type="submit" class="button button-block button-positive"
ng-disabled="setupForm.$invalid || ((encrypt && !formData.passwordSaved) || encrypt && ((seedSource.id == 'new' && !formData.createPassphrase) || (seedSource.id == 'set' && !formData.passphrase)))">
<span translate>Create {{formData.requiredCopayers}}-of-{{formData.totalCopayers}} wallet</span>
</button>
</form>

View File

@ -18,13 +18,13 @@
</div>
</form>
<ion-toggle ng-show="canSign" ng-model="formData.showAdvanced" toggle-class="toggle-balanced">
<span translate ng-show="!formData.showAdvanced">Show advanced options</span>
<span translate ng-show="formData.showAdvanced">Hide advanced options</span>
</ion-toggle>
<div class="list card" ng-show="canSign">
<a class="item" ng-click="showAdvChange()">
<span translate ng-show="!showAdv">Show advanced options</span>
<span translate ng-show="showAdv">Hide advanced options</span>
</a>
<div class="card" ng-show="formData.showAdvanced">
<ion-checkbox ng-model="formData.noSignEnabled" class="checkbox-balanced" ng-change="noSignEnabledChange()">
<ion-checkbox ng-show="showAdv" ng-model="formData.noSignEnabled" class="checkbox-balanced" ng-change="noSignEnabledChange(); resizeView()">
<span class="toggle-label" translate>Do not include private key</span>
</ion-checkbox>
</div>

View File

@ -126,8 +126,8 @@
ng-show="nextStepEnabled && wallets[0]">
<div class="item item-icon-right item-heading" ng-click="shouldHideNextSteps()" translate>
Next steps
<i class="icon bp-arrow-down" ng-show="!hideNextSteps"></i>
<i class="icon bp-arrow-up" ng-show="hideNextSteps"></i>
<i class="icon bp-arrow-up" ng-show="!hideNextSteps"></i>
<i class="icon bp-arrow-down" ng-show="hideNextSteps"></i>
</div>
<div ng-show="!hideNextSteps">
<a ui-sref="tabs.bitpayCard" ng-show="!externalServices.BitpayCard && bitpayCardEnabled" class="item item-icon-left item-big-icon-left item-icon-right next-step">
@ -137,7 +137,7 @@
<span translate>Add BitPay Visa&reg; Card</span>
<i class="icon bp-arrow-right"></i>
</a>
<a ng-show="!externalServices.BuyAndSell && (coinbaseEnabled || glideraEnabled)" ui-sref="tabs.buyandsell" class="item item-icon-left item-big-icon-left item-icon-right next-step">
<a ng-show="!externalServices.BuyAndSell && (coinbaseEnabled || glideraEnabled)" ui-sref="tabs.buyandsell.glidera" class="item item-icon-left item-big-icon-left item-icon-right next-step">
<i class="icon big-icon-svg">
<div class="bg icon-buy-bitcoin"></div>
</i>

View File

@ -6,9 +6,9 @@
<ion-content>
<div class="list">
<div class="item item-divider"></div>
<a class="item item-icon-left item-icon-right" ui-sref="" ng-hide="true">
<a class="item item-icon-left item-icon-right" ng-hide="true">
<i class="icon big-icon-svg">
<img src="img/icon-excahnge.svg" class="bg"/>
<img src="img/icon-exchange.svg" class="bg"/>
</i>
<span translate>Bitcoin Exchanges</span>
<i class="icon bp-arrow-right"></i>
@ -20,7 +20,7 @@
<span translate>Address Book</span>
<i class="icon bp-arrow-right"></i>
</a>
<a class="item item-icon-left item-icon-right" ui-sref="" ng-hide="true">
<a class="item item-icon-left item-icon-right" ng-hide="true">
<i class="icon big-icon-svg">
<img src="img/icon-send-feedback.svg" class="bg"/>
</i>
@ -37,18 +37,18 @@
<span translate>Notifications</span>
<i class="icon bp-arrow-right"></i>
</a>
<a class="item item-icon-left item-icon-right" ui-sref="tabs.language">
<i class="icon big-icon-svg">
<img src="img/icon-language.svg" class="bg"/>
</i>
<span translate>Language</span>
<span class="item-note">
{{currentLanguageName|translate}}
</span>
<i class="icon bp-arrow-right"></i>
</a>
<!-- See https://github.com/bitpay/bitpay-wallet/issues/265 -->
<!-- <a class="item item&#45;icon&#45;left item&#45;icon&#45;right" ui&#45;sref="tabs.language"> -->
<!-- <i class="icon big&#45;icon&#45;svg"> -->
<!-- <img src="img/icon&#45;language.svg" class="bg"/> -->
<!-- </i> -->
<!-- <span translate>Language</span> -->
<!-- <span class="item&#45;note"> -->
<!-- {{currentLanguageName|translate}} -->
<!-- </span> -->
<!-- <i class="icon bp&#45;arrow&#45;right"></i> -->
<!-- </a> -->
<!-- -->
<a class="item item-icon-left item-icon-right" ui-sref="tabs.unit">
<i class="icon big-icon-svg">
<img src="img/icon-unit.svg" class="bg"/>