-
Notifications
You must be signed in to change notification settings - Fork 524
[Dashboard] Add webhook version support to Universal Bridge #6779
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
[Dashboard] Add webhook version support to Universal Bridge #6779
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6779 +/- ##
==========================================
- Coverage 55.18% 55.18% -0.01%
==========================================
Files 896 896
Lines 56934 56940 +6
Branches 3944 3943 -1
==========================================
Hits 31420 31420
- Misses 25418 25424 +6
Partials 96 96
🚀 New features to boost your workflow:
|
size-limit report 📦
|
935b3b4
to
766b105
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.
just a small nit
Purchase Complete | ||
</SelectItem> | ||
<SelectItem value="v2">v2</SelectItem> | ||
<SelectItem value="v1">v1</SelectItem> |
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.
nit, if the field is called version
then having v
in the version feels odd
developerFeeBPS: z | ||
.string() | ||
.transform((val) => Number(val)) | ||
.refine((val) => val >= 0 && val <= 100, { | ||
message: "Developer fee must be between 0 and 100", | ||
}) | ||
.optional(), |
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.
The validation for developerFeeBPS
currently transforms string inputs to numbers but doesn't properly handle empty strings, which would become NaN
and fail validation. Consider either:
- Adding a pre-transform check:
.transform((val) => val === "" ? undefined : Number(val))
- Or using a more robust approach with
preprocess
:
z.preprocess(
(val) => val === "" ? undefined : Number(val),
z.number().min(0).max(100).optional()
)
This would ensure empty inputs are properly handled as optional values rather than failing validation.
developerFeeBPS: z | |
.string() | |
.transform((val) => Number(val)) | |
.refine((val) => val >= 0 && val <= 100, { | |
message: "Developer fee must be between 0 and 100", | |
}) | |
.optional(), | |
developerFeeBPS: z | |
.preprocess( | |
(val) => val === "" ? undefined : Number(val), | |
z.number().min(0).max(100).optional() | |
), |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
PR-Codex overview
This PR focuses on enhancing the webhook functionality and fee configuration in the
universal-bridge
section of the dashboard. It introduces new API integrations for managing webhooks and developer fees, while streamlining the related UI components.Detailed summary
<PayWebhooksPage />
inpage.tsx
.developerFeeBPS
validation invalidations.ts
.getFees
API call inpage.tsx
to fetch fee details.<PayConfig />
to includefees
prop and modified form handling for fees.developer.ts
.<PayWebhooksPage />
to usegetWebhooks
instead of deprecated server proxy.