Update inject
This commit is contained in:
parent
f8bf4a1522
commit
52828c0444
@ -155,7 +155,7 @@
|
||||
"dependencies": {
|
||||
"@parity/api": "paritytech/js-api#ade4a6750292a2918676039ea53eea20c4c728bc",
|
||||
"@parity/dapp-accounts": "paritytech/dapp-accounts#b4b7113ba8ea25d11dfc0ed6d6c93b85c8a7fac8",
|
||||
"@parity/shared": "paritytech/js-shared#438912f286ca09209e53fda5808205fca2c62940",
|
||||
"@parity/shared": "paritytech/js-shared#c2d2d76934d49b0433518f023fdbfa19e4d827cd",
|
||||
"@parity/ui": "paritytech/js-ui#037782bd16e8abf1c169143aa61749a44b94489b",
|
||||
"es6-error": "4.0.0",
|
||||
"es6-promise": "4.0.5",
|
||||
|
@ -25,11 +25,12 @@ import Web3 from 'web3';
|
||||
import web3extensions from './web3.extensions';
|
||||
|
||||
function initProvider () {
|
||||
let [, appId] = window.location.pathname.split('/');
|
||||
const parts = window.location.pathname.split('/');
|
||||
let appId = parts[1];
|
||||
|
||||
console.log('window.location.pathname', window.location.pathname, appId);
|
||||
|
||||
if (!Api.util.isHex(appId)) {
|
||||
if (appId === 'dapps') {
|
||||
appId = parts[2];
|
||||
} else if (!Api.util.isHex(appId)) {
|
||||
appId = Api.util.sha3(appId);
|
||||
}
|
||||
|
||||
|
@ -201,7 +201,7 @@ module.exports = {
|
||||
}),
|
||||
|
||||
new ServiceWorkerWebpackPlugin({
|
||||
entry: path.join(__dirname, '../src/serviceWorker.js')
|
||||
entry: path.join(__dirname, '../node_modules/@parity/shared/serviceWorker.js')
|
||||
}),
|
||||
|
||||
new CopyWebpackPlugin(
|
||||
|
Loading…
Reference in New Issue
Block a user