mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-26 12:29:06 +01:00
e6d5af5f9a
* origin/develop: (131 commits) Update `protobufjs` and remove obsolete advisory exclusion (#14841) Include snap version in pill (#14803) Update PULL_REQUEST_TEMPLATE.md (#14790) fix: keystone transaction qrcode has no white spacing (#14798) Snap notifications integration (#14605) Upgrade @metamask/eth-ledger-bridge-keyring (#14799) snaps-skunkworks@0.15.0 (#14772) Fix proptype errors in network dropdown, tx list item details, and account details modal tests (#14747) Ensure transaction type is correctly updated on edit (#14721) Add fiat onboarding for AVAX and MATIC through Wyre (#14683) Bump @metamask/contract-metadata from 1.33.0 to 1.35.0 (#14791) Slight cleanup of constants/transactions, useTransactionDisplayData, and TransactionIcon (#14784) Migrate the "estimateGas" API call to "getFees" for STX (#14767) Ignore advisory GHSA-wm7h-9275-46v2 (#14789) Adding flag for MV3 (#14762) Add types to send state (#14740) Remove site origin on snap install (#14752) Update design tokens library from 1.5 to 1.6 WIP (#14732) Enables the "Safe Transaction From" copy for safeTransferFrom transactions (#14769) remove draft transaction (#14701) ... |
||
---|---|---|
.. | ||
build | ||
highlights | ||
lib | ||
states | ||
announcer.js | ||
chromereload.js | ||
create-static-server.js | ||
empty.js | ||
generate-lavamoat-policies.sh | ||
generate-migration.sh | ||
gource-viz.sh | ||
jest.config.js | ||
metamaskbot-build-announce.js | ||
missing-locale-strings.js | ||
mock-3box.js | ||
mock-segment.js | ||
README.md | ||
run-ganache.sh | ||
sentry-publish.js | ||
sentry-upload-artifacts.sh | ||
shellcheck.sh | ||
show-deps-install-scripts.js | ||
source-map-explorer.sh | ||
sourcemap-validator.js | ||
static-server.js | ||
stream-flat-map.js | ||
verify-locale-strings.js |
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.