Skip to content

Commit

Permalink
fix: comments addressed
Browse files Browse the repository at this point in the history
  • Loading branch information
Pritish Budhiraja committed Mar 13, 2024
1 parent 95f00f6 commit a6ae6fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 1 addition & 4 deletions src/Components/PayNowButton.res
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions src/Types/PaymentType.res
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ type billingAddress = {

type sdkHandleConfirmPayment = {
handleConfirm: bool,
buttonText: string,
buttonText?: string,
confirmParams: ConfirmType.confirmParams,
}

Expand Down Expand Up @@ -260,7 +260,6 @@ let defaultBillingAddress = {

let defaultSdkHandleConfirmPayment = {
handleConfirm: false,
buttonText: "",
confirmParams: ConfirmType.defaultConfirm,
}

Expand Down

0 comments on commit a6ae6fa

Please sign in to comment.