Repository navigation
feat: add SetupAgreement list to SetupAction for document consent (ORD-1856) - #618
Open
aaronmboyd wants to merge 1 commit into
Open
aaronmboyd wants to merge 1 commit into
aaronmboyd wants to merge 1 commit into
Conversation
Contributor
|
📦 Preview published under the Install the exact version(s) — npm i @lifi/perps-sdk@0.0.0-preview-2ac7198
npm i @lifi/perps-types@0.0.0-preview-2ac7198 |
QA Review: ORD-1856 — #618Verdict: ✅ Approve · Critical 0 · High 0 · Medium 0 · Low 0 · Awaiting response 0 SummaryType-only change. Adds exported FindingsNone. Checked:
Notes (🔵, not findings)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes ORD-1856
Linear: https://linear.app/lifi-linear/issue/ORD-1856
Intent
This PR adds the
SetupAgreementtype and an optionalagreementslist onSetupAction. The change is type-only.getProvidersalready returns the/providersbody as it is, so no runtime code changes.What changed
packages/perps-types/src/providers.ts: the new exported interfaceSetupAgreement { title; url }.SetupActiongetsagreements?: SetupAgreement[]. Its TSDoc states the UI contract: one link and one checkbox per entry, and the step executes only after the user accepts all entries.ProviderActionanddocsUrldo not change..changeset/ord-1856.md: a minor bump for@lifi/perps-typesand@lifi/perps-sdk.@lifi/perps-sdkre-exports perps-types throughexport * from '@lifi/perps-types'. No provider package re-exports perps-types.Assumptions
None. The field is fully general. The SDK holds no Ondo URLs, because the backend owns the copy (ORD-2056).
Tests
packages/perps-types/src/providers.unit.spec.ts(edited): new compile-time assertions_SetupAgreementKeys(exactlytitleandurl),_SetupAgreementsShape(SetupAgreement[] | undefined) and_SetupAgreementsIsOptional. The existing_ProviderActionKeysassertion still passes, which shows thatProviderActiondoes not get the field.packages/perps-types/src/index.unit.spec.ts(edited): new caseexports SetupAgreement. It checks that the index type equals theproviders.tstype.packages/perps-sdk/src/services/getProviders.unit.spec.ts(edited): new casepasses setup agreements through unchanged. An MSW/providersfixture with two agreements reaches the caller with the same value.Gates:
pnpm check,pnpm check:types,pnpm check:types:spec,pnpm buildandpnpm test:unitpass.Follow-ups
(none). The chain issues already exist: ORD-2056 (backend), ORD-2057 (widget) and ORD-2058 (docs).
Dependencies / upstream branches
No upstream branches. This PR blocks ORD-2056. A human runs the release after the merge, so that the backend can consume the new
@lifi/perps-typesminor version.