@orderly.network/wallet-connector-privy 2.2.0 → 2.3.0
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/README.md +20 -10
- package/dist/index.js +164 -150
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +166 -152
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -9
package/README.md
CHANGED
|
@@ -1,27 +1,38 @@
|
|
|
1
1
|
# wallet connector privy
|
|
2
2
|
|
|
3
3
|
The new wallet connector consists of three parts:
|
|
4
|
+
|
|
4
5
|
- Privy: Privy provides social login, featuring an injected wallet, EVM wallets, and Solana wallets.
|
|
5
6
|
- Wagmi: Wagmi offers connectivity for EVM wallets, such as MetaMask and WalletConnect.
|
|
6
7
|
- Solana: Solana provides connectivity for Solana wallets, such as Phantom and Ledger.
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
other configure:
|
|
10
|
+
|
|
11
|
+
- `network` require, mainnet or testnet, For example, Solana and Abstract will use this network to determine what network it is.
|
|
12
|
+
- `customChains` optional, Brokers can define which chains to display
|
|
13
|
+
- `termsOfUse` optional
|
|
14
|
+
|
|
15
|
+
```javascript
|
|
9
16
|
interface WalletConnectorPrivyProps{
|
|
10
17
|
network: Network;
|
|
11
18
|
customChains?: Chains;
|
|
12
|
-
termsOfUse
|
|
19
|
+
termsOfUse?: string;
|
|
13
20
|
privyConfig?: InitPrivy;
|
|
14
21
|
wagmiConfig?: InitWagmi;
|
|
15
22
|
solanaConfig?: InitSolana;
|
|
16
23
|
}
|
|
17
24
|
```
|
|
18
25
|
|
|
26
|
+
if termsOfUse is not configured, will not show terms part.
|
|
27
|
+
|
|
19
28
|
If privyConfig is not configured, the Privy connector will be disabled.
|
|
20
29
|
|
|
21
30
|
If wagmiConfig is not configured, the Wagmi connector will be disabled.
|
|
22
31
|
|
|
23
32
|
If solanaConfig is not configured, the Solana connector will be disabled.
|
|
24
33
|
|
|
34
|
+
If abstractConfig is not configured, the Abstract Global Wallet connector will be disabled.
|
|
35
|
+
|
|
25
36
|
At least one of privyConfig, wagmiConfig, or solanaConfig must be provided.
|
|
26
37
|
|
|
27
38
|
If customChains only includes a Solana chain, then Privy will only display the Solana injected wallet, and the Wagmi connector will be disabled.
|
|
@@ -29,13 +40,14 @@ If customChains only includes a Solana chain, then Privy will only display the S
|
|
|
29
40
|
If customChains only includes EVM chains, then Privy will only display the EVM injected wallet, and the Solana connector will be disabled.
|
|
30
41
|
|
|
31
42
|
eg:
|
|
32
|
-
|
|
43
|
+
|
|
44
|
+
```javascript
|
|
33
45
|
<WalletConnectorPrivyProvider
|
|
34
46
|
termsOfUse="https://learn.woo.org/legal/terms-of-use"
|
|
35
47
|
network={Network.testnet}
|
|
36
48
|
// customChains={customChains}
|
|
37
49
|
privyConfig={{
|
|
38
|
-
appid: "
|
|
50
|
+
appid: "you privy appid",
|
|
39
51
|
config: {
|
|
40
52
|
appearance: {
|
|
41
53
|
theme: "dark",
|
|
@@ -48,7 +60,7 @@ eg:
|
|
|
48
60
|
connectors: [
|
|
49
61
|
wagmiConnectors.injected(),
|
|
50
62
|
wagmiConnectors.walletConnect({
|
|
51
|
-
projectId: "
|
|
63
|
+
projectId: "you project id",
|
|
52
64
|
showQrModal: true,
|
|
53
65
|
storageOptions: {},
|
|
54
66
|
metadata: {
|
|
@@ -68,14 +80,12 @@ eg:
|
|
|
68
80
|
console.log("-- error", error, adapter);
|
|
69
81
|
},
|
|
70
82
|
}}
|
|
83
|
+
abstractConfig={{}}
|
|
71
84
|
>
|
|
72
85
|
<OrderlyAppProvider
|
|
73
|
-
|
|
74
|
-
appIcons={config.orderlyAppProvider.appIcons}
|
|
75
|
-
restrictedInfo={config.orderlyAppProvider.restrictedInfo}
|
|
76
|
-
// customChains={customChains}
|
|
86
|
+
// ...orderAppConfig
|
|
77
87
|
>
|
|
78
88
|
{props.children}
|
|
79
89
|
</OrderlyAppProvider>
|
|
80
90
|
</WalletConnectorPrivyProvider>
|
|
81
|
-
```
|
|
91
|
+
```
|
package/dist/index.js
CHANGED
|
@@ -13,6 +13,7 @@ var utils = require('@orderly.network/utils');
|
|
|
13
13
|
var walletAdapterBase = require('@solana/wallet-adapter-base');
|
|
14
14
|
var reactAuth = require('@privy-io/react-auth');
|
|
15
15
|
var walletAdapterReact = require('@solana/wallet-adapter-react');
|
|
16
|
+
var zustand = require('zustand');
|
|
16
17
|
var reactDom = require('react-dom');
|
|
17
18
|
var uiConnector = require('@orderly.network/ui-connector');
|
|
18
19
|
var walletAdapterWallets = require('@solana/wallet-adapter-wallets');
|
|
@@ -45,10 +46,10 @@ var WagmiExport__namespace = /*#__PURE__*/_interopNamespace(WagmiExport);
|
|
|
45
46
|
var WagmiConnectorsExport__namespace = /*#__PURE__*/_interopNamespace(WagmiConnectorsExport);
|
|
46
47
|
|
|
47
48
|
// src/provider.tsx
|
|
48
|
-
var Network = /* @__PURE__ */ ((
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return
|
|
49
|
+
var Network = /* @__PURE__ */ ((Network3) => {
|
|
50
|
+
Network3["mainnet"] = "mainnet";
|
|
51
|
+
Network3["testnet"] = "testnet";
|
|
52
|
+
return Network3;
|
|
52
53
|
})(Network || {});
|
|
53
54
|
var WalletType = /* @__PURE__ */ ((WalletType5) => {
|
|
54
55
|
WalletType5["EVM"] = "EVM";
|
|
@@ -412,6 +413,112 @@ function usePrivyWallet() {
|
|
|
412
413
|
}
|
|
413
414
|
return context;
|
|
414
415
|
}
|
|
416
|
+
var useSolanaWalletStore = zustand.create((set, get) => ({
|
|
417
|
+
wallet: null,
|
|
418
|
+
isConnecting: false,
|
|
419
|
+
error: null,
|
|
420
|
+
isManual: false,
|
|
421
|
+
walletMethods: null,
|
|
422
|
+
pendingWalletName: null,
|
|
423
|
+
connect: async (walletName) => {
|
|
424
|
+
const { setIsManual, walletMethods } = get();
|
|
425
|
+
if (!walletMethods) {
|
|
426
|
+
throw new Error("Wallet methods not initialized");
|
|
427
|
+
}
|
|
428
|
+
setIsManual(true);
|
|
429
|
+
set({ pendingWalletName: walletName });
|
|
430
|
+
try {
|
|
431
|
+
set({ isConnecting: true, error: null });
|
|
432
|
+
const { walletSolana, select } = walletMethods;
|
|
433
|
+
if (!walletSolana) {
|
|
434
|
+
select(walletName);
|
|
435
|
+
await new Promise((resolve) => {
|
|
436
|
+
const checkWallet = () => {
|
|
437
|
+
const currentWallet = get().walletMethods?.walletSolana;
|
|
438
|
+
if (currentWallet) {
|
|
439
|
+
resolve();
|
|
440
|
+
} else {
|
|
441
|
+
setTimeout(checkWallet, 500);
|
|
442
|
+
}
|
|
443
|
+
};
|
|
444
|
+
checkWallet();
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
const updatedWalletMethods = get().walletMethods;
|
|
448
|
+
if (!updatedWalletMethods) {
|
|
449
|
+
throw new Error("Wallet methods not initialized");
|
|
450
|
+
}
|
|
451
|
+
if (!updatedWalletMethods.publicKey) {
|
|
452
|
+
await updatedWalletMethods.connectSolana();
|
|
453
|
+
}
|
|
454
|
+
const lastestWalletMethods = get().walletMethods;
|
|
455
|
+
if (!lastestWalletMethods) {
|
|
456
|
+
throw new Error("Wallet methods not initialized");
|
|
457
|
+
}
|
|
458
|
+
const wallet = {
|
|
459
|
+
label: updatedWalletMethods.walletSolana.adapter.name,
|
|
460
|
+
icon: "",
|
|
461
|
+
provider: {
|
|
462
|
+
rpcUrl: lastestWalletMethods.solanaInfo?.rpcUrl ?? null,
|
|
463
|
+
network: lastestWalletMethods.solanaInfo?.network ?? walletAdapterBase.WalletAdapterNetwork.Devnet,
|
|
464
|
+
signMessage: lastestWalletMethods.signMessage,
|
|
465
|
+
signTransaction: lastestWalletMethods.signTransaction,
|
|
466
|
+
sendTransaction: lastestWalletMethods.sendTransaction
|
|
467
|
+
},
|
|
468
|
+
accounts: [
|
|
469
|
+
{
|
|
470
|
+
address: updatedWalletMethods.publicKey.toBase58()
|
|
471
|
+
}
|
|
472
|
+
],
|
|
473
|
+
chains: [
|
|
474
|
+
{
|
|
475
|
+
id: SolanaChainsMap.get(lastestWalletMethods.network),
|
|
476
|
+
namespace: types.ChainNamespace.solana
|
|
477
|
+
}
|
|
478
|
+
],
|
|
479
|
+
chain: {
|
|
480
|
+
id: SolanaChainsMap.get(lastestWalletMethods.network),
|
|
481
|
+
namespace: types.ChainNamespace.solana
|
|
482
|
+
}
|
|
483
|
+
};
|
|
484
|
+
set({
|
|
485
|
+
wallet,
|
|
486
|
+
isConnecting: false,
|
|
487
|
+
isManual: false,
|
|
488
|
+
pendingWalletName: null
|
|
489
|
+
});
|
|
490
|
+
return wallet;
|
|
491
|
+
} catch (error) {
|
|
492
|
+
set({
|
|
493
|
+
error,
|
|
494
|
+
isConnecting: false,
|
|
495
|
+
isManual: false,
|
|
496
|
+
pendingWalletName: null
|
|
497
|
+
});
|
|
498
|
+
throw error;
|
|
499
|
+
}
|
|
500
|
+
},
|
|
501
|
+
disconnect: async () => {
|
|
502
|
+
const { walletMethods } = get();
|
|
503
|
+
if (!walletMethods) {
|
|
504
|
+
throw new Error("Wallet methods not initialized");
|
|
505
|
+
}
|
|
506
|
+
try {
|
|
507
|
+
await walletMethods.disconnectSolana();
|
|
508
|
+
set({ wallet: null, error: null });
|
|
509
|
+
} catch (error) {
|
|
510
|
+
set({ error });
|
|
511
|
+
throw error;
|
|
512
|
+
}
|
|
513
|
+
},
|
|
514
|
+
setWallet: (wallet) => set({ wallet }),
|
|
515
|
+
setError: (error) => set({ error }),
|
|
516
|
+
setIsManual: (isManual) => set({ isManual }),
|
|
517
|
+
setWalletMethods: (methods) => set({ walletMethods: methods }),
|
|
518
|
+
setPendingWalletName: (name) => set({ pendingWalletName: name })
|
|
519
|
+
}));
|
|
520
|
+
|
|
521
|
+
// src/providers/solana/solanaWalletProvider.tsx
|
|
415
522
|
var SolanaWalletContext = React19.createContext(
|
|
416
523
|
null
|
|
417
524
|
);
|
|
@@ -419,7 +526,6 @@ var SolanaWalletProvider = ({
|
|
|
419
526
|
children
|
|
420
527
|
}) => {
|
|
421
528
|
const { setLedgerAddress } = hooks.useStorageLedgerAddress();
|
|
422
|
-
const [wallet, setWallet] = React19.useState();
|
|
423
529
|
const { network, solanaInfo, connectorWalletType } = useWalletConnectorPrivy();
|
|
424
530
|
const {
|
|
425
531
|
wallets,
|
|
@@ -442,146 +548,22 @@ var SolanaWalletProvider = ({
|
|
|
442
548
|
sendTransaction: () => Promise.resolve(),
|
|
443
549
|
disconnect: () => Promise.resolve()
|
|
444
550
|
} : walletAdapterReact.useWallet();
|
|
445
|
-
const
|
|
446
|
-
|
|
447
|
-
connect
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
},
|
|
454
|
-
connectResolve: () => {
|
|
455
|
-
}
|
|
456
|
-
});
|
|
457
|
-
const isManual = React19.useRef(false);
|
|
458
|
-
const initPromiseRef = () => {
|
|
459
|
-
solanaPromiseRef.current.walletSelectResolve = () => {
|
|
460
|
-
};
|
|
461
|
-
solanaPromiseRef.current.walletSelectReject = () => {
|
|
462
|
-
};
|
|
463
|
-
solanaPromiseRef.current.connectReject = () => {
|
|
464
|
-
};
|
|
465
|
-
solanaPromiseRef.current.connectReject = () => {
|
|
466
|
-
};
|
|
467
|
-
solanaPromiseRef.current.connect = null;
|
|
468
|
-
solanaPromiseRef.current.walletSelect = null;
|
|
469
|
-
solanaPromiseRef.current.walletSelect = new Promise((resolve, reject) => {
|
|
470
|
-
solanaPromiseRef.current.walletSelectResolve = resolve;
|
|
471
|
-
solanaPromiseRef.current.walletSelectReject = reject;
|
|
472
|
-
});
|
|
473
|
-
solanaPromiseRef.current.connect = new Promise((resolve, reject) => {
|
|
474
|
-
solanaPromiseRef.current.connectResolve = resolve;
|
|
475
|
-
solanaPromiseRef.current.connectReject = reject;
|
|
476
|
-
});
|
|
477
|
-
};
|
|
478
|
-
const disconnect = () => {
|
|
479
|
-
disconnectSolana().then(() => {
|
|
480
|
-
setWallet(void 0);
|
|
481
|
-
});
|
|
482
|
-
};
|
|
483
|
-
const connect = async (walletName) => {
|
|
484
|
-
initPromiseRef();
|
|
485
|
-
isManual.current = true;
|
|
486
|
-
if (!solanaPromiseRef.current) {
|
|
487
|
-
return;
|
|
488
|
-
}
|
|
489
|
-
if (!walletSolana) {
|
|
490
|
-
select(walletName);
|
|
491
|
-
} else {
|
|
492
|
-
solanaPromiseRef.current.walletSelectResolve(walletSolana);
|
|
493
|
-
if (!publicKey) {
|
|
494
|
-
try {
|
|
495
|
-
await connectSolana();
|
|
496
|
-
} catch (e) {
|
|
497
|
-
solanaPromiseRef.current.connectReject(e);
|
|
498
|
-
}
|
|
499
|
-
} else {
|
|
500
|
-
solanaPromiseRef.current.connectResolve({
|
|
501
|
-
userAddress: publicKey.toBase58(),
|
|
502
|
-
signMessage,
|
|
503
|
-
sendTransaction,
|
|
504
|
-
signTransaction
|
|
505
|
-
});
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
return Promise.all([
|
|
509
|
-
solanaPromiseRef.current.walletSelect,
|
|
510
|
-
solanaPromiseRef.current.connect
|
|
511
|
-
]).then(
|
|
512
|
-
([
|
|
513
|
-
connectedWallet,
|
|
514
|
-
{ userAddress, signMessage: signMessage2, signTransaction: signTransaction2, sendTransaction: sendTransaction2 }
|
|
515
|
-
]) => {
|
|
516
|
-
const tempWallet = {
|
|
517
|
-
label: connectedWallet.adapter.name,
|
|
518
|
-
icon: "",
|
|
519
|
-
provider: {
|
|
520
|
-
rpcUrl: solanaInfo?.rpcUrl ?? null,
|
|
521
|
-
network: solanaInfo?.network ?? walletAdapterBase.WalletAdapterNetwork.Devnet,
|
|
522
|
-
signMessage: signMessage2,
|
|
523
|
-
signTransaction: signTransaction2,
|
|
524
|
-
sendTransaction: sendTransaction2
|
|
525
|
-
},
|
|
526
|
-
accounts: [
|
|
527
|
-
{
|
|
528
|
-
address: userAddress
|
|
529
|
-
}
|
|
530
|
-
],
|
|
531
|
-
chains: [
|
|
532
|
-
{
|
|
533
|
-
id: SolanaChainsMap.get(network),
|
|
534
|
-
namespace: types.ChainNamespace.solana
|
|
535
|
-
}
|
|
536
|
-
],
|
|
537
|
-
chain: {
|
|
538
|
-
id: SolanaChainsMap.get(network),
|
|
539
|
-
namespace: types.ChainNamespace.solana
|
|
540
|
-
}
|
|
541
|
-
};
|
|
542
|
-
if (connectedWallet.adapter.name === "Ledger") {
|
|
543
|
-
setLedgerAddress(userAddress);
|
|
544
|
-
}
|
|
545
|
-
isManual.current = false;
|
|
546
|
-
setWallet(tempWallet);
|
|
547
|
-
}
|
|
548
|
-
).catch((e) => {
|
|
549
|
-
return Promise.reject(e);
|
|
550
|
-
});
|
|
551
|
-
};
|
|
552
|
-
const connectedChain = React19.useMemo(() => {
|
|
553
|
-
if (!publicKey) {
|
|
554
|
-
return null;
|
|
555
|
-
}
|
|
556
|
-
return {
|
|
557
|
-
id: SolanaChainsMap.get(network),
|
|
558
|
-
namespace: types.ChainNamespace.solana
|
|
559
|
-
};
|
|
560
|
-
}, [publicKey]);
|
|
561
|
-
const isConnected = React19.useMemo(() => {
|
|
562
|
-
return !!publicKey;
|
|
563
|
-
}, [publicKey]);
|
|
551
|
+
const {
|
|
552
|
+
wallet,
|
|
553
|
+
connect,
|
|
554
|
+
disconnect: disconnectWallet,
|
|
555
|
+
setWallet,
|
|
556
|
+
setWalletMethods,
|
|
557
|
+
isManual
|
|
558
|
+
} = useSolanaWalletStore();
|
|
564
559
|
React19.useEffect(() => {
|
|
565
|
-
if (!walletSolana)
|
|
560
|
+
if (!walletSolana || isManual)
|
|
566
561
|
return;
|
|
567
|
-
}
|
|
568
|
-
if (isManual.current && solanaPromiseRef.current) {
|
|
569
|
-
solanaPromiseRef.current.walletSelectResolve(walletSolana);
|
|
570
|
-
connectSolana().then();
|
|
571
|
-
}
|
|
572
562
|
if (!publicKey) {
|
|
573
|
-
connectSolana()
|
|
563
|
+
connectSolana();
|
|
574
564
|
return;
|
|
575
565
|
}
|
|
576
|
-
|
|
577
|
-
solanaPromiseRef.current.connectResolve({
|
|
578
|
-
userAddress: publicKey?.toBase58(),
|
|
579
|
-
signMessage,
|
|
580
|
-
sendTransaction
|
|
581
|
-
});
|
|
582
|
-
return;
|
|
583
|
-
}
|
|
584
|
-
setWallet({
|
|
566
|
+
const newWallet = {
|
|
585
567
|
label: walletSolana.adapter.name,
|
|
586
568
|
icon: "",
|
|
587
569
|
provider: {
|
|
@@ -606,25 +588,58 @@ var SolanaWalletProvider = ({
|
|
|
606
588
|
id: SolanaChainsMap.get(network),
|
|
607
589
|
namespace: types.ChainNamespace.solana
|
|
608
590
|
}
|
|
609
|
-
}
|
|
591
|
+
};
|
|
592
|
+
if (walletSolana.adapter.name === "Ledger") {
|
|
593
|
+
setLedgerAddress(publicKey.toBase58());
|
|
594
|
+
}
|
|
595
|
+
setWallet(newWallet);
|
|
610
596
|
}, [
|
|
611
597
|
publicKey,
|
|
612
598
|
walletSolana,
|
|
613
599
|
signMessage,
|
|
614
600
|
signTransaction,
|
|
615
601
|
sendTransaction,
|
|
602
|
+
solanaInfo,
|
|
603
|
+
isManual
|
|
604
|
+
]);
|
|
605
|
+
React19.useEffect(() => {
|
|
606
|
+
setWalletMethods({
|
|
607
|
+
select,
|
|
608
|
+
connectSolana,
|
|
609
|
+
walletSolana,
|
|
610
|
+
publicKey,
|
|
611
|
+
signMessage,
|
|
612
|
+
signTransaction,
|
|
613
|
+
sendTransaction,
|
|
614
|
+
disconnectSolana,
|
|
615
|
+
network,
|
|
616
|
+
solanaInfo
|
|
617
|
+
});
|
|
618
|
+
}, [
|
|
619
|
+
select,
|
|
620
|
+
connectSolana,
|
|
621
|
+
walletSolana,
|
|
622
|
+
publicKey,
|
|
623
|
+
signMessage,
|
|
624
|
+
signTransaction,
|
|
625
|
+
sendTransaction,
|
|
626
|
+
disconnectSolana,
|
|
627
|
+
network,
|
|
616
628
|
solanaInfo
|
|
617
629
|
]);
|
|
618
630
|
const value = React19.useMemo(
|
|
619
631
|
() => ({
|
|
620
632
|
wallets,
|
|
621
|
-
connectedChain
|
|
633
|
+
connectedChain: publicKey ? {
|
|
634
|
+
id: SolanaChainsMap.get(network),
|
|
635
|
+
namespace: types.ChainNamespace.solana
|
|
636
|
+
} : null,
|
|
622
637
|
connect,
|
|
623
638
|
wallet,
|
|
624
|
-
disconnect,
|
|
625
|
-
isConnected
|
|
639
|
+
disconnect: disconnectWallet,
|
|
640
|
+
isConnected: !!publicKey
|
|
626
641
|
}),
|
|
627
|
-
[wallets,
|
|
642
|
+
[wallets, publicKey, wallet, network]
|
|
628
643
|
);
|
|
629
644
|
return /* @__PURE__ */ React19__default.default.createElement(SolanaWalletContext.Provider, { value }, children);
|
|
630
645
|
};
|
|
@@ -765,7 +780,6 @@ function Drawer({ children, isOpen, onClose }) {
|
|
|
765
780
|
{
|
|
766
781
|
style: { height: `${drawerHeight}px` },
|
|
767
782
|
className: ui.cn(
|
|
768
|
-
"oui-overflow-hidden",
|
|
769
783
|
"oui-fixed oui-top-0 oui-right-0",
|
|
770
784
|
"oui-bg-[#131519] oui-shadow-lg",
|
|
771
785
|
"oui-border oui-border-line-12",
|
|
@@ -1409,7 +1423,7 @@ function RenderConnector() {
|
|
|
1409
1423
|
}
|
|
1410
1424
|
);
|
|
1411
1425
|
};
|
|
1412
|
-
return /* @__PURE__ */ React19__default.default.createElement("div", { className: ui.cn("oui-flex oui-flex-col oui-gap-4", "md:oui-gap-5") }, renderPrivyConnectArea(), renderWagmiConnectArea(), renderSolanaConnectArea(), renderAbstractConnectArea());
|
|
1426
|
+
return /* @__PURE__ */ React19__default.default.createElement(ui.ScrollArea, { className: "oui-flex oui-grow oui-shrik oui-basis-auto" }, /* @__PURE__ */ React19__default.default.createElement("div", { className: ui.cn("oui-flex oui-flex-col oui-gap-4", "md:oui-gap-5") }, renderPrivyConnectArea(), renderWagmiConnectArea(), renderSolanaConnectArea(), renderAbstractConnectArea()));
|
|
1413
1427
|
}
|
|
1414
1428
|
function SwitchNetworkTips({
|
|
1415
1429
|
tipsContent
|
|
@@ -2331,13 +2345,13 @@ function ConnectDrawer(props) {
|
|
|
2331
2345
|
filter: "blur(50px)"
|
|
2332
2346
|
}
|
|
2333
2347
|
}
|
|
2334
|
-
), /* @__PURE__ */ React19__default.default.createElement("div", { className: "oui-relative oui-z-10" }, /* @__PURE__ */ React19__default.default.createElement("div", { className: "oui-
|
|
2348
|
+
), /* @__PURE__ */ React19__default.default.createElement("div", { className: "oui-relative oui-z-10 oui-flex oui-h-full oui-flex-col oui-gap-4 md:oui-gap-5" }, /* @__PURE__ */ React19__default.default.createElement("div", { className: "oui-flex oui-flex-none oui-items-center oui-justify-between" }, renderHeader(), /* @__PURE__ */ React19__default.default.createElement(
|
|
2335
2349
|
ui.CloseIcon,
|
|
2336
2350
|
{
|
|
2337
2351
|
className: "oui-size-5 oui-cursor-pointer oui-text-base-contrast-20 hover:oui-text-base-contrast-80",
|
|
2338
2352
|
onClick: () => props.onChangeOpen(false)
|
|
2339
2353
|
}
|
|
2340
|
-
)), isConnected ? /* @__PURE__ */ React19__default.default.createElement(MyWallet, null) : /* @__PURE__ */ React19__default.default.createElement(RenderConnector, null)
|
|
2354
|
+
)), isConnected ? /* @__PURE__ */ React19__default.default.createElement(MyWallet, null) : /* @__PURE__ */ React19__default.default.createElement(RenderConnector, null), !isConnected && termsOfUse && /* @__PURE__ */ React19__default.default.createElement("div", { className: "oui-flex-none oui-text-center oui-text-2xs oui-font-semibold oui-text-base-contrast-80" }, /* @__PURE__ */ React19__default.default.createElement(
|
|
2341
2355
|
i18n.Trans,
|
|
2342
2356
|
{
|
|
2343
2357
|
i18nKey: "connector.privy.termsOfUse",
|
|
@@ -2354,7 +2368,7 @@ function ConnectDrawer(props) {
|
|
|
2354
2368
|
)
|
|
2355
2369
|
]
|
|
2356
2370
|
}
|
|
2357
|
-
)));
|
|
2371
|
+
))));
|
|
2358
2372
|
}
|
|
2359
2373
|
function UserCenter(props) {
|
|
2360
2374
|
const { accountState: state } = props;
|