From c5c2fe12a706bd4266c9afdcdbf041a374daa8f8 Mon Sep 17 00:00:00 2001 From: Erick Kisuge Date: Fri, 5 Dec 2025 15:41:11 +0300 Subject: [PATCH 1/2] fix(types): merge duplicate PaystackMetadata interfaces into one --- libs/types.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libs/types.ts b/libs/types.ts index 8ea3b3f..502fba7 100644 --- a/libs/types.ts +++ b/libs/types.ts @@ -21,10 +21,7 @@ interface PaystackCustomFields { } interface PaystackMetadata { - custom_fields: PaystackCustomFields[]; -} - -interface PaystackMetadata { + custom_fields?: PaystackCustomFields[]; [key: string]: any; } @@ -66,4 +63,4 @@ export type InitializePayment = (options: { }) => void; export type HookConfig = Omit, 'publicKey'> & - Pick; + Pick; \ No newline at end of file From 4724ff2f04c50211c76dad000886b0ae9e9c05e6 Mon Sep 17 00:00:00 2001 From: Erick Kisuge Date: Fri, 5 Dec 2025 15:44:09 +0300 Subject: [PATCH 2/2] docs: update README usage examples to match current API --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0f377c9..e045d77 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,8 @@ Note that all 3 implementations produce the same results. return (
); @@ -205,7 +206,8 @@ import './App.css'; - {({initializePayment}) => } + {/* Updated usage: pass an object to initializePayment */} + {({initializePayment}) => } );