Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Firefox Support for Lace Wallet Extension #1308

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

danielmain
Copy link
Contributor

@danielmain danielmain commented Jul 19, 2024

Intention

This pull request aims to extend the Lace Wallet browser extension support to Firefox. The Lace Wallet, initially built and optimized for Chrome, now includes compatibility for Firefox. However, there are certain runtime issues that need addressing, particularly related to Content Security Policy (CSP) violations.

Current Status

The Firefox extension can be successfully loaded and installed as shown in the screenshot.
image
However, upon running, it encounters CSP-related runtime errors. Specifically, the following error is observed:

Content-Security-Policy: The page’s settings blocked a JavaScript eval (script-src) from being executed because it violates the following directive: “script-src 'self' 'wasm-unsafe-eval'” (Missing 'unsafe-eval')

Steps to Build

  1. Navigate to the apps/browser-extension-wallet directory in your project.

  2. Run the following command to build the Firefox extension:

    yarn build:firefox
  3. Upon successful build, an artifact is created in the directory:

    apps/browser-extension-wallet/artifacts-firefox/lace-1.13.0.zip
    

Additional Notes

  • The build process involves reading specific environment variables defined in the .env file to configure the manifest file appropriately for Firefox.
  • Despite successful installation, the extension runs into CSP issues which need further investigation and resolution.
  • The provided screenshot (about:debugging#/runtime/this-firefox) shows the extension loaded in Firefox Developer Edition (129.0), with runtime errors available upon inspection.

@danielmain danielmain self-assigned this Jul 19, 2024
@danielmain danielmain requested review from a team as code owners July 19, 2024 10:21
@melroy89
Copy link

what are the CSP errors you are facing?

@rhyslbw rhyslbw marked this pull request as draft September 13, 2024 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants