Skip to content

Commit eeaf670

Browse files
authored
Merge pull request #6032 from Shopify/mza/rm-custom-cc-cert-validation
Remove encryption certificate fingerprint blank validation for custom credit card
2 parents 9d21b64 + c487f84 commit eeaf670

File tree

3 files changed

+6
-25
lines changed

3 files changed

+6
-25
lines changed

.changeset/four-humans-judge.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/app': patch
3+
---
4+
5+
Fixes the `Encryption certificate fingerprint can't be blank` error when generating a custom credit card payments extension with the `shopify app generate extension` command.

packages/app/src/cli/models/extensions/specifications/payments_app_extension_schemas/custom_credit_card_payments_app_extension_schema.test.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -70,28 +70,6 @@ describe('CustomCreditCardPaymentsAppExtensionSchema', () => {
7070
)
7171
})
7272

73-
test('returns an error if encryption certificate fingerprint is blank', async () => {
74-
// When/Then
75-
expect(() =>
76-
CustomCreditCardPaymentsAppExtensionSchema.parse({
77-
...config,
78-
encryption_certificate_fingerprint: '',
79-
}),
80-
).toThrowError(
81-
new zod.ZodError([
82-
{
83-
code: zod.ZodIssueCode.too_small,
84-
minimum: 1,
85-
type: 'string',
86-
inclusive: true,
87-
exact: false,
88-
message: "Encryption certificate fingerprint can't be blank",
89-
path: ['encryption_certificate_fingerprint'],
90-
},
91-
]),
92-
)
93-
})
94-
9573
test('returns an error if buyer_label_translations has invalid format', async () => {
9674
// When/Then
9775
expect(() =>

packages/app/src/cli/models/extensions/specifications/payments_app_extension_schemas/custom_credit_card_payments_app_extension_schema.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ export const CustomCreditCardPaymentsAppExtensionSchema = BasePaymentsAppExtensi
3030
multiple_capture: zod.boolean(),
3131
checkout_hosted_fields: zod.array(zod.string()).optional(),
3232
ui_extension_handle: zod.string().optional(),
33-
encryption_certificate_fingerprint: zod
34-
.string()
35-
.min(1, {message: "Encryption certificate fingerprint can't be blank"}),
33+
encryption_certificate_fingerprint: zod.string(),
3634
checkout_payment_method_fields: zod
3735
.array(
3836
zod.object({

0 commit comments

Comments
 (0)