@reevit/react 0.5.8 → 0.5.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.js +1 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -180,7 +180,7 @@ var ReevitAPIClient = class {
|
|
|
180
180
|
const headers = {
|
|
181
181
|
"Content-Type": "application/json",
|
|
182
182
|
"X-Reevit-Client": "@reevit/react",
|
|
183
|
-
"X-Reevit-Client-Version": "0.
|
|
183
|
+
"X-Reevit-Client-Version": "0.5.9"
|
|
184
184
|
};
|
|
185
185
|
if (this.publicKey) {
|
|
186
186
|
headers["X-Reevit-Key"] = this.publicKey;
|
|
@@ -2251,19 +2251,6 @@ function ReevitCheckout({
|
|
|
2251
2251
|
selectMethod(activeProvider.methods[0]);
|
|
2252
2252
|
}
|
|
2253
2253
|
}, [activeProvider, selectedMethod, selectMethod]);
|
|
2254
|
-
react.useEffect(() => {
|
|
2255
|
-
if (isOpen && selectedMethod && paymentIntent && !showPSPBridge) {
|
|
2256
|
-
const psp = (selectedProvider || paymentIntent.recommendedPsp || "paystack").toLowerCase();
|
|
2257
|
-
const needsPhone = psp.includes("mpesa");
|
|
2258
|
-
if (selectedMethod === "card") {
|
|
2259
|
-
setShowPSPBridge(true);
|
|
2260
|
-
} else if (selectedMethod === "mobile_money") {
|
|
2261
|
-
if (!needsPhone || (momoData?.phone || phone)) {
|
|
2262
|
-
setShowPSPBridge(true);
|
|
2263
|
-
}
|
|
2264
|
-
}
|
|
2265
|
-
}
|
|
2266
|
-
}, [isOpen, selectedMethod, showPSPBridge, paymentIntent, momoData, phone, selectedProvider]);
|
|
2267
2254
|
const handleOpen = react.useCallback(() => {
|
|
2268
2255
|
if (controlledIsOpen !== void 0) return;
|
|
2269
2256
|
setIsOpen(true);
|