Merge branch 'master' into ui-2
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "parity.js",
|
||||
"version": "1.8.6",
|
||||
"version": "1.8.10",
|
||||
"main": "release/index.js",
|
||||
"jsnext:main": "src/index.js",
|
||||
"author": "Parity Team <admin@parity.io>",
|
||||
|
||||
@@ -118,7 +118,7 @@ class SyncWarning extends Component {
|
||||
|
||||
function mapStateToProps (state) {
|
||||
const { health } = state.nodeStatus;
|
||||
const isNotAvailableYet = health.overall.isReady;
|
||||
const isNotAvailableYet = health.overall.isNotReady;
|
||||
const isOk = isNotAvailableYet || health.overall.status === 'ok';
|
||||
|
||||
return {
|
||||
|
||||
@@ -51,5 +51,5 @@ impl WebApp for App {
|
||||
|
||||
#[test]
|
||||
fn test_js() {
|
||||
parity_dapps_glue::js::build(env!("CARGO_MANIFEST_DIR"));
|
||||
parity_dapps_glue::js::build(env!("CARGO_MANIFEST_DIR"), "build");
|
||||
}
|
||||
|
||||
@@ -101,13 +101,7 @@ export default class SecureApi extends Api {
|
||||
return 'dapps.parity';
|
||||
}
|
||||
|
||||
const { host } = this._dappsAddress;
|
||||
|
||||
if (!host || host === '0.0.0.0') {
|
||||
return window.location.hostname;
|
||||
}
|
||||
|
||||
return host;
|
||||
return this._dappsAddress.host;
|
||||
}
|
||||
|
||||
get isConnecting () {
|
||||
@@ -173,6 +167,25 @@ export default class SecureApi extends Api {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves a wildcard address to `window.location.hostname`;
|
||||
*/
|
||||
_resolveHost (url) {
|
||||
const parts = url ? url.split(':') : [];
|
||||
const port = parts[1];
|
||||
let host = parts[0];
|
||||
|
||||
if (!host) {
|
||||
return host;
|
||||
}
|
||||
|
||||
if (host === '0.0.0.0') {
|
||||
host = window.location.hostname;
|
||||
}
|
||||
|
||||
return port ? `${host}:${port}` : host;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a Promise that gets resolved with
|
||||
* a boolean: `true` if the node is up, `false`
|
||||
@@ -316,8 +329,8 @@ export default class SecureApi extends Api {
|
||||
this._uiApi.parity.wsUrl()
|
||||
])
|
||||
.then(([dappsUrl, wsUrl]) => {
|
||||
this._dappsUrl = dappsUrl;
|
||||
this._wsUrl = wsUrl;
|
||||
this._dappsUrl = this._resolveHost(dappsUrl);
|
||||
this._wsUrl = this._resolveHost(wsUrl);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
members = []
|
||||
|
||||
[dependencies]
|
||||
tiny-keccak = "1.0"
|
||||
tiny-keccak = "1.3"
|
||||
tiny-secp256k1 = "0.1"
|
||||
libc = { version = "0.2.14", default-features = false }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user