-
Notifications
You must be signed in to change notification settings - Fork 67
Add dapp-wallet to built-in dapps; load it from fs #126
Conversation
* Add dapp-wallet to built-in dapps * Modify inject.js to cover local dapp name "v1" (not a hash)
package.json
Outdated
@@ -157,6 +157,7 @@ | |||
}, | |||
"dependencies": { | |||
"@parity/api": "2.1.20", | |||
"@parity/dapp-wallet": "github:js-dist-paritytech/dapp-wallet#037638fec1d3146bc3d3980597cee62b37617373", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably this should go in devDependencies for consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, totally
Ah, another bug I found: token images are not working anymore. The reason I suppose: the token images are loaded in the code as @axelchalon Could you do a small PR on dapp-wallet to force it to load token images with |
Waiting on parity-js/dapp-wallet#13 to be merged; then I'll update the dependency and the PR will be ready! |
The wallet retains the same id (v1) as when the dapp was served by Parity, so it shouldn't ask for any new permissions.
I updated inject.js to cover the case of a fs (builtin) dapp with an id that is not a hash.
Also made it so that dapps cannot overwrite already loaded builtin dapps (to ignore the v1
app.type === 'local'
served by Parity until it's removed from the node).I'm sometimes getting "Uncaught Error: Provider needs to be supplied to Api instance" (in the wallet at least) or
window.require
errors; not sure why, don't think it's related to this PR.