mozrest-sdk-react-dev 0.3.16 → 0.3.17
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/mozrest-sdk.es.js +8 -7
- package/package.json +1 -1
package/mozrest-sdk.es.js
CHANGED
|
@@ -129607,7 +129607,7 @@ const PaymentsEditDrawer = ({
|
|
|
129607
129607
|
response_type: "code",
|
|
129608
129608
|
client_id: config$1.stripe_client_id,
|
|
129609
129609
|
scope: "read_write",
|
|
129610
|
-
redirect_uri: `${window.location.origin}
|
|
129610
|
+
redirect_uri: `${window.location.origin}#stripe-connect`
|
|
129611
129611
|
});
|
|
129612
129612
|
const width = 500;
|
|
129613
129613
|
const height = 600;
|
|
@@ -130000,10 +130000,11 @@ function Main({
|
|
|
130000
130000
|
useEffect(() => {
|
|
130001
130001
|
const handleStripeCallback = () => {
|
|
130002
130002
|
var _a2, _b;
|
|
130003
|
-
const
|
|
130004
|
-
const
|
|
130005
|
-
const
|
|
130006
|
-
const
|
|
130003
|
+
const hash2 = window.location.hash;
|
|
130004
|
+
const params = new URLSearchParams(hash2.substring(1));
|
|
130005
|
+
const code = params.get("code");
|
|
130006
|
+
const error22 = params.get("error");
|
|
130007
|
+
const errorDescription = params.get("error_description");
|
|
130007
130008
|
if (code) {
|
|
130008
130009
|
(_a2 = window.opener) == null ? void 0 : _a2.postMessage({
|
|
130009
130010
|
type: "STRIPE_OAUTH_RESULT",
|
|
@@ -130019,11 +130020,11 @@ function Main({
|
|
|
130019
130020
|
}, window.location.origin);
|
|
130020
130021
|
}
|
|
130021
130022
|
};
|
|
130022
|
-
if (window.location.
|
|
130023
|
+
if (window.location.hash.includes("stripe-connect") && window.location.hash.includes("code=")) {
|
|
130023
130024
|
handleStripeCallback();
|
|
130024
130025
|
}
|
|
130025
130026
|
}, []);
|
|
130026
|
-
if (window.location.
|
|
130027
|
+
if (window.location.hash.includes("stripe-connect") && window.location.hash.includes("code=")) {
|
|
130027
130028
|
return /* @__PURE__ */ jsx$1(SkeletonPage, {});
|
|
130028
130029
|
}
|
|
130029
130030
|
return /* @__PURE__ */ jsxs("div", {
|