refactor: use the SDK recommendation client - #1240
Draft
TaprootFreak wants to merge 1 commit into
Draft
Conversation
🤖 PR Review Bot❌ TypeScript: 8 errorsThis is an automated review. Please address the issues above. |
6 tasks
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.
Consumer side of step 2 of DFXswiss/packages#198: use the recommendation client from
@dfx.swiss/reactand drop the local copies.Depends on DFXswiss/packages#200.
Changes
src/dto/recommendation.dto.tsandsrc/hooks/recommendation.hook.tsare gone; the types anduseRecommendationnow come from the package.confirmRecommendation/rejectRecommendationtake the id instead of the whole recommendation —the id was the only part that ever reached the wire.
Before this can go green
The package pin in
package.jsonstill points at the published@dfx.swiss/react, which does notexport
useRecommendationyet. CI stays red until DFXswiss/packages#200 is merged and publishedand the pin is raised here. Verified locally against a build of that branch:
tscclean,npm run lintclean, full suite at 673 passing with no new failures (the two suites failing ondeveloptoday still fail, unchanged).Note for whoever picks this up: the package types
expirationDateas optional, because the API omitsit for mail invitations. The local copy declared it required. Any code that formats that date
unconditionally was rendering an invalid date for exactly that case.