@miden-npm/react 2.1.6 → 2.1.9
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 +14 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3627,6 +3627,7 @@ function PayByCard({
|
|
|
3627
3627
|
{
|
|
3628
3628
|
label: "Card Pin",
|
|
3629
3629
|
required: true,
|
|
3630
|
+
type: "password",
|
|
3630
3631
|
rules: ["numeric"],
|
|
3631
3632
|
value: payForm.cardPin,
|
|
3632
3633
|
mask: "0000",
|
|
@@ -3681,7 +3682,7 @@ function PayByCard({
|
|
|
3681
3682
|
}
|
|
3682
3683
|
),
|
|
3683
3684
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex items-center justify-between gap-4 mt-6", children: [
|
|
3684
|
-
formIndex
|
|
3685
|
+
formIndex < 2 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3685
3686
|
BaseButton,
|
|
3686
3687
|
{
|
|
3687
3688
|
label: "Previous",
|
|
@@ -3703,12 +3704,13 @@ function PayByCard({
|
|
|
3703
3704
|
disabled: isMakingPayment
|
|
3704
3705
|
}
|
|
3705
3706
|
),
|
|
3706
|
-
formIndex === 2 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "w-
|
|
3707
|
+
formIndex === 2 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3707
3708
|
BaseButton,
|
|
3708
3709
|
{
|
|
3709
3710
|
label: "Validate OTP",
|
|
3710
3711
|
type: "primary",
|
|
3711
3712
|
caller,
|
|
3713
|
+
customClass: "w-full",
|
|
3712
3714
|
loading: isValidatingOtp,
|
|
3713
3715
|
onClick: proceedHandler
|
|
3714
3716
|
}
|
|
@@ -4178,9 +4180,10 @@ var PayByStableCoin = ({
|
|
|
4178
4180
|
environment,
|
|
4179
4181
|
caller
|
|
4180
4182
|
);
|
|
4183
|
+
const newResponse = caller === "buzapay" ? response.data : response.stableCoins;
|
|
4181
4184
|
if (response?.isSuccessful) {
|
|
4182
4185
|
setStableCoins(
|
|
4183
|
-
|
|
4186
|
+
newResponse?.map((c) => ({
|
|
4184
4187
|
label: c.name,
|
|
4185
4188
|
value: c.name
|
|
4186
4189
|
})) ?? []
|
|
@@ -4229,23 +4232,25 @@ var PayByStableCoin = ({
|
|
|
4229
4232
|
caller
|
|
4230
4233
|
);
|
|
4231
4234
|
if (response?.isSuccessful) {
|
|
4232
|
-
setPaymentReferenceDetails(
|
|
4233
|
-
|
|
4235
|
+
setPaymentReferenceDetails(
|
|
4236
|
+
caller === "buzapay" ? response.data : response
|
|
4237
|
+
);
|
|
4238
|
+
const needsConfirm = paymentReferenceDetails?.finalTransactionStatus == null || paymentReferenceDetails?.paymentStatus == null;
|
|
4234
4239
|
if (needsConfirm) {
|
|
4235
4240
|
setMessage("Transaction not confirmed !!");
|
|
4236
4241
|
setPaymentReferenceStatus("pending");
|
|
4237
4242
|
onPaymentAuthorized?.({
|
|
4238
4243
|
paymentId: transactionReference,
|
|
4239
|
-
paymentDate:
|
|
4244
|
+
paymentDate: paymentReferenceDetails?.updatedAt ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
4240
4245
|
paymentStatus: "pending",
|
|
4241
4246
|
message
|
|
4242
4247
|
});
|
|
4243
|
-
} else if (
|
|
4248
|
+
} else if (paymentReferenceDetails?.finalTransactionStatus === "Success" || paymentReferenceDetails?.paymentStatus === "Payment Received") {
|
|
4244
4249
|
setMessage("Transaction confirmed !!");
|
|
4245
4250
|
setPaymentReferenceStatus("confirmed");
|
|
4246
4251
|
onPaymentAuthorized?.({
|
|
4247
4252
|
paymentId: transactionReference,
|
|
4248
|
-
paymentDate:
|
|
4253
|
+
paymentDate: paymentReferenceDetails?.updatedAt ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
4249
4254
|
paymentStatus: "confirmed",
|
|
4250
4255
|
message
|
|
4251
4256
|
});
|
|
@@ -4255,7 +4260,7 @@ var PayByStableCoin = ({
|
|
|
4255
4260
|
setMessage(response.responseMessage || "");
|
|
4256
4261
|
onPaymentAuthorized?.({
|
|
4257
4262
|
paymentId: transactionReference,
|
|
4258
|
-
paymentDate:
|
|
4263
|
+
paymentDate: (/* @__PURE__ */ new Date()).toISOString(),
|
|
4259
4264
|
paymentStatus: "used",
|
|
4260
4265
|
message
|
|
4261
4266
|
});
|