You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kumavis
07da8ce589
|
3 years ago | |
---|---|---|
.. | ||
build | 3 years ago | |
highlights | 3 years ago | |
lib | 3 years ago | |
states | 3 years ago | |
README.md | 3 years ago | |
announcer.js | 4 years ago | |
chromereload.js | 4 years ago | |
create-static-server.js | 4 years ago | |
empty.js | 4 years ago | |
generate-lavamoat-policies.sh | 3 years ago | |
generate-migration.sh | 4 years ago | |
gource-viz.sh | 5 years ago | |
jest.config.js | 3 years ago | |
metamaskbot-build-announce.js | 3 years ago | |
missing-locale-strings.js | 4 years ago | |
mock-3box.js | 4 years ago | |
mock-segment.js | 3 years ago | |
run-ganache.sh | 3 years ago | |
sentry-publish.js | 3 years ago | |
sentry-upload-artifacts.sh | 3 years ago | |
shellcheck.sh | 5 years ago | |
show-deps-install-scripts.js | 4 years ago | |
source-map-explorer.sh | 4 years ago | |
sourcemap-validator.js | 3 years ago | |
static-server.js | 4 years ago | |
stream-flat-map.js | 3 years ago | |
verify-locale-strings.js | 3 years ago |
README.md
Development
Several files which are needed for developing on MetaMask.
Usually each file or directory contains information about its scope / usage.
Segment
Debugging with the Mock Segment API
To start the Mock Segment API:
- Add/replace the
SEGMENT_HOST
andSEGMENT_WRITE_KEY
variables in.metamaskrc
SEGMENT_HOST='http://localhost:9090' SEGMENT_WRITE_KEY='FAKE'
- Build the project to the
./dist/
folder withyarn dist
- Run the Mock Segment API from the command line
node development/mock-segment.js
Events triggered whilst using the extension will be logged to the console of the Mock Segment API.
More information on the API and its usage can be found here.
Debugging in Segment
To debug in a production Segment environment:
- Create a free account on Segment
- Create a New Workspace
- Add a Source (Node.js)
- Copy the
Write Key
from the API Keys section under Settings - Add/replace the
SEGMENT_HOST
andSEGMENT_WRITE_KEY
variables in.metamaskrc
SEGMENT_HOST='https://api.segment.io' SEGMENT_WRITE_KEY='COPIED_WRITE_KEY'
- Build the project to the
./dist/
folder withyarn dist
Events triggered whilst using the extension will be displayed in Segment's Debugger.
Debugging Segment requests in MetaMask
To opt in to MetaMetrics;
- Unlock the extension
- Open the Account menu
- Click the
Settings
menu item - Click the
Security & Privacy
menu item - Toggle the
Participate in MetaMetrics
menu option to theON
position
You can inspect the requests in the Network
tab of your browser's Developer Tools (background.html)
by filtering for POST
requests to /v1/batch
. The full url will be http://localhost:9090/v1/batch
or https://api.segment.io/v1/batch
respectively.