Skip to content
This repository has been archived by the owner on Aug 24, 2021. It is now read-only.

Commit

Permalink
Fix EthGasStation gasPrice detection, highligh text in inputs/text fi…
Browse files Browse the repository at this point in the history
…elds, show app version in settings
  • Loading branch information
giacomolicari committed May 28, 2018
1 parent fd3036f commit 110bd26
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 9 deletions.
12 changes: 11 additions & 1 deletion dapp/controllers/settingsCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
function () {
angular
.module("multiSigWeb")
.controller("settingsCtrl", function (Web3Service, $scope, Config, Wallet, Utils, Transaction, $window, $uibModal, $sce, $location) {
.controller("settingsCtrl", function (Web3Service, $scope, Config, Wallet, Utils, Transaction, $window, $uibModal, $sce, $location, $http) {

// Don't save the following config values to localStorage
var configBlacklist = [
Expand Down Expand Up @@ -79,10 +79,20 @@

}
);
}

function setAppVersion () {
if (isElectron) {
$scope.appVersion = require('electron').remote.app.getVersion();
} else {
$http.get('package.json').success(function (package_json){
$scope.appVersion = package_json.version;
});
}
}

loadConfig();
setAppVersion();

/**
* Updates configuration
Expand Down
2 changes: 1 addition & 1 deletion dapp/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -169,5 +169,5 @@ input[name="editable-select"]:disabled {
}

::selection {
background:transparent;
background: #b3c3ce;
}
15 changes: 15 additions & 0 deletions dapp/partials/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,18 @@ <h4>
</div>
</form>
</div>

<div class="panel panel-default" ng-if="appVersion !== undefined">
<div class="panel-heading">
<h4>
About
</h4>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-6">
App Version {{ appVersion }}
</div>
</div>
</div>
</div>
23 changes: 16 additions & 7 deletions dapp/services/Wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,16 @@
function(response) {
resolve((response.data.safeLow / 10) * 1e9)
},
reject
function (error) {
// Get gas price from Ethereum Node
Web3Service.web3.eth.getGasPrice(function (g_error, g_result) {
if (g_error) {
reject (g_error);
} else {
resolve(g_result);
}
});
}
)
}
);
Expand Down Expand Up @@ -574,7 +583,7 @@
}
);


};

wallet.deployWithLimitFactoryOffline = function (owners, requiredConfirmations, limit, cb) {
Expand Down Expand Up @@ -1059,7 +1068,7 @@
cb
);
}
});
});
};

/**
Expand Down Expand Up @@ -1098,8 +1107,8 @@
options,
cb
);
}
});
}
});
};

/**
Expand Down Expand Up @@ -1222,9 +1231,9 @@
options,
cb
);
}
}
}
);
);
}
}).call();
};
Expand Down

0 comments on commit 110bd26

Please sign in to comment.