diff --git a/app/config.json b/app/config.json
index 5faac09adf145143f845aadf1e66726ae883d660..d75d8062b7f964b6a5038ead4d3e7c83a5b09537 100644
--- a/app/config.json
+++ b/app/config.json
@@ -59,8 +59,8 @@
"useRelative": true,
"initPhase": false,
"node": {
- "host": "192.168.0.28",
- "port": "9604"
+ "host": "192.168.0.5",
+ "port": "9602"
},
"plugins":{
"es": {
diff --git a/www/js/controllers/app-controllers.js b/www/js/controllers/app-controllers.js
index 225a9aaf71a8a20df5a40cf3a95207c7b99dcb6d..a7ea1b33a521a65015cacdaddabd3d5011ac4b0c 100644
--- a/www/js/controllers/app-controllers.js
+++ b/www/js/controllers/app-controllers.js
@@ -136,7 +136,7 @@ function AppController($scope, $rootScope, $state, $ionicSideMenuDelegate, $q, $
// Warn if wallet has been never used - see #167
var alertIfUnusedWallet = function() {
- if (Wallet.isNeverUsed()) {
+ if (!csConfig.initPhase && Wallet.isNeverUsed()) {
UIUtils.alert.confirm('CONFIRM.LOGIN_UNUSED_WALLET',
'CONFIRM.LOGIN_UNUSED_WALLET_TITLE', {
okText: 'COMMON.BTN_CONTINUE'
diff --git a/www/js/controllers/currency-controllers.js b/www/js/controllers/currency-controllers.js
index 6ad7d296ad7d8d4a7412f0bb95586ef68b3d25cd..ab162b3a1f5b43024bea7bdd9594356e79a74501 100644
--- a/www/js/controllers/currency-controllers.js
+++ b/www/js/controllers/currency-controllers.js
@@ -142,13 +142,22 @@ function CurrencyViewController($scope, $q, $translate, $timeout, BMA, UIUtils,
if ($scope.loadingPeers){
csNetwork.start($scope.node);
+
// Catch event on new peers
+ var refreshing = false;
csNetwork.api.data.on.changed($scope, function(data){
- $timeout(function() {
- console.debug("Updating UI Peers");
- $scope.peers = data.peers;
- $scope.loadingPeers = csNetwork.isBusy();
- }, 1000);
+ if (!refreshing) {
+ refreshing = true;
+ $timeout(function() { // Timeout avoid to quick updates
+ console.debug("Updating UI Peers");
+ $scope.peers = data.peers;
+ // Update currency params
+
+ $scope.loadingPeers = csNetwork.isBusy();
+ refreshing = false;
+ $scope.loadParameter();
+ }, 1100);
+ }
});
$scope.$on('$destroy', function(){
csNetwork.close();
diff --git a/www/js/controllers/wot-controllers.js b/www/js/controllers/wot-controllers.js
index b0497e5c4569fb71e554b24744ac489784123520..b225ec052136b0d51e23f2cbfbbaf5aed449dfc4 100644
--- a/www/js/controllers/wot-controllers.js
+++ b/www/js/controllers/wot-controllers.js
@@ -94,6 +94,7 @@ function WotLookupController($scope, BMA, $state, UIUtils, $timeout, csConfig, D
results: []
};
$scope.entered = false;
+ $scope.wotSearchTextId = 'wotSearchText';
$scope.$on('$ionicView.enter', function(e, $state) {
if (!$scope.entered) {
@@ -112,7 +113,7 @@ function WotLookupController($scope, BMA, $state, UIUtils, $timeout, csConfig, D
}
// removeIf(device)
// Focus on search text (only if NOT device, to avoid keyboard opening)
- $focus('wotSearchText');
+ $focus($scope.wotSearchTextId);
// endRemoveIf(device)
});
@@ -237,11 +238,12 @@ function WotLookupController($scope, BMA, $state, UIUtils, $timeout, csConfig, D
};
}
-function WotLookupModalController($scope, BMA, $state, UIUtils, $timeout, Device, Wallet, WotService, $filter){
+function WotLookupModalController($scope, BMA, $state, UIUtils, $timeout, csConfig, Device, Wallet, WotService, $focus){
'ngInject';
- WotLookupController.call(this, $scope, BMA, $state, UIUtils, $timeout, Device, Wallet, WotService, $filter);
+ WotLookupController.call(this, $scope, BMA, $state, UIUtils, $timeout, csConfig, Device, Wallet, WotService, $focus);
+ $scope.wotSearchTextId = 'wotSearchTextModal';
$scope.cancel = function(){
$scope.closeModal();
};
@@ -253,6 +255,10 @@ function WotLookupModalController($scope, BMA, $state, UIUtils, $timeout, Device
});
};
+ // removeIf(device)
+ // Focus on search text (only if NOT device, to avoid keyboard opening)
+ $focus($scope.wotSearchTextId);
+ // endRemoveIf(device)
}
function WotIdentityViewController($scope, $state, screenmatch, $timeout, UIUtils, Device, WotService) {
diff --git a/www/js/services/network-services.js b/www/js/services/network-services.js
index 8222cd87fe5d9b4a5e639a4a03983e129235771b..39d7d43b19b41e80c25ebb87d2de7a3658d52730 100644
--- a/www/js/services/network-services.js
+++ b/www/js/services/network-services.js
@@ -102,7 +102,7 @@ angular.module('cesium.network.services', ['ngResource', 'ngApi', 'cesium.bma.se
var node = BMA.instance(peer.getHost(), peer.getPort(), false);
return node.blockchain.current()
.then(function(block){
- peer.current = block;
+ peer.currentNumber = block.number;
peer.online = true;
peer.buid = buid(block);
peer.uid = data.uidsByPubkeys[peer.pubkey];
diff --git a/www/templates/currency/tabs/view_network.html b/www/templates/currency/tabs/view_network.html
index d098ae7e463f5a7fc2e58fa854175f75de4a978c..40651b89ada073d24cdbb23847ddbfb95e785336 100644
--- a/www/templates/currency/tabs/view_network.html
+++ b/www/templates/currency/tabs/view_network.html
@@ -13,6 +13,6 @@
<i class="icon ion-android-globe"></i>
<h3><span ng-class="{ positive: peer.uid }">{{::peer.uid || peer.pubkey.substr(0,8)}}</span> <span class="gray">{{::peer.dns && ' | ' + peer.dns}}</span></h3>
<h4>{{::peer.server}}</h4>
- <span class="badge" ng-class="{ 'badge-balanced': peer.hasMainConsensusBlock, 'badge-energized': peer.hasConsensusBlock }">{{peer.current.number}}</span>
+ <span class="badge" ng-class="{ 'badge-balanced': peer.hasMainConsensusBlock, 'badge-energized': peer.hasConsensusBlock }">{{peer.currentNumber}}</span>
</a>
</div>
diff --git a/www/templates/wot/lookup_form.html b/www/templates/wot/lookup_form.html
index 7ba4f3aee8cdf76aaf4f6bade5891b642e24611e..b996edca8c8de2745e65b915076c828c081c137e 100644
--- a/www/templates/wot/lookup_form.html
+++ b/www/templates/wot/lookup_form.html
@@ -7,11 +7,11 @@
ng-model="search.text"
ng-model-options="{ debounce: 650 }"
ng-change="doSearch()">
- <input type="text"
- class="hidden-xs hidden-sm"
- id="wotSearchText" placeholder="{{'WOT.SEARCH_HELP'|translate}}"
- ng-model="search.text"
- on-return="doSearch()">
+ <input type="text"
+ class="hidden-xs hidden-sm"
+ id="{{wotSearchTextId}}" placeholder="{{'WOT.SEARCH_HELP'|translate}}"
+ ng-model="search.text"
+ on-return="doSearch()">
</label>
<div class="padding-top" style="display: block; height: 60px;">
diff --git a/www/templates/wot/modal_lookup.html b/www/templates/wot/modal_lookup.html
index 9ab6b12a49bb262ad729bd0a3010b3d07c790857..c7d4d8055a9e2d7aa8748bd47581ce856c974856 100644
--- a/www/templates/wot/modal_lookup.html
+++ b/www/templates/wot/modal_lookup.html
@@ -9,7 +9,7 @@
</button>
</ion-header-bar>
- <ion-content>
+ <ion-content class="padding no-padding-xs">
<ng-include src="'templates/wot/lookup_form.html'"></ng-include>
</ion-content>
</ion-view>