Merge branch 'wallet/sprint/16' into wallet/task/322
This commit is contained in:
commit
397b782017
16 changed files with 41 additions and 123 deletions
|
|
@ -13,10 +13,6 @@ angular.module('copayApp.controllers').controller('advancedSettingsController',
|
|||
$scope.hideNextSteps = {
|
||||
value: config.hideNextSteps.enabled
|
||||
};
|
||||
$scope.displayBitcoinCoreEnabled = {
|
||||
value: config.displayBitcoinCore.enabled
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
$scope.spendUnconfirmedChange = function() {
|
||||
|
|
@ -52,17 +48,6 @@ angular.module('copayApp.controllers').controller('advancedSettingsController',
|
|||
});
|
||||
};
|
||||
|
||||
$scope.displayBitcoinCoreChange = function() {
|
||||
var opts = {
|
||||
displayBitcoinCore: {
|
||||
enabled: $scope.displayBitcoinCoreEnabled.value
|
||||
}
|
||||
};
|
||||
configService.set(opts, function(err) {
|
||||
if (err) $log.debug(err);
|
||||
});
|
||||
};
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
$scope.isWindowsPhoneApp = platformInfo.isCordova && platformInfo.isWP;
|
||||
updateConfig();
|
||||
|
|
|
|||
|
|
@ -29,7 +29,11 @@ angular.module('copayApp.controllers').controller('communityController', functio
|
|||
}
|
||||
|
||||
$scope.open = function(url) {
|
||||
window.open(url, '_system');
|
||||
if (platformInfo.isNW) {
|
||||
require('nw.gui').Shell.openExternal( url );
|
||||
} else {
|
||||
window.open(url, '_system');
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('searchController', function($scope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, $ionicScrollDelegate, bwcError, profileService, lodash, configService, gettext, gettextCatalog, platformInfo, walletService, externalLinkService) {
|
||||
angular.module('copayApp.controllers').controller('searchController', function($scope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, $ionicScrollDelegate, bwcError, profileService, lodash, configService, gettext, gettextCatalog, platformInfo, walletService, externalLinkService, bitcoinCashJsService) {
|
||||
|
||||
var HISTORY_SHOW_LIMIT = 10;
|
||||
var currentTxHistoryPage = 0;
|
||||
|
|
@ -31,6 +31,19 @@ angular.module('copayApp.controllers').controller('searchController', function($
|
|||
var message = tx.message ? tx.message : '';
|
||||
var comment = tx.note ? tx.note.body : '';
|
||||
var addressTo = tx.addressTo ? tx.addressTo : '';
|
||||
|
||||
if ($scope.wallet.coin === 'bch') {
|
||||
|
||||
/**
|
||||
* For each address
|
||||
* I translate the legacy address and add in the searchable string the 3 kind of addresses
|
||||
*/
|
||||
lodash.each(tx.outputs, function(output) {
|
||||
var addr = bitcoinCashJsService.translateAddresses(output.address);
|
||||
addressTo += addr.legacy + addr.bitpay + 'bitcoincash:' + addr.cashaddr
|
||||
});
|
||||
}
|
||||
|
||||
var txid = tx.txid ? tx.txid : '';
|
||||
return ((tx.amountStr + message + addressTo + addrbook + searchableDate + comment + txid).toString()).toLowerCase();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('nextStepsController', function($scope, nextStepsService, $ionicScrollDelegate, $timeout, configService) {
|
||||
angular.module('copayApp.controllers').controller('nextStepsController', function($scope, nextStepsService, $ionicScrollDelegate, $timeout, platformInfo, configService) {
|
||||
|
||||
$scope.hide = false;
|
||||
|
||||
|
|
@ -22,6 +22,10 @@ angular.module('copayApp.controllers').controller('nextStepsController', functio
|
|||
};
|
||||
|
||||
$scope.open = function(url) {
|
||||
window.open(url, '_system');
|
||||
if (platformInfo.isNW) {
|
||||
require('nw.gui').Shell.openExternal( url );
|
||||
} else {
|
||||
window.open(url, '_system');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -83,9 +83,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
|||
|
||||
$scope.$on("$ionicView.enter", function(event, data) {
|
||||
$ionicNavBarDelegate.showBar(true);
|
||||
updateAllWallets(function() {
|
||||
profileService.initBitcoinCoreDisplay();
|
||||
});
|
||||
updateAllWallets();
|
||||
|
||||
addressbookService.list(function(err, ab) {
|
||||
if (err) $log.error(err);
|
||||
|
|
@ -126,8 +124,6 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
|||
$scope.nextStepsItems = nextStepsService.get();
|
||||
}
|
||||
|
||||
$scope.displayBitcoinCore = config.displayBitcoinCore.enabled;
|
||||
|
||||
$scope.showServices = true;
|
||||
pushNotificationsService.init();
|
||||
firebaseEventsService.init();
|
||||
|
|
@ -281,8 +277,6 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
|||
|
||||
var txIdList = [];
|
||||
|
||||
var notificationsBeforeCheck = notifications.length;
|
||||
|
||||
for (var i=0; i<notifications.length; i++) {
|
||||
var txId = notifications[i].txid;
|
||||
if (txIdList.includes(txId)) {
|
||||
|
|
@ -293,15 +287,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
|||
}
|
||||
}
|
||||
|
||||
var notificationsAfterCheck = notifications.length;
|
||||
var removedNotifications = notificationsBeforeCheck - notificationsAfterCheck;
|
||||
|
||||
if (notificationsBeforeCheck != notificationsAfterCheck) {
|
||||
total = total - removedNotifications;
|
||||
}
|
||||
|
||||
$scope.notifications = notifications;
|
||||
$scope.notificationsN = total;
|
||||
$timeout(function() {
|
||||
$ionicScrollDelegate.resize();
|
||||
$scope.$apply();
|
||||
|
|
@ -326,9 +312,4 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
|||
updateAllWallets();
|
||||
};
|
||||
|
||||
$rootScope.$on('Local/SettingsUpdated', function(e, walletId) {
|
||||
configService.whenAvailable(function(config) {
|
||||
$scope.displayBitcoinCore = config.displayBitcoinCore.enabled;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -81,7 +81,6 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
|
|||
coin: v.coin,
|
||||
network: v.network,
|
||||
balanceString: v.cachedBalance,
|
||||
displayWallet: v.coin == 'btc' ? config.displayBitcoinCore.enabled : true,
|
||||
getAddress: function(cb) {
|
||||
walletService.getAddress(v, false, cb);
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue