Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue being addressed
This wallet is a great option to instantly onboard users with a new Ethereum account, simply by going to a website. One downside with the current approach is the risk of losing the private key stored in locale storage, either from the user clearing website data, or the data automatically being cleared from the browser after a certain amount of time. This can result in potential loss-of-funds if steps are not first taken to back up this key, or migrate to a more permanent wallet solution.
Proposed solution
Using the web manifest file we can enable a
standalone
progressive web app (PWA). This allows users on certain browsers/devices to "install" the web app as a standalone application.I have been testing this branch out using an iPhone with Safari. Using a preview deploy at https://punkwallet.netlify.app/ I used the "share" button in mobile Safari and then "Add to Home Screen." I sent some Goerli ETH to the address I was presented with, and then tried a few tests:
None of the above have caused any issues (iPhone + Safari), and so far the address remains the same, and my balance is still showing correctly.
PR updates
manifest.json
file to use"display": "standalone",
and also added higher-resolution image assets and screenshot previews for the PWA.Additional notes
If desired, we could try to add a callout to help clarify for users how this works.