@crossmint/client-sdk-react-ui 1.10.2 → 1.10.3
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/{chunk-RTC2AZ6A.cjs → chunk-2EYYCX3O.cjs} +2 -2
- package/dist/{chunk-RTC2AZ6A.cjs.map → chunk-2EYYCX3O.cjs.map} +1 -1
- package/dist/{chunk-SMCUFLHP.cjs → chunk-5H7AYX72.cjs} +3 -3
- package/dist/{chunk-YO7ZZF32.js → chunk-74SNQV3K.js} +2 -2
- package/dist/{chunk-DVONA2BZ.cjs → chunk-7EGLPJKV.cjs} +3 -3
- package/dist/{chunk-67AB7TWG.cjs → chunk-GBW67Z6V.cjs} +3 -3
- package/dist/{chunk-QB4KFTCT.js → chunk-GHIVSSM5.js} +2 -2
- package/dist/{chunk-XJYLJQA5.js → chunk-GM7C5PE4.js} +4 -3
- package/dist/{chunk-XJYLJQA5.js.map → chunk-GM7C5PE4.js.map} +1 -1
- package/dist/{chunk-NX473NO2.cjs → chunk-H2WTBOQ5.cjs} +3 -3
- package/dist/{chunk-Y4UEFDMP.js → chunk-HXZYERJJ.js} +2 -2
- package/dist/{chunk-ZOHRCGGI.cjs → chunk-L5BIVHQJ.cjs} +3 -3
- package/dist/{chunk-COLJFFZF.cjs → chunk-NGWVWCWP.cjs} +3 -3
- package/dist/{chunk-MWRMO6JC.js → chunk-O4DWHB3U.js} +2 -2
- package/dist/{chunk-MWRMO6JC.js.map → chunk-O4DWHB3U.js.map} +1 -1
- package/dist/{chunk-GN7OANUR.js → chunk-R2H6H2HY.js} +2 -2
- package/dist/{chunk-6TUZ5CU7.js → chunk-WBKHUVJU.js} +2 -2
- package/dist/{chunk-MDV3M7FD.cjs → chunk-ZRXZOZZZ.cjs} +5 -4
- package/dist/chunk-ZRXZOZZZ.cjs.map +1 -0
- package/dist/{chunk-HVI7FCLP.js → chunk-ZRYD4SFA.js} +2 -2
- package/dist/components/CrossmintNFTCollectionView.cjs +3 -3
- package/dist/components/CrossmintNFTCollectionView.js +2 -2
- package/dist/components/CrossmintNFTDetail.cjs +3 -3
- package/dist/components/CrossmintNFTDetail.js +2 -2
- package/dist/components/auth/AuthForm.cjs +3 -3
- package/dist/components/auth/AuthForm.js +3 -3
- package/dist/components/auth/AuthFormDialog.cjs +3 -3
- package/dist/components/auth/AuthFormDialog.js +3 -3
- package/dist/components/auth/EmbeddedAuthForm.cjs +3 -3
- package/dist/components/auth/EmbeddedAuthForm.js +3 -3
- package/dist/components/auth/methods/email/EmailAuthFlow.cjs +3 -3
- package/dist/components/auth/methods/email/EmailAuthFlow.js +3 -3
- package/dist/components/auth/methods/email/EmailOTPInput.cjs +3 -3
- package/dist/components/auth/methods/email/EmailOTPInput.js +3 -3
- package/dist/components/auth/methods/email/EmailSignIn.cjs +3 -3
- package/dist/components/auth/methods/email/EmailSignIn.js +3 -3
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.cjs +3 -3
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.js +3 -3
- package/dist/components/auth/methods/google/GoogleSignIn.cjs +3 -3
- package/dist/components/auth/methods/google/GoogleSignIn.js +3 -3
- package/dist/components/auth/methods/web3/Web3AuthFlow.cjs +3 -3
- package/dist/components/auth/methods/web3/Web3AuthFlow.js +3 -3
- package/dist/components/auth/methods/web3/Web3AuthWrapper.cjs +3 -3
- package/dist/components/auth/methods/web3/Web3AuthWrapper.js +3 -3
- package/dist/components/auth/methods/web3/Web3Connectors.cjs +3 -3
- package/dist/components/auth/methods/web3/Web3Connectors.js +3 -3
- package/dist/components/auth/methods/web3/Web3SignIn.cjs +3 -3
- package/dist/components/auth/methods/web3/Web3SignIn.js +3 -3
- package/dist/components/common/Divider.cjs +3 -3
- package/dist/components/common/Divider.js +3 -3
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.cjs +6 -6
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js +5 -5
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.cjs +5 -5
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.js +4 -4
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.cjs +33 -8
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.cjs.map +1 -1
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.d.cts +5 -1
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.d.ts +5 -1
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.js +35 -10
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.js.map +1 -1
- package/dist/components/embed/v3/index.cjs +6 -6
- package/dist/components/embed/v3/index.js +5 -5
- package/dist/components/hosted/CrossmintPayButton.cjs +3 -3
- package/dist/components/hosted/CrossmintPayButton.js +2 -2
- package/dist/components/hosted/index.cjs +3 -3
- package/dist/components/hosted/index.js +2 -2
- package/dist/components/index.cjs +9 -9
- package/dist/components/index.js +8 -8
- package/dist/consts/version.cjs +2 -2
- package/dist/consts/version.js +1 -1
- package/dist/hooks/index.cjs +4 -4
- package/dist/hooks/index.js +3 -3
- package/dist/hooks/useAuth.cjs +3 -3
- package/dist/hooks/useAuth.js +3 -3
- package/dist/hooks/useCrossmintAuth.cjs +3 -3
- package/dist/hooks/useCrossmintAuth.js +3 -3
- package/dist/hooks/useCrossmintCheckout.cjs +4 -4
- package/dist/hooks/useCrossmintCheckout.js +3 -3
- package/dist/hooks/useOAuthWindowListener.cjs +3 -3
- package/dist/hooks/useOAuthWindowListener.js +3 -3
- package/dist/hooks/useWallet.cjs +3 -3
- package/dist/hooks/useWallet.js +3 -3
- package/dist/index.cjs +9 -9
- package/dist/index.js +8 -8
- package/dist/providers/CrossmintAuthProvider.cjs +3 -3
- package/dist/providers/CrossmintAuthProvider.js +3 -3
- package/dist/providers/CrossmintWalletProvider.cjs +3 -3
- package/dist/providers/CrossmintWalletProvider.js +3 -3
- package/dist/providers/auth/AuthFormProvider.cjs +3 -3
- package/dist/providers/auth/AuthFormProvider.js +3 -3
- package/dist/providers/index.cjs +3 -3
- package/dist/providers/index.js +3 -3
- package/dist/utils/createCrossmintApiClient.cjs +3 -3
- package/dist/utils/createCrossmintApiClient.js +2 -2
- package/package.json +2 -2
- package/src/components/embed/v3/EmbeddedCheckoutV3IFrame.tsx +1 -0
- package/src/components/embed/v3/crypto/CryptoWalletConnectionHandler.tsx +35 -8
- package/dist/chunk-MDV3M7FD.cjs.map +0 -1
- /package/dist/{chunk-SMCUFLHP.cjs.map → chunk-5H7AYX72.cjs.map} +0 -0
- /package/dist/{chunk-YO7ZZF32.js.map → chunk-74SNQV3K.js.map} +0 -0
- /package/dist/{chunk-DVONA2BZ.cjs.map → chunk-7EGLPJKV.cjs.map} +0 -0
- /package/dist/{chunk-67AB7TWG.cjs.map → chunk-GBW67Z6V.cjs.map} +0 -0
- /package/dist/{chunk-QB4KFTCT.js.map → chunk-GHIVSSM5.js.map} +0 -0
- /package/dist/{chunk-NX473NO2.cjs.map → chunk-H2WTBOQ5.cjs.map} +0 -0
- /package/dist/{chunk-Y4UEFDMP.js.map → chunk-HXZYERJJ.js.map} +0 -0
- /package/dist/{chunk-ZOHRCGGI.cjs.map → chunk-L5BIVHQJ.cjs.map} +0 -0
- /package/dist/{chunk-COLJFFZF.cjs.map → chunk-NGWVWCWP.cjs.map} +0 -0
- /package/dist/{chunk-GN7OANUR.js.map → chunk-R2H6H2HY.js.map} +0 -0
- /package/dist/{chunk-6TUZ5CU7.js.map → chunk-WBKHUVJU.js.map} +0 -0
- /package/dist/{chunk-HVI7FCLP.js.map → chunk-ZRYD4SFA.js.map} +0 -0
|
@@ -26,11 +26,11 @@ require('../../chunk-URKPLEPV.cjs');
|
|
|
26
26
|
require('../../chunk-HPOZ6I54.cjs');
|
|
27
27
|
require('../../chunk-YE55IKBP.cjs');
|
|
28
28
|
require('../../chunk-ENCR5SUW.cjs');
|
|
29
|
-
require('../../chunk-
|
|
30
|
-
require('../../chunk-
|
|
29
|
+
require('../../chunk-GBW67Z6V.cjs');
|
|
30
|
+
require('../../chunk-NGWVWCWP.cjs');
|
|
31
31
|
require('../../chunk-KEKBOJCF.cjs');
|
|
32
32
|
require('../../chunk-A2JCJ2OV.cjs');
|
|
33
|
-
require('../../chunk-
|
|
33
|
+
require('../../chunk-2EYYCX3O.cjs');
|
|
34
34
|
require('../../chunk-4DAZAO6Y.cjs');
|
|
35
35
|
|
|
36
36
|
|
|
@@ -26,11 +26,11 @@ import "../../chunk-I63FQCIV.js";
|
|
|
26
26
|
import "../../chunk-ZIHCLVCD.js";
|
|
27
27
|
import "../../chunk-H4F7UVPT.js";
|
|
28
28
|
import "../../chunk-YWVQCHQF.js";
|
|
29
|
-
import "../../chunk-
|
|
30
|
-
import "../../chunk-
|
|
29
|
+
import "../../chunk-WBKHUVJU.js";
|
|
30
|
+
import "../../chunk-R2H6H2HY.js";
|
|
31
31
|
import "../../chunk-3J6CUUWT.js";
|
|
32
32
|
import "../../chunk-AUEQQ4D3.js";
|
|
33
|
-
import "../../chunk-
|
|
33
|
+
import "../../chunk-O4DWHB3U.js";
|
|
34
34
|
import "../../chunk-CRTRMMJ7.js";
|
|
35
35
|
export {
|
|
36
36
|
AuthFormProvider,
|
package/dist/providers/index.cjs
CHANGED
|
@@ -28,11 +28,11 @@ require('../chunk-URKPLEPV.cjs');
|
|
|
28
28
|
require('../chunk-HPOZ6I54.cjs');
|
|
29
29
|
require('../chunk-YE55IKBP.cjs');
|
|
30
30
|
require('../chunk-ENCR5SUW.cjs');
|
|
31
|
-
require('../chunk-
|
|
32
|
-
require('../chunk-
|
|
31
|
+
require('../chunk-GBW67Z6V.cjs');
|
|
32
|
+
require('../chunk-NGWVWCWP.cjs');
|
|
33
33
|
require('../chunk-KEKBOJCF.cjs');
|
|
34
34
|
require('../chunk-A2JCJ2OV.cjs');
|
|
35
|
-
require('../chunk-
|
|
35
|
+
require('../chunk-2EYYCX3O.cjs');
|
|
36
36
|
require('../chunk-4DAZAO6Y.cjs');
|
|
37
37
|
|
|
38
38
|
|
package/dist/providers/index.js
CHANGED
|
@@ -28,11 +28,11 @@ import "../chunk-I63FQCIV.js";
|
|
|
28
28
|
import "../chunk-ZIHCLVCD.js";
|
|
29
29
|
import "../chunk-H4F7UVPT.js";
|
|
30
30
|
import "../chunk-YWVQCHQF.js";
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
31
|
+
import "../chunk-WBKHUVJU.js";
|
|
32
|
+
import "../chunk-R2H6H2HY.js";
|
|
33
33
|
import "../chunk-3J6CUUWT.js";
|
|
34
34
|
import "../chunk-AUEQQ4D3.js";
|
|
35
|
-
import "../chunk-
|
|
35
|
+
import "../chunk-O4DWHB3U.js";
|
|
36
36
|
import "../chunk-CRTRMMJ7.js";
|
|
37
37
|
export {
|
|
38
38
|
AuthContext,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var _chunkNGWVWCWPcjs = require('../chunk-NGWVWCWP.cjs');
|
|
4
|
+
require('../chunk-2EYYCX3O.cjs');
|
|
5
5
|
require('../chunk-4DAZAO6Y.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.createCrossmintApiClient =
|
|
8
|
+
exports.createCrossmintApiClient = _chunkNGWVWCWPcjs.createCrossmintApiClient;
|
|
9
9
|
//# sourceMappingURL=createCrossmintApiClient.cjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crossmint/client-sdk-react-ui",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.3",
|
|
4
4
|
"repository": "https://github.com/Crossmint/crossmint-sdk",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Paella Labs Inc",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"zod": "3.22.4",
|
|
46
46
|
"@crossmint/client-sdk-auth": "1.0.0",
|
|
47
47
|
"@crossmint/client-sdk-base": "1.3.2",
|
|
48
|
-
"@crossmint/client-sdk-smart-wallet": "0.1.22",
|
|
49
48
|
"@crossmint/client-sdk-window": "0.1.0",
|
|
49
|
+
"@crossmint/client-sdk-smart-wallet": "0.1.22",
|
|
50
50
|
"@crossmint/common-sdk-auth": "1.0.0",
|
|
51
51
|
"@crossmint/common-sdk-base": "0.3.0"
|
|
52
52
|
},
|
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
chainIdToBlockchain,
|
|
7
7
|
} from "@crossmint/common-sdk-base";
|
|
8
8
|
import { EthereumWalletConnectors } from "@dynamic-labs/ethereum";
|
|
9
|
-
import { type HandleConnectedWallet
|
|
9
|
+
import { DynamicContext, useDynamicContext, type HandleConnectedWallet } from "@dynamic-labs/sdk-react-core";
|
|
10
10
|
import { SolanaWalletConnectors } from "@dynamic-labs/solana";
|
|
11
|
-
import { useEffect } from "react";
|
|
11
|
+
import { type Dispatch, type SetStateAction, useContext, useEffect, useState } from "react";
|
|
12
12
|
import { handleSendTransaction } from "./utils/handleSendTransaction";
|
|
13
13
|
|
|
14
14
|
export function CryptoWalletConnectionHandler(props: {
|
|
@@ -71,21 +71,21 @@ export function CryptoWalletConnectionHandler(props: {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
function _CryptoWalletConnectionHandler({ iframeClient }: Parameters<typeof CryptoWalletConnectionHandler>[0]) {
|
|
74
|
-
const
|
|
74
|
+
const [showDynamicModal, setShowDynamicModal] = useState(false);
|
|
75
|
+
const { primaryWallet } = useDynamicContext();
|
|
75
76
|
|
|
76
77
|
useEffect(() => {
|
|
77
78
|
if (iframeClient == null) {
|
|
78
79
|
return;
|
|
79
80
|
}
|
|
80
|
-
const showAuthFlowListener = iframeClient.on("crypto:connect-wallet.show",
|
|
81
|
-
|
|
82
|
-
setShowAuthFlow(show);
|
|
81
|
+
const showAuthFlowListener = iframeClient.on("crypto:connect-wallet.show", ({ show }) => {
|
|
82
|
+
setShowDynamicModal(show);
|
|
83
83
|
});
|
|
84
84
|
|
|
85
85
|
return () => {
|
|
86
86
|
iframeClient.off(showAuthFlowListener);
|
|
87
87
|
};
|
|
88
|
-
}, [iframeClient
|
|
88
|
+
}, [iframeClient]);
|
|
89
89
|
|
|
90
90
|
useEffect(() => {
|
|
91
91
|
if (iframeClient == null) {
|
|
@@ -116,7 +116,7 @@ function _CryptoWalletConnectionHandler({ iframeClient }: Parameters<typeof Cryp
|
|
|
116
116
|
};
|
|
117
117
|
}, [iframeClient, primaryWallet]);
|
|
118
118
|
|
|
119
|
-
return null;
|
|
119
|
+
return showDynamicModal ? <ShowDynamicModal setShowDynamicModal={setShowDynamicModal} /> : null;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
async function dynamicChainToCrossmintChain(
|
|
@@ -136,3 +136,30 @@ async function dynamicChainToCrossmintChain(
|
|
|
136
136
|
}
|
|
137
137
|
return chainFromChainId as BlockchainIncludingTestnet;
|
|
138
138
|
}
|
|
139
|
+
|
|
140
|
+
export function ShowDynamicModal({ setShowDynamicModal }: { setShowDynamicModal: Dispatch<SetStateAction<boolean>> }) {
|
|
141
|
+
const context = useContext(DynamicContext);
|
|
142
|
+
if (context == null) {
|
|
143
|
+
throw new Error("DynamicContext is missing");
|
|
144
|
+
}
|
|
145
|
+
const { setShowAuthFlow, handleLogOut } = context;
|
|
146
|
+
|
|
147
|
+
useEffect(() => {
|
|
148
|
+
// Move focus from the iframe to the main page, otherwise the modal will require a double click to interact with it
|
|
149
|
+
document.getElementById("crossmint-focus-target")?.focus();
|
|
150
|
+
|
|
151
|
+
(async () => {
|
|
152
|
+
await handleLogOut();
|
|
153
|
+
setShowAuthFlow(true, {
|
|
154
|
+
clearErrors: true,
|
|
155
|
+
emitCancelAuth: true,
|
|
156
|
+
ignoreIfIsEmbeddedWidget: true,
|
|
157
|
+
initializeWalletConnect: true,
|
|
158
|
+
performMultiWalletChecks: false, // Important to be false in order to not require double clicking connect button
|
|
159
|
+
});
|
|
160
|
+
setShowDynamicModal(false);
|
|
161
|
+
})();
|
|
162
|
+
}, []);
|
|
163
|
+
|
|
164
|
+
return null;
|
|
165
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/embed/v3/EmbeddedCheckoutV3IFrame.tsx"],"names":[],"mappings":";;;;;;;;AACA,SAAS,MAAM,WAAW,QAAQ,gBAAgB;AAElD;AAAA,EAGI;AAAA,OACG;AA2CC,mBACI,KADJ;AAvCR,IAAM,gCAAgC;AAAA,EAAK;AAAA;AAAA,IAEvC,OAAO,gEAAwC,EAAE,KAAK,CAAC,SAAS;AAAA,MAC5D,SAAS,IAAI;AAAA,IACjB,EAAE;AAAA;AACN;AAEO,SAAS,yBAAyB,OAAyC;AAC9E,QAAM,CAAC,cAAc,eAAe,IAAI,SAAiD,IAAI;AAC7F,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,CAAC;AAEtC,QAAM,EAAE,UAAU,IAAI,aAAa;AACnC,QAAM,YAAY,yBAAyB,WAAW;AAAA,IAClD,aAAa;AAAA,EACjB,CAAC;AACD,QAAM,iBAAiB,mCAAmC,EAAE,UAAU,CAAC;AAEvE,QAAM,MAAM,OAA0B,IAAI;AAE1C,YAAU,MAAM;AACZ,UAAM,SAAS,IAAI;AACnB,QAAI,CAAC,UAAU,cAAc;AACzB;AAAA,IACJ;AACA,oBAAgB,eAAe,OAAO,aAAa,MAAM,CAAC;AAAA,EAC9D,GAAG,CAAC,IAAI,SAAS,YAAY,CAAC;AAE9B,YAAU,MAAM;AACZ,QAAI,gBAAgB,MAAM;AACtB;AAAA,IACJ;AACA,iBAAa,GAAG,qBAAqB,CAAC,SAAS,UAAU,KAAK,MAAM,CAAC;AAErE,WAAO,MAAM;AACT,mBAAa,IAAI,mBAAmB;AAAA,IACxC;AAAA,EACJ,GAAG,CAAC,YAAY,CAAC;AAEjB,SACI,iCACI;AAAA;AAAA,MAAC;AAAA;AAAA,QACG;AAAA,QACA,KAAK,eAAe,OAAO,OAAO,KAAK;AAAA,QACvC,IAAG;AAAA,QACH,MAAK;AAAA,QACL,OAAM;AAAA,QACN,OAAO;AAAA,UACH,WAAW;AAAA,UACX,QAAQ;AAAA,UACR,SAAS;AAAA,UACT,OAAO;AAAA,UACP,UAAU;AAAA,UACV,UAAU;AAAA,UACV,SAAS;AAAA,UACT,YAAY;AAAA,UACZ,WAAW;AAAA,UACX,SAAS;AAAA,UACT,YAAY;AAAA,UACZ,QAAQ,GAAG,MAAM;AAAA,UACjB,iBAAiB;AAAA,QACrB;AAAA;AAAA,IACJ;AAAA,IACC,MAAM,QAAQ,OAAO,UAClB;AAAA,MAAC;AAAA;AAAA,QACG;AAAA,QACA,mBAAmB,UAAU,cAAc,EAAE;AAAA;AAAA,IACjD,IACA;AAAA,KACR;AAER","sourcesContent":["import { useCrossmint } from \"@/hooks\";\nimport { lazy, useEffect, useRef, useState } from \"react\";\n\nimport {\n type CrossmintEmbeddedCheckoutV3Props,\n type EmbeddedCheckoutV3IFrameEmitter,\n crossmintEmbeddedCheckoutV3Service,\n} from \"@crossmint/client-sdk-base\";\n\nimport { createCrossmintApiClient } from \"@/utils/createCrossmintApiClient\";\n\nconst CryptoWalletConnectionHandler = lazy(() =>\n // @ts-expect-error - Error because we dont use 'module' field in tsconfig, which is expected because we use tsup to compile\n import(\"./crypto/CryptoWalletConnectionHandler\").then((mod) => ({\n default: mod.CryptoWalletConnectionHandler,\n }))\n);\n\nexport function EmbeddedCheckoutV3IFrame(props: CrossmintEmbeddedCheckoutV3Props) {\n const [iframeClient, setIframeClient] = useState<EmbeddedCheckoutV3IFrameEmitter | null>(null);\n const [height, setHeight] = useState(0);\n\n const { crossmint } = useCrossmint();\n const apiClient = createCrossmintApiClient(crossmint, {\n usageOrigin: \"client\",\n });\n const embedV3Service = crossmintEmbeddedCheckoutV3Service({ apiClient });\n\n const ref = useRef<HTMLIFrameElement>(null);\n\n useEffect(() => {\n const iframe = ref.current;\n if (!iframe || iframeClient) {\n return;\n }\n setIframeClient(embedV3Service.iframe.createClient(iframe));\n }, [ref.current, iframeClient]);\n\n useEffect(() => {\n if (iframeClient == null) {\n return;\n }\n iframeClient.on(\"ui:height.changed\", (data) => setHeight(data.height));\n\n return () => {\n iframeClient.off(\"ui:height.changed\");\n };\n }, [iframeClient]);\n\n return (\n <>\n <iframe\n ref={ref}\n src={embedV3Service.iframe.getUrl(props)}\n id=\"crossmint-embedded-checkout.iframe\"\n role=\"crossmint-embedded-checkout.iframe\"\n allow=\"payment *\"\n style={{\n boxShadow: \"none\",\n border: \"none\",\n padding: \"0px\",\n width: \"100%\",\n minWidth: \"100%\",\n overflow: \"hidden\",\n display: \"block\",\n userSelect: \"none\",\n transform: \"translate(0px)\",\n opacity: \"1\",\n transition: \"ease 0s, opacity 0.4s ease 0.1s\",\n height: `${height}px`,\n backgroundColor: \"transparent\",\n }}\n />\n {props.payment.crypto.enabled ? (\n <CryptoWalletConnectionHandler\n iframeClient={iframeClient}\n apiKeyEnvironment={apiClient[\"parsedAPIKey\"].environment}\n />\n ) : null}\n </>\n );\n}\n"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|