Add sessionToken parameter support to initOnRamp#306
Add sessionToken parameter support to initOnRamp#306tomaszbakula wants to merge 3 commits intocoinbase:mainfrom
Conversation
|
@steveviselli-cb, is there any chance you could have a look into this, please? Thanks. |
|
Hey @tomaszbakula, we're actually migrating this repo over to OnchainKit, the first release went out today! https://github.com/coinbase/onchainkit/releases/tag/v0.33.3 It's not at 100% feature parity yet, but we are focusing our efforts there. It does support passing sessionToken. The docs haven't been updated yet, but will be very soon. |
|
@steveviselli-cb Thank you for the detailed response! Does this mean that you will no longer be accepting any changes to this repository, or is there still room for contributions until OnchainKit reaches full feature parity? |
|
@tomaszbakula yeah sorry, we won't be accepting any more changes to this repo. We will officially end of life it soon and move everything to OnchainKit. |
Description & motivation
I propose extending the
initOnRampfunction by introducing support for asessionTokenparameter. This would allow users to initialize the function using eithersessionTokenorappId.To ensure this update is fully integrated, I’ve updated the TypeScript types to include
sessionTokenas a valid parameter, maintaining type safety throughout the codebase. Additionally, I’ve written new test cases to confirm that thesessionTokenfunctionality works as expected and that there are no regressions with the current implementation.This change would enhance the current functionality without disrupting the existing workflow for those using
appId.Also, the
generateOnRampURL()should be able to generate a URL based on thesessionTokenonly. IfsessionTokenhas been specified, there is no need to provide theaddressesparameter. Currently, it does work, and it's been fixed in this MR.Do you think this kind of update would fit with the project’s goals and be something worth including?
Testing & documentation
I've covered adding the
sessionTokenparameter with the unit test.