@miden-npm/react 2.0.9 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1988,6 +1988,7 @@ var BaseSuccess = ({
1988
1988
  value: successObject.paymentId
1989
1989
  }
1990
1990
  ) }),
1991
+ successObject.paymentDate,
1991
1992
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "py-4", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1992
1993
  BaseLabelInfo,
1993
1994
  {
@@ -3014,8 +3015,7 @@ function PayByCard({
3014
3015
  if (response.transactionReference?.trim()) {
3015
3016
  onPaymentAuthorized?.({
3016
3017
  paymentId: response.transactionReference,
3017
- paymentDate: response?.data?.updatedAt,
3018
- // optional if present
3018
+ paymentDate: response?.data?.updatedAt ?? (/* @__PURE__ */ new Date()).toISOString(),
3019
3019
  paymentStatus: "authorized",
3020
3020
  message
3021
3021
  });
@@ -3522,7 +3522,7 @@ var PayByTransfer = ({
3522
3522
  setPaymentReferenceStatus("pending");
3523
3523
  onPaymentAuthorized?.({
3524
3524
  paymentId: transactionReference,
3525
- paymentDate: response.data?.updatedAt,
3525
+ paymentDate: response?.data?.updatedAt ?? (/* @__PURE__ */ new Date()).toISOString(),
3526
3526
  paymentStatus: "pending",
3527
3527
  message
3528
3528
  });
@@ -3530,7 +3530,7 @@ var PayByTransfer = ({
3530
3530
  setPaymentReferenceStatus("confirmed");
3531
3531
  onPaymentAuthorized?.({
3532
3532
  paymentId: transactionReference,
3533
- paymentDate: response.data?.updatedAt,
3533
+ paymentDate: response?.data?.updatedAt ?? (/* @__PURE__ */ new Date()).toISOString(),
3534
3534
  paymentStatus: "confirmed",
3535
3535
  message
3536
3536
  });
@@ -3541,7 +3541,7 @@ var PayByTransfer = ({
3541
3541
  setMessage("Transaction confirmed !!");
3542
3542
  onPaymentAuthorized?.({
3543
3543
  paymentId: transactionReference,
3544
- paymentDate: response.data?.updatedAt,
3544
+ paymentDate: response?.data?.updatedAt ?? (/* @__PURE__ */ new Date()).toISOString(),
3545
3545
  paymentStatus: "confirmed",
3546
3546
  message
3547
3547
  });
@@ -3923,7 +3923,7 @@ var PayByStableCoin = ({
3923
3923
  setPaymentReferenceStatus("pending");
3924
3924
  onPaymentAuthorized?.({
3925
3925
  paymentId: transactionReference,
3926
- paymentDate: response.data?.updatedAt ?? "",
3926
+ paymentDate: response?.data?.updatedAt ?? (/* @__PURE__ */ new Date()).toISOString(),
3927
3927
  paymentStatus: "pending",
3928
3928
  message
3929
3929
  });
@@ -3932,7 +3932,7 @@ var PayByStableCoin = ({
3932
3932
  setPaymentReferenceStatus("confirmed");
3933
3933
  onPaymentAuthorized?.({
3934
3934
  paymentId: transactionReference,
3935
- paymentDate: response.data?.updatedAt,
3935
+ paymentDate: response?.data?.updatedAt ?? (/* @__PURE__ */ new Date()).toISOString(),
3936
3936
  paymentStatus: "confirmed",
3937
3937
  message
3938
3938
  });
@@ -4232,6 +4232,8 @@ function BzpCheckoutCard({
4232
4232
  setSuccessObject({ ...event });
4233
4233
  if (event.paymentStatus === "authorized") {
4234
4234
  setCheckoutState("SUCCESS");
4235
+ console.log("checkout state", checkoutState);
4236
+ debugger;
4235
4237
  import_react_hot_toast.default.success("Payment authorization successful.", toastConfig);
4236
4238
  } else if (event.paymentStatus === "confirmed") {
4237
4239
  setCheckoutState("SUCCESS");
@@ -4348,7 +4350,7 @@ function BzpCheckoutCard({
4348
4350
  onError: onErrorHandler
4349
4351
  }
4350
4352
  ) }),
4351
- checkoutState === "SUCCESS" || checkoutState === "USED" && paymentType === "BANK_TRANSFER" && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4353
+ (checkoutState === "SUCCESS" || checkoutState === "USED" && paymentType === "BANK_TRANSFER") && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4352
4354
  BaseSuccess,
4353
4355
  {
4354
4356
  amount: paymentObject.amount,
@@ -4698,7 +4700,7 @@ function MidenCheckoutCard({
4698
4700
  }
4699
4701
  ) })
4700
4702
  ] }),
4701
- checkoutState === "SUCCESS" || checkoutState === "USED" && paymentType === "BANK_TRANSFER" && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
4703
+ (checkoutState === "SUCCESS" || checkoutState === "USED" && paymentType === "BANK_TRANSFER") && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
4702
4704
  BaseSuccess,
4703
4705
  {
4704
4706
  amount: paymentObject.amount,