diff --git a/src/Components/PayNowButton.res b/src/Components/PayNowButton.res index c8115142a..6de1aa890 100644 --- a/src/Components/PayNowButton.res +++ b/src/Components/PayNowButton.res @@ -65,10 +65,7 @@ let make = ( Utils.handlePostMessage([("handleSdkConfirm", confirmPayload)]) } - let buttonText = - sdkHandleConfirmPayment.buttonText->String.length > 0 - ? sdkHandleConfirmPayment.buttonText - : localeString.payNowButton + let buttonText = sdkHandleConfirmPayment.buttonText->Option.getOr(localeString.payNowButton) React.useEffect4(() => { if showFields { diff --git a/src/Types/PaymentType.res b/src/Types/PaymentType.res index 3b022b3b6..0acca83f5 100644 --- a/src/Types/PaymentType.res +++ b/src/Types/PaymentType.res @@ -134,7 +134,7 @@ type billingAddress = { type sdkHandleConfirmPayment = { handleConfirm: bool, - buttonText: string, + buttonText?: string, confirmParams: ConfirmType.confirmParams, } @@ -260,7 +260,6 @@ let defaultBillingAddress = { let defaultSdkHandleConfirmPayment = { handleConfirm: false, - buttonText: "", confirmParams: ConfirmType.defaultConfirm, }