Code Monkey home page Code Monkey logo

safe-wallet-web's Introduction

Safe{Wallet}

License Tests GitHub package.json version (branch) GitPOAP Badge

The default Safe web interface.

Contributing

Contributions, be it a bug report or a pull request, are very welcome. Please check our contribution guidelines beforehand.

Getting started with local development

Environment variables

Create a .env file with environment variables. You can use the .env.example file as a reference.

Here's the list of all the environment variables:

Env variable Description
NEXT_PUBLIC_INFURA_TOKEN Infura RPC API token
NEXT_PUBLIC_SAFE_APPS_INFURA_TOKEN Infura token for Safe Apps, falls back to NEXT_PUBLIC_INFURA_TOKEN
NEXT_PUBLIC_IS_PRODUCTION Set to true to build a minified production app
NEXT_PUBLIC_GATEWAY_URL_PRODUCTION The base URL for the Safe Client Gateway
NEXT_PUBLIC_GATEWAY_URL_STAGING The base CGW URL on staging
NEXT_PUBLIC_SAFE_VERSION The latest version of the Safe contract, defaults to 1.3.0
NEXT_PUBLIC_WC_PROJECT_ID WalletConnect v2 project ID
NEXT_PUBLIC_TENDERLY_ORG_NAME Tenderly org name for Transaction Simulation
NEXT_PUBLIC_TENDERLY_PROJECT_NAME Tenderly project name
NEXT_PUBLIC_TENDERLY_SIMULATE_ENDPOINT_URL Tenderly simulation URL
NEXT_PUBLIC_BEAMER_ID Beamer is a news feed for in-app announcements
NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID GTM project id
NEXT_PUBLIC_GOOGLE_TAG_MANAGER_DEVELOPMENT_AUTH Dev GTM key
NEXT_PUBLIC_GOOGLE_TAG_MANAGER_LATEST_AUTH Preview GTM key
NEXT_PUBLIC_GOOGLE_TAG_MANAGER_LIVE_AUTH Production GTM key
NEXT_PUBLIC_SENTRY_DSN Sentry id for tracking runtime errors
NEXT_PUBLIC_IS_OFFICIAL_HOST Whether it's the official distribution of the app, or a fork; has legal implications. Set to true only if you also update the legal pages like Imprint and Terms of use
NEXT_PUBLIC_REDEFINE_API Redefine API base URL
NEXT_PUBLIC_FIREBASE_OPTIONS_PRODUCTION Firebase Cloud Messaging (FCM) initializeApp options on production
NEXT_PUBLIC_FIREBASE_VAPID_KEY_PRODUCTION FCM vapid key on production
NEXT_PUBLIC_FIREBASE_OPTIONS_STAGING FCM initializeApp options on staging
NEXT_PUBLIC_FIREBASE_VAPID_KEY_STAGING FCM vapid key on staging
NEXT_PUBLIC_SPINDL_SDK_KEY Spindl SDK key

If you don't provide some of the variables, the corresponding features will be disabled in the UI.

Running the app locally

Install the dependencies:

yarn

Generate types:

yarn postinstall

Run the development server:

yarn start

Open http://localhost:3000 with your browser to see the app.

Lint

ESLint:

yarn lint --fix

Prettier:

yarn prettier

Tests

Unit tests:

yarn test --watch

Cypress tests

Build a static site:

yarn build

Serve the static files:

yarn serve

Launch the Cypress UI:

yarn cypress:open

You can then choose which e2e tests to run.

Component template

To create a new component from a template:

yarn cmp MyNewComponent

Pre-push hooks

This repo has a pre-push hook that runs the linter (always) and the tests (if the RUN_TESTS_ON_PUSH env variable is set to true) before pushing. If you want to skip the hooks, you can use the --no-verify flag.

Frameworks

This app is built using the following frameworks:

safe-wallet-web's People

Contributors

katspaugh avatar iamacook avatar usame-algan avatar schmanu avatar mike10ca avatar diogosoaress avatar compojoom avatar jmealy avatar mmv08 avatar yagopv avatar francovenica avatar danisomoza avatar dependabot[bot] avatar dasanra avatar germartinez avatar daniel0ar avatar deepaksing avatar abheektripathy avatar moganesan avatar uxio0 avatar nlordell avatar tanyaefremova avatar ryanpwaldon avatar manoranjith-shankar avatar liliya-soroka avatar jfschwarz avatar germavinsmoke avatar fmrsabino avatar biafra23 avatar happyleow avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.