Merge branch 'master' of https://github.com/bitpay/copay into bug/android-balance-view

This commit is contained in:
Andy Phillipson 2016-12-15 15:39:08 -05:00
commit dd00604edc
20 changed files with 229 additions and 129 deletions

View file

@ -104,14 +104,14 @@ angular.module('copayApp.controllers').controller('addressesController', functio
$timeout(function() {
$scope.showInfo = !$scope.showInfo;
$ionicScrollDelegate.resize();
});
}, 10);
};
$scope.readMore = function() {
$timeout(function() {
$scope.showMore = !$scope.showMore;
$ionicScrollDelegate.resize();
});
}, 10);
};
$scope.showMenu = function(allAddresses, $event) {

View file

@ -30,22 +30,24 @@ angular.module('copayApp.controllers').controller('advancedSettingsController',
};
$scope.global = $rootScope;
if(!$scope.global.developmentUtilitiesEnabled){
if (!$scope.global.developmentUtilitiesEnabled) {
$scope.global.developmentUtilitiesEnabled = {
value: false
};
}
$scope.toggledDevelopmentUtils = function (){
if($scope.global.developmentUtilitiesEnabled.value){
$scope.toggledDevelopmentUtils = function() {
if ($scope.global.developmentUtilitiesEnabled.value) {
$log.debug('User enabled development utilities.');
$ionicScrollDelegate.resize();
$timeout(function() {
$ionicScrollDelegate.resize();
}, 10);
} else {
$log.debug('User disabled development utilities.');
}
}
$scope.activateFeedbackCard = function () {
$scope.activateFeedbackCard = function() {
$scope.feedbackCardActivating = true;
storageService.getFeedbackInfo(function(error, info) {
var feedbackInfo = JSON.parse(info);
@ -56,10 +58,10 @@ angular.module('copayApp.controllers').controller('advancedSettingsController',
storageService.setFeedbackInfo(JSON.stringify(feedbackInfo), function() {
$log.debug('Activated feedback card with: ' + JSON.stringify(feedbackInfo));
$ionicHistory.clearCache();
$timeout(function(){
$timeout(function() {
$scope.feedbackCardActivating = false;
$scope.feedbackCardActivated = true;
$timeout(function(){
$timeout(function() {
$scope.feedbackCardActivated = false;
}, 10000);
}, 500);
@ -67,7 +69,7 @@ angular.module('copayApp.controllers').controller('advancedSettingsController',
});
}
$scope.resetActivateFeedbackCard = function(){
$scope.resetActivateFeedbackCard = function() {
$scope.feedbackCardActivated = false;
}

View file

@ -483,20 +483,12 @@ angular.module('copayApp.controllers').controller('confirmController', function(
}
});
return;
}
if (!wallet.canSign() && !wallet.isPrivKeyExternal()) {
$log.info('No signing proposal: No private key');
return walletService.onlyPublish(wallet, txp, function(err, txp) {
if (err) return setSendError(err);
});
}
}
ongoingProcess.set('creatingTx', true, onSendStatusChange);
createTx(wallet, false, function(err, txp) {
ongoingProcess.set('creatingTx', false, onSendStatusChange);
if (err) return;
if (err) return;
var config = configService.getSync();
var spendingPassEnabled = walletService.isEncrypted(wallet);
@ -539,7 +531,12 @@ angular.module('copayApp.controllers').controller('confirmController', function(
function statusChangeHandler(processName, showName, isOn) {
$log.debug('statusChangeHandler: ', processName, showName, isOn);
if ((processName === 'broadcastingTx' || ((processName === 'signingTx') && $scope.wallet.m > 1)) && !isOn) {
if (
(
processName === 'broadcastingTx' ||
((processName === 'signingTx') && $scope.wallet.m > 1) ||
(processName == 'sendingTx' && !$scope.wallet.canSign() && !$scope.wallet.isPrivKeyExternal())
) && !isOn) {
$scope.sendStatus = 'success';
$scope.$digest();
} else if (showName) {
@ -760,6 +757,15 @@ angular.module('copayApp.controllers').controller('confirmController', function(
};
function publishAndSign(wallet, txp, onSendStatusChange) {
if (!wallet.canSign() && !wallet.isPrivKeyExternal()) {
$log.info('No signing proposal: No private key');
return walletService.onlyPublish(wallet, txp, function(err) {
if (err) setSendError(err);
}, onSendStatusChange);
}
walletService.publishAndSign(wallet, txp, function(err, txp) {
if (err) return setSendError(err);

View file

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('createController',
function($scope, $rootScope, $timeout, $log, lodash, $state, $ionicScrollDelegate, $ionicHistory, profileService, configService, gettextCatalog, ledger, trezor, platformInfo, derivationPathHelper, ongoingProcess, walletService, storageService, popupService) {
function($scope, $rootScope, $timeout, $log, lodash, $state, $ionicScrollDelegate, $ionicHistory, profileService, configService, gettextCatalog, ledger, trezor, platformInfo, derivationPathHelper, ongoingProcess, walletService, storageService, popupService, $window) {
var isChromeApp = platformInfo.isChromeApp;
var isCordova = platformInfo.isCordova;
@ -33,7 +33,6 @@ angular.module('copayApp.controllers').controller('createController',
$scope.formData.derivationPath = derivationPathHelper.default;
$scope.setTotalCopayers(tc);
updateRCSelect(tc);
updateSeedSourceSelect(tc);
};
$scope.showAdvChange = function() {
@ -44,7 +43,7 @@ angular.module('copayApp.controllers').controller('createController',
$scope.resizeView = function() {
$timeout(function() {
$ionicScrollDelegate.resize();
});
}, 10);
checkPasswordFields();
};
@ -75,18 +74,27 @@ angular.module('copayApp.controllers').controller('createController',
$scope.seedSource = seedOptions[0];
if (n > 1 && isChromeApp)
seedOptions.push({
id: 'ledger',
label: 'Ledger Hardware Wallet',
});
/*
if (isChromeApp || isDevel) {
seedOptions.push({
id: 'trezor',
label: 'Trezor Hardware Wallet',
});
Disable Hardware Wallets for BitPay distribution
*/
if ($window.appConfig.name == 'copay') {
if (n > 1 && isChromeApp) {
seedOptions.push({
id: 'ledger',
label: 'Ledger Hardware Wallet',
});
}
if (isChromeApp || isDevel) {
seedOptions.push({
id: 'trezor',
label: 'Trezor Hardware Wallet',
});
}
}
$scope.seedOptions = seedOptions;
};

View file

@ -12,7 +12,7 @@ angular.module('copayApp.controllers').controller('exportController',
$scope.resizeView = function() {
$timeout(function() {
$ionicScrollDelegate.resize();
});
}, 10);
};
function getPassword(cb) {

View file

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('importController',
function($scope, $timeout, $log, $state, $stateParams, $ionicHistory, $ionicScrollDelegate, profileService, configService, sjcl, ledger, trezor, derivationPathHelper, platformInfo, bwcService, ongoingProcess, walletService, popupService, gettextCatalog) {
function($scope, $timeout, $log, $state, $stateParams, $ionicHistory, $ionicScrollDelegate, profileService, configService, sjcl, ledger, trezor, derivationPathHelper, platformInfo, bwcService, ongoingProcess, walletService, popupService, gettextCatalog, $window) {
var isChromeApp = platformInfo.isChromeApp;
var isDevel = platformInfo.isDevel;
@ -17,6 +17,7 @@ angular.module('copayApp.controllers').controller('importController',
$scope.formData.derivationPath = derivationPathHelper.default;
$scope.formData.account = 1;
$scope.importErr = false;
$scope.showHardwareWallet = $window.appConfig.name == 'copay';
if ($stateParams.code)
$scope.processWalletInfo($stateParams.code);
@ -359,7 +360,7 @@ angular.module('copayApp.controllers').controller('importController',
$scope.resizeView = function() {
$timeout(function() {
$ionicScrollDelegate.resize();
});
}, 10);
};
});

View file

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('joinController',
function($scope, $rootScope, $timeout, $state, $ionicHistory, $ionicScrollDelegate, profileService, configService, storageService, applicationService, gettextCatalog, lodash, ledger, trezor, platformInfo, derivationPathHelper, ongoingProcess, walletService, $log, $stateParams, popupService) {
function($scope, $rootScope, $timeout, $state, $ionicHistory, $ionicScrollDelegate, profileService, configService, storageService, applicationService, gettextCatalog, lodash, ledger, trezor, platformInfo, derivationPathHelper, ongoingProcess, walletService, $log, $stateParams, popupService, $window) {
var isChromeApp = platformInfo.isChromeApp;
var isDevel = platformInfo.isDevel;
@ -20,7 +20,7 @@ angular.module('copayApp.controllers').controller('joinController',
$scope.resizeView = function() {
$timeout(function() {
$ionicScrollDelegate.resize();
});
}, 10);
checkPasswordFields();
};
@ -57,19 +57,26 @@ angular.module('copayApp.controllers').controller('joinController',
}];
$scope.seedSource = self.seedOptions[0];
/*
if (isChromeApp) {
self.seedOptions.push({
id: 'ledger',
label: 'Ledger Hardware Wallet',
});
}
Disable Hardware Wallets
if (isChromeApp || isDevel) {
self.seedOptions.push({
id: 'trezor',
label: 'Trezor Hardware Wallet',
});
*/
if ($window.appConfig.name == 'copay') {
if (isChromeApp) {
self.seedOptions.push({
id: 'ledger',
label: 'Ledger Hardware Wallet',
});
}
if (isChromeApp || isDevel) {
self.seedOptions.push({
id: 'trezor',
label: 'Trezor Hardware Wallet',
});
}
}
};

View file

@ -9,8 +9,8 @@ angular.module('copayApp.controllers').controller('backupWarningController', fun
$scope.openPopup = function() {
$ionicModal.fromTemplateUrl('views/includes/screenshotWarningModal.html', {
scope: $scope,
backdropClickToClose: false,
hardwareBackButtonClose: false
backdropClickToClose: true,
hardwareBackButtonClose: true
}).then(function(modal) {
$scope.warningModal = modal;
$scope.warningModal.show();

View file

@ -1,29 +1,35 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesAltCurrencyController',
function($scope, $log, $timeout, $ionicHistory, configService, rateService, lodash, profileService, walletService) {
function($scope, $log, $timeout, $ionicHistory, configService, rateService, lodash, profileService, walletService, storageService) {
var next = 10;
var completeAlternativeList;
var config = configService.getSync();
$scope.currentCurrency = config.wallet.settings.alternativeIsoCode;
$scope.listComplete = false;
function init() {
var unusedCurrencyList = [{
isoCode: 'LTL'
}, {
isoCode: 'BTC'
}];
rateService.whenAvailable(function() {
var unusedCurrencyList = [{
isoCode: 'LTL'
}, {
isoCode: 'BTC'
}];
$scope.listComplete = false;
var idx = lodash.indexBy(unusedCurrencyList, 'isoCode');
var idx = lodash.indexBy(unusedCurrencyList, 'isoCode');
var idx2 = lodash.indexBy($scope.lastUsedAltCurrencyList, 'isoCode');
rateService.whenAvailable(function() {
completeAlternativeList = lodash.reject(rateService.listAlternatives(), function(c) {
return idx[c.isoCode];
completeAlternativeList = lodash.reject(rateService.listAlternatives(true), function(c) {
return idx[c.isoCode] || idx2[c.isoCode];
});
$scope.altCurrencyList = completeAlternativeList.slice(0, 10);
$timeout(function() {
$scope.$apply();
});
});
$scope.altCurrencyList = completeAlternativeList.slice(0, next);
});
}
$scope.loadMore = function() {
$timeout(function() {
@ -34,6 +40,17 @@ angular.module('copayApp.controllers').controller('preferencesAltCurrencyControl
}, 100);
};
$scope.findCurrency = function(search) {
if (!search) init();
$scope.altCurrencyList = lodash.filter(completeAlternativeList, function(item) {
var val = item.name;
return lodash.includes(val.toLowerCase(), search.toLowerCase());
});
$timeout(function() {
$scope.$apply();
});
};
$scope.save = function(newAltCurrency) {
var opts = {
wallet: {
@ -48,9 +65,27 @@ angular.module('copayApp.controllers').controller('preferencesAltCurrencyControl
if (err) $log.warn(err);
$ionicHistory.goBack();
saveLastUsed(newAltCurrency);
walletService.updateRemotePreferences(profileService.getWallets(), {}, function() {
$log.debug('Remote preferences saved');
});
});
};
function saveLastUsed(newAltCurrency) {
$scope.lastUsedAltCurrencyList.unshift(newAltCurrency);
$scope.lastUsedAltCurrencyList = lodash.uniq($scope.lastUsedAltCurrencyList, 'isoCode');
$scope.lastUsedAltCurrencyList = $scope.lastUsedAltCurrencyList.slice(0, 3);
storageService.setLastCurrencyUsed(JSON.stringify($scope.lastUsedAltCurrencyList), function() {});
};
$scope.$on("$ionicView.beforeEnter", function(event, data) {
var config = configService.getSync();
$scope.currentCurrency = config.wallet.settings.alternativeIsoCode;
storageService.getLastCurrencyUsed(function(err, lastUsedAltCurrency) {
$scope.lastUsedAltCurrencyList = lastUsedAltCurrency ? JSON.parse(lastUsedAltCurrency) : [];
init();
});
});
});

View file

@ -1,24 +1,34 @@
'use strict';
angular.module('copayApp.controllers').controller('proposalsController',
function($timeout, $scope, profileService, $log, txpModalService) {
function($timeout, $scope, profileService, $log, txpModalService, addressbookService) {
$scope.fetchingProposals = true;
$scope.$on("$ionicView.enter", function(event, data){
profileService.getTxps(50, function(err, txps) {
$scope.fetchingProposals = false;
if (err) {
$log.error(err);
return;
}
$scope.txps = txps;
$timeout(function() {
$scope.$apply();
}, 1);
$scope.$on("$ionicView.enter", function(event, data) {
addressbookService.list(function(err, ab) {
if (err) $log.error(err);
$scope.addressbook = ab || {};
profileService.getTxps(50, function(err, txps) {
$scope.fetchingProposals = false;
if (err) {
$log.error(err);
return;
}
$scope.txps = txps;
$timeout(function() {
$scope.$apply();
});
});
});
});
$scope.openTxpModal = txpModalService.open;
$scope.createdWithinPastDay = function(time) {
var now = new Date();
var date = new Date(time * 1000);
return (now.getTime() - date.getTime()) < (1000 * 60 * 60 * 24);
};
});

View file

@ -126,6 +126,12 @@ angular.module('copayApp.controllers').controller('tabHomeController',
});
});
$scope.createdWithinPastDay = function(time) {
var now = new Date();
var date = new Date(time * 1000);
return (now.getTime() - date.getTime()) < (1000 * 60 * 60 * 24);
};
$scope.openExternalLink = function() {
var url = 'https://github.com/bitpay/copay/releases/latest';
var optIn = true;
@ -187,7 +193,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
$timeout(function() {
$ionicScrollDelegate.resize();
$scope.$apply();
}, 100);
}, 10);
})
};
@ -240,7 +246,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
$timeout(function() {
$ionicScrollDelegate.resize();
$scope.$apply();
}, 100);
}, 10);
});
};
@ -269,7 +275,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
$timeout(function() {
$ionicScrollDelegate.resize();
$scope.$apply();
}, 100);
}, 10);
};
var bitpayCardCache = function() {

View file

@ -86,7 +86,7 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
$scope.setWallet = function(index) {
$scope.wallet = $scope.wallets[index];
$scope.walletIndex = index;
if ($scope.walletAddrs[$scope.walletIndex].addr) $scope.addr = $scope.walletAddrs[$scope.walletIndex].addr;
if ($scope.walletAddrs[$scope.wallet.id].addr) $scope.addr = $scope.walletAddrs[$scope.walletIndex].addr;
else $scope.setAddress(false);
}

View file

@ -55,7 +55,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
$timeout(function() {
$ionicScrollDelegate.resize();
$scope.$apply();
});
}, 10);
});
};
@ -145,15 +145,15 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
if (index == wallets.length) {
$scope.checkingBalance = false;
if ($scope.hasFunds != true) {
$ionicScrollDelegate.freezeScroll(true);
}
$timeout(function() {
$scope.$apply();
});
}
});
});
if ($scope.hasFunds != true) {
$ionicScrollDelegate.freezeScroll(true);
}
};
$scope.$on("$ionicView.beforeEnter", function(event, data) {

View file

@ -111,18 +111,24 @@ RateService.prototype.fromFiat = function(amount, code) {
return amount / this.getRate(code) * this.BTC_TO_SAT;
};
RateService.prototype.listAlternatives = function() {
RateService.prototype.listAlternatives = function(sort) {
var self = this;
if (!this.isAvailable()) {
return [];
}
return self.lodash.map(this.getAlternatives(), function(item) {
var alternatives = self.lodash.map(this.getAlternatives(), function(item) {
return {
name: item.name,
isoCode: item.isoCode
}
});
if (sort) {
alternatives.sort(function(a, b) {
return a.name.toLowerCase() > b.name.toLowerCase() ? 1 : -1;
});
}
return self.lodash.uniq(alternatives, 'isoCode');
};
angular.module('copayApp.services').factory('rateService', function($http, lodash) {

View file

@ -77,25 +77,25 @@ angular.module('copayApp.services')
////////////////////////////////////////////////////////////////////////////
//
// UPGRADING STORAGE
//
//
// 1. Write a function to upgrade the desired storage key(s). The function should have the protocol:
//
//
// _upgrade_x(key, network, cb), where:
//
//
// `x` is the name of the storage key
// `key` is the name of the storage key being upgraded
// `key` is the name of the storage key being upgraded
// `network` is one of 'livenet', 'testnet'
//
// 2. Add the storage key to `_upgraders` object using the name of the key as the `_upgrader` object key
// with the value being the name of the upgrade function (e.g., _upgrade_x). In order to avoid conflicts
// when a storage key is involved in multiple upgraders as well as predicte the order in which upgrades
// occur the `_upgrader` object key should be prefixed with '##_' (e.g., '01_') to create a unique and
// occur the `_upgrader` object key should be prefixed with '##_' (e.g., '01_') to create a unique and
// sortable name. This format is interpreted by the _upgrade() function.
//
//
// Upgraders are executed in numerical order per the '##_' object key prefix.
//
//
var _upgraders = {
'00_bitpayDebitCards' : _upgrade_bitpayDebitCards // 2016-11: Upgrade bitpayDebitCards-x to bitpayAccounts-x
'00_bitpayDebitCards': _upgrade_bitpayDebitCards // 2016-11: Upgrade bitpayDebitCards-x to bitpayAccounts-x
};
function _upgrade_bitpayDebitCards(key, network, cb) {
@ -375,6 +375,14 @@ angular.module('copayApp.services')
storage.remove('nextStep-' + service, cb);
};
root.setLastCurrencyUsed = function(lastCurrencyUsed, cb) {
storage.set('lastCurrencyUsed', lastCurrencyUsed, cb)
};
root.getLastCurrencyUsed = function(cb) {
storage.get('lastCurrencyUsed', cb)
};
root.checkQuota = function() {
var block = '';
// 50MB
@ -487,12 +495,14 @@ angular.module('copayApp.services')
bitpayAccounts = bitpayAccounts || {};
Object.keys(bitpayAccounts).forEach(function(userId) {
var data = bitpayAccounts[userId]['bitpayDebitCards-' + network];
var newCards = lodash.reject(data.cards, {'eid': card.eid});
var newCards = lodash.reject(data.cards, {
'eid': card.eid
});
data.cards = newCards;
root.setBitpayDebitCards(network, data, function(err) {
if (err) cb(err);
// If there are no more cards in storage then re-enable the next step entry.
root.getBitpayDebitCards(network, function(err, cards){
root.getBitpayDebitCards(network, function(err, cards) {
if (err) cb(err);
if (cards.length == 0) {
root.removeNextStep('BitpayCard', cb);

View file

@ -891,20 +891,14 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
};
root.onlyPublish = function(wallet, txp, cb) {
ongoingProcess.set('sendingTx', true);
root.onlyPublish = function(wallet, txp, cb, customStatusHandler) {
ongoingProcess.set('sendingTx', true, customStatusHandler);
root.publishTx(wallet, txp, function(err, publishedTxp) {
root.invalidateCache(wallet);
ongoingProcess.set('sendingTx', false);
if (err) return cb(err);
var type = root.getViewStatus(wallet, createdTxp);
root.openStatusModal(type, createdTxp, function() {
$rootScope.$emit('Local/TxAction', wallet.id);
return;
});
return cb(null, publishedTxp);
ongoingProcess.set('sendingTx', false, customStatusHandler);
if (err) return cb(bwcError.msg(err));
$rootScope.$emit('Local/TxAction', wallet.id);
return cb();
});
};

View file

@ -58,8 +58,8 @@
</div>
<a class="item item-icon-right" ng-hide="!useSendMax && (insufficientFunds || noMatchingWallet)" ng-click="showWalletSelector()">
<span class="label" ng-if="!isGlidera" translate>From</span>
<span class="label" ng-if="isGlidera == 'buy'" translate>To</span>
<span class="label" ng-if="isGlidera == 'sell'" translate>From</span>
<span class="label" ng-if="isGlidera == 'buy'">To</span>
<span class="label" ng-if="isGlidera == 'sell'">From</span>
<div class="wallet">
<i class="icon big-icon-svg">
<img src="img/icon-wallet.svg" ng-style="{'background-color': wallet.color}" class="bg"/>
@ -123,7 +123,7 @@
ng-if="!isCordova && wallets[0] && !insufficientFunds && !noMatchingWallet"
click-send-status="sendStatus"
has-wallet-chosen="wallet">
Click to pay
{{'Accept' | translate}}
</click-to-accept>
<slide-to-accept
ng-disabled="!wallet"
@ -131,14 +131,15 @@
slide-on-confirm="onConfirm()"
slide-send-status="sendStatus"
has-wallet-chosen="wallet">
Slide to pay
{{'Accept' | translate}}
</slide-to-accept>
<slide-to-accept-success
slide-success-show="sendStatus === 'success'"
slide-success-on-confirm="onSuccessConfirm()"
slide-success-hide-on-confirm="true">
<span ng-hide="wallet.m > 1">Payment Sent</span>
<span ng-show="wallet.m > 1">Proposal Created</span>
<span ng-show="wallet.m == 1 && (wallet.canSign() || wallet.isPrivKeyExternal())" translate>Payment Sent</span>
<span ng-show="wallet.m > 1 && (wallet.canSign() || wallet.isPrivKeyExternal())" translate>Proposal Created</span>
<span ng-show="!wallet.canSign() && !wallet.isPrivKeyExternal()" translate>Transaction created</span>
<div ng-show="isGlidera" class="glidera-success">
<span ng-show="isGlidera == 'buy'">A transfer has been initiated from your bank account. Your bitcoins should arrive to your wallet in 2-4 business day</span>
<span ng-show="isGlidera == 'sell'">A transfer has been initiated to your bank account. Should arrive in 4-6 business days</span>

View file

@ -16,7 +16,7 @@
<span translate>File/Text</span>
</div>
<div class="col" ng-click="hardware = true; phrase = file = false; showAdv = false" ng-style="hardware &&
{'border-bottom-style': 'solid'}">
{'border-bottom-style': 'solid'}" ng-show="showHardwareWallet">
<span translate>Hardware wallet</span>
</div>
</div>

View file

@ -166,19 +166,19 @@
ng-if="tx.pendingForUs && canSign && !paymentExpired && hasClick"
click-send-status="sendStatus"
has-wallet-chosen="true">
Click to accept
{{'Accept'| translate}}
</click-to-accept>
<slide-to-accept
ng-if="tx.pendingForUs && canSign && !paymentExpired && !hasClick"
slide-on-confirm="onConfirm()"
slide-send-status="sendStatus"
has-wallet-chosen="true">
Slide to accept
{{'Accept'| translate}}
</slide-to-accept>
<slide-to-accept-success
slide-success-show="sendStatus === 'success'"
slide-success-on-confirm="onSuccessConfirm()"
>
Payment Sent
{{'Payment Sent' | translate}}
</slide-to-accept-success>
</ion-modal-view>

View file

@ -7,13 +7,27 @@
</ion-nav-back-button>
</ion-nav-bar>
<ion-content>
<ion-radio ng-repeat="altCurrency in altCurrencyList" ng-value="altCurrency.isoCode" ng-model="currentCurrency"
ng-click="save(altCurrency)">{{altCurrency.name}}
</ion-radio>
<div class="bar bar-header item-input-inset m20b">
<label class="item-input-wrapper">
<i class="icon ion-ios-search placeholder-icon"></i>
<input type="search" ng-init="searchedAltCurrency = ''" ng-model="searchedAltCurrency" ng-change="findCurrency(searchedAltCurrency)"
placeholder="{{'Search your currency' | translate}}">
</label>
</div>
<div class="list" ng-if="lastUsedAltCurrencyList[0]">
<ion-radio ng-repeat="lastUsedAltCurrency in lastUsedAltCurrencyList" ng-value="lastUsedAltCurrency.isoCode" ng-model="currentCurrency"
ng-click="save(lastUsedAltCurrency)">{{lastUsedAltCurrency.name}}
</ion-radio>
</div>
<div class="list">
<ion-radio ng-repeat="altCurrency in altCurrencyList" ng-value="altCurrency.isoCode" ng-model="currentCurrency"
ng-click="save(altCurrency)">{{altCurrency.name}}
</ion-radio>
</div>
<ion-infinite-scroll
ng-if="!listComplete"
on-infinite="loadMore()"
distance="1%">
</ion-infinite-scroll>
ng-if="!listComplete"
on-infinite="loadMore()"
distance="50%">
</ion-infinite-scroll>
</ion-content>
</ion-view>