-
Notifications
You must be signed in to change notification settings - Fork 275
Sam/infinite ramp plugin #5715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sam/infinite ramp plugin #5715
Conversation
2311b66 to
9ebe8d3
Compare
4a14ce2 to
00f5b8c
Compare
6e2b3b7 to
5cf5c68
Compare
5cf5c68 to
53d9054
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First round of review. I need to take a closer look at the Infinite API and some other related things.
| getAuthState: false, // This is always local, no API call | ||
| saveCustomerId: false, // This is always local, no API call | ||
| isAuthenticated: false // This is always local, no API call | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree with Cursor on this one. This is critical for development since we don't want to use real funds for testing.
| } | ||
|
|
||
| resolve({ confirmed: true, transfer }) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor makes a valid point - the funds could come from many utxo's, not necessarily our latest receive address (indeed, this is usually a fresh address for utxo coins). If Infinite.dev is just using this as a refund address, then it's fine. If not, we might need a rethink.
src/util/vault/edgeVault.ts
Outdated
| try { | ||
| const record = await makeRecord(info) | ||
| const json = wasVaultPersonalRecord(record) | ||
| await vaultDisklet.setText(`${info.type}/${record.uuid}.json`, json) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we are saving data in edgeVault/{randomHex}.json. Ok, I guess this is fine.
They don't really need to be UUID's - we could do 128 bits of base58 (about 21 characters). This would simplify creating these things, and since we don't really parse them or read into them, it wouldn't affect anybody.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you feel like its worth it to switch from UUID to hex or base58 encoding of random bits, then I'll do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like we should change the name uuid to recordId or vaultId or such, which says what the ID is used for, not what format it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found a few more things. Now the review is complete.
85e99f7 to
63fa557
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good, aside from renaming uuid to vaultId or something.
63fa557 to
3f584e8
Compare
3f584e8 to
28a711f
Compare
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
noneRequirements
If you have made any visual changes to the GUI. Make sure you have:
https://app.asana.com/0/0/1211067783183644(original task; first attempt)Note
Introduces the Infinite ramp plugin with full auth/KYC/TOS/bank workflows and new UI scenes, adds a vault for user/bank data, updates deep links/navigation, and enhances shared utilities & inputs.
infiniteramp plugin (src/plugins/ramps/infinite/*) with API client, normalized currency mapping, and workflows: authenticate, KYC (webview/polling), TOS, bank account add, confirmation, transfer status.allRampPlugins.ts; env config supportsRAMP_PLUGIN_INITS.infinite.RampKycFormScene,RampPendingScene,RampBankFormScene,RampBankRoutingDetailsScene,RampConfirmationScenewith navigation wiring inMain.tsxand DevTest hooks.ramplink type handling inDeepLinkTypes, parser, andDeepLinkingActions(including legacyfiatProviderpassthrough).util/vault/*) to create/update/getpersonalInfo,addressInfo,bankAccountInforecords; comprehensive tests added.FilledTextInput: addminLength, improved message styling (danger/warn), snapshot updates.SectionHeading, tweakParagraphprops typing.cleanFetch: switch toURL, addasSearchParamscodec;PeriodicTask:setDelay, numericwait.CurrencyInfoHelpers: addgetContractAddress.DEBUG_VERBOSE_LOGGING.@noble/curvesand@noble/hashesfor signing; lockfile updated.Written by Cursor Bugbot for commit 28a711f. This will update automatically on new commits. Configure here.