Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Use persistent storage #177

Merged
merged 3 commits into from
Aug 2, 2018
Merged

Use persistent storage #177

merged 3 commits into from
Aug 2, 2018

Conversation

axelchalon
Copy link
Contributor

No description provided.

@axelchalon axelchalon added the A0-pleasereview Pull request needs code review. label Jul 20, 2018
General-Beck and others added 2 commits July 24, 2018 03:14
enable gitsync
* Remove shell_requestNewToken RPC method. The token must be retrieved internally (by importing DappsRequestsStore in Parity UI), this way we can be sure that the appId is coming from a trusted source. The token, along with the appId, are now passed as query string parameters to the dapp (and to subsequent pages during in-dapp navigation)
* Use new version of @parity/api stripped of shell_requestNewToken methods that are now unused
* Use synchronous blocking methods in preload.js to maximize chances of web3/parity/ethereum objects being available directly to the dapp, before its own js executes.
@axelchalon
Copy link
Contributor Author

  • Remove shell_requestNewToken RPC method. The token must be retrieved internally (by importing DappsRequestsStore in Parity UI), this way we can be sure that the appId is coming from a trusted source. The token, along with the appId, are now passed as query string parameters to the dapp (and to subsequent pages during in-dapp navigation)
  • Use new version of @parity/api stripped of shell_requestNewToken methods that are now unused
  • Use synchronous blocking methods in preload.js to maximize chances of web3/parity/ethereum objects being available directly to the dapp, before its own js executes.

@axelchalon axelchalon requested review from amaury1093 and removed request for amaury1093 August 2, 2018 14:27
// Load inject.js as a string to inject it into the webview with executeJavaScript
const injectFile = fs.readFileSync(path.join(remote.getGlobal('dirName'), '..', '.build', 'inject.js'), 'utf8');

webFrame.executeJavaScript(injectFile);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@amaury1093
Copy link
Contributor

Closes #112
Closes #145

@amaury1093 amaury1093 added A8-looksgood Pull request is reviewed well. B0-patchthis Pull request should also be back-ported to the beta/stable branch(es). and removed A0-pleasereview Pull request needs code review. labels Aug 2, 2018
@amaury1093 amaury1093 merged commit b263b04 into master Aug 2, 2018
@amaury1093 amaury1093 deleted the ac-persist branch August 2, 2018 15:46
amaury1093 pushed a commit that referenced this pull request Aug 2, 2018
* Use persistent storage for webviews

* Update .gitlab-ci.yml

enable gitsync

* Retrieve dapp token internally

* Remove shell_requestNewToken RPC method. The token must be retrieved internally (by importing DappsRequestsStore in Parity UI), this way we can be sure that the appId is coming from a trusted source. The token, along with the appId, are now passed as query string parameters to the dapp (and to subsequent pages during in-dapp navigation)
* Use new version of @parity/api stripped of shell_requestNewToken methods that are now unused
* Use synchronous blocking methods in preload.js to maximize chances of web3/parity/ethereum objects being available directly to the dapp, before its own js executes.
amaury1093 added a commit that referenced this pull request Aug 2, 2018
* Use persistent storage for webviews

* Update .gitlab-ci.yml

enable gitsync

* Retrieve dapp token internally

* Remove shell_requestNewToken RPC method. The token must be retrieved internally (by importing DappsRequestsStore in Parity UI), this way we can be sure that the appId is coming from a trusted source. The token, along with the appId, are now passed as query string parameters to the dapp (and to subsequent pages during in-dapp navigation)
* Use new version of @parity/api stripped of shell_requestNewToken methods that are now unused
* Use synchronous blocking methods in preload.js to maximize chances of web3/parity/ethereum objects being available directly to the dapp, before its own js executes.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood Pull request is reviewed well. B0-patchthis Pull request should also be back-ported to the beta/stable branch(es).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants