feat(ramps): rename onRamp* controller & service to ramps*
Explanation
This PR renames all of the "on*" prefixed ramps controllers, services, interfaces, comments, variable names to just "Ramps".
It also adds a build script and a watch script to improve the ramps development environment.
Lastly, it updates the return structure of the geolocation fetch so that the correct values can be access and set to the ramp controller state.
To use: place metamask-mobile and core in the same directory, then cd core/packages/ramps-controller, yarn dev. The watcher will build and replace in the metamask-mobile project.
If the mobile watcher is running the app will auto-refresh.
References
Changelog
@metamask/ramps-controller
Added
- Renamed variables and added dev script
Checklist
- [ ] I've updated the test suite for new or updated code as appropriate
- [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
- [ ] I've communicated my changes to consumers by updating changelogs for packages I've changed
- [ ] I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them
[!NOTE] Renames OnRampService to RampsService (including action namespaces), adds dev watch/link scripts for mobile integration, and fixes geolocation response handling.
- Core renames
- Rename
OnRampService→RampsServiceandOnRampEnvironment→RampsEnvironment.- Update action namespaces/types from
OnRampService:*→RampsService:*(e.g.,getGeolocation).- Adjust imports, messenger types/namespaces, and exports in
src/index.ts, controller/service, and tests.- Bug fix
RampsService#getGeolocation: read and return response text within policy execution; validate non-empty result.- Dev tooling
- Add
dev-watch.jsandlink-ramp-controller.jsto auto-build and copydist/tometamask-mobile.- Add
"dev": "node dev-watch.js"script topackage.json.- Changelog
- Document added scripts, renames, and geolocation fix.
Written by Cursor Bugbot for commit 91c391df869c6e52471bd65e0a7346fa20079112. This will update automatically on new commits. Configure here.