@web3jskit/walletkit 0.0.3 → 0.0.5
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/package.json +6 -3
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +6 -3
- package/src/assets/svg/dataBase.ts +0 -11
- package/src/assets/svg/metaMaskWallet.ts +0 -35
- package/src/components/ConnectButton/ConnectedInfo.tsx +0 -17
- package/src/components/ConnectButton/index.tsx +0 -48
- package/src/components/Connecting/index.tsx +0 -26
- package/src/components/Connecting/style.ts +0 -53
- package/src/components/GetWallet/index.tsx +0 -82
- package/src/components/GetWallet/style.ts +0 -118
- package/src/components/Header/ModalHeader.tsx +0 -24
- package/src/components/Header/style.ts +0 -74
- package/src/components/Icon/index.tsx +0 -120
- package/src/components/Introduce/index.tsx +0 -30
- package/src/components/Introduce/style.ts +0 -73
- package/src/components/Modal/ConnectModal.tsx +0 -155
- package/src/components/Modal/WalletInfoModal.tsx +0 -82
- package/src/components/Modal/index.tsx +0 -80
- package/src/components/Modal/style.ts +0 -190
- package/src/components/SVGs/backArrowSvg.tsx +0 -10
- package/src/components/SVGs/closeSvg.tsx +0 -11
- package/src/components/SVGs/copiedSvg.tsx +0 -11
- package/src/components/SVGs/copySvg.tsx +0 -11
- package/src/components/SVGs/exitSvg.tsx +0 -11
- package/src/components/SVGs/spinSvg.tsx +0 -10
- package/src/components/Text/index.tsx +0 -67
- package/src/components/WalletKitProvider/ChainProvider.tsx +0 -34
- package/src/components/WalletKitProvider/I18nProvider.tsx +0 -52
- package/src/components/WalletKitProvider/ThemeProvider.tsx +0 -16
- package/src/components/WalletKitProvider/index.tsx +0 -40
- package/src/components/WalletList/index.tsx +0 -42
- package/src/components/WalletList/style.ts +0 -102
- package/src/components/WalletTriggerButton/index.tsx +0 -50
- package/src/components/WalletTriggerButton/style.ts +0 -53
- package/src/default.d.ts +0 -18
- package/src/hooks/useWalletKit.ts +0 -42
- package/src/index.ts +0 -9
- package/src/locals/i18n.ts +0 -19
- package/src/locals/languages/en.json +0 -30
- package/src/locals/languages/zh.json +0 -30
- package/src/locals/resources.ts +0 -11
- package/src/stores/SlotsWalletStore.ts +0 -48
- package/src/stores/index.ts +0 -75
- package/src/styled/index.ts +0 -79
- package/src/test/getwalletprovider.test.ts +0 -9
- package/src/test/setup.ts +0 -7
- package/src/theme/index.ts +0 -93
- package/src/theme/styled.d.ts +0 -30
- package/src/types/configType.ts +0 -2
- package/src/types/slotsType.ts +0 -23
- package/src/utils/formatter.ts +0 -4
- package/src/utils/generateAvatar.ts +0 -35
- package/src/wallets/GelWallet/index.ts +0 -0
- package/src/wallets/SlotsWallets/index.ts +0 -30
- package/tsconfig.build.json +0 -4
- package/tsconfig.json +0 -55
- package/vitest.config.ts +0 -10
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { styled } from 'styled-components';
|
|
2
|
-
|
|
3
|
-
const IntroduceContainer = styled.div`
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
margin: 84px 50px 0 96px;
|
|
7
|
-
font-family: Manrope;
|
|
8
|
-
color: ${({ theme }) => theme.textColor1};
|
|
9
|
-
|
|
10
|
-
.title {
|
|
11
|
-
color: ${({ theme }) => theme.blue};
|
|
12
|
-
font-size: 18px;
|
|
13
|
-
font-weight: 700;
|
|
14
|
-
line-height: 18px;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.introduce {
|
|
18
|
-
margin-top: 24px;
|
|
19
|
-
font-size: 12px;
|
|
20
|
-
font-weight: 700;
|
|
21
|
-
line-height: 14px;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.detail {
|
|
25
|
-
margin-top: 16px;
|
|
26
|
-
font-size: 12px;
|
|
27
|
-
font-weight: 500;
|
|
28
|
-
line-height: 14px;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.footer {
|
|
32
|
-
display: flex;
|
|
33
|
-
flex-direction: column;
|
|
34
|
-
align-items: center;
|
|
35
|
-
max-width: 120px;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.button {
|
|
39
|
-
width: 100%;
|
|
40
|
-
display: inline-block;
|
|
41
|
-
margin-top: 32px;
|
|
42
|
-
padding: 11px 16px;
|
|
43
|
-
color: ${({ theme }) => theme.buttonColor};
|
|
44
|
-
background: ${({ theme }) => theme.buttonBg};
|
|
45
|
-
font-size: 14px;
|
|
46
|
-
font-weight: 700;
|
|
47
|
-
line-height: 14px;
|
|
48
|
-
text-align: center;
|
|
49
|
-
border-radius: 8px;
|
|
50
|
-
box-sizing: border-box;
|
|
51
|
-
cursor: pointer;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.more {
|
|
55
|
-
margin-top: 8px;
|
|
56
|
-
font-size: 12px;
|
|
57
|
-
font-style: normal;
|
|
58
|
-
font-weight: 700;
|
|
59
|
-
cursor: pointer;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
@media (max-width: 768px) {
|
|
63
|
-
padding: 40px 32px 0;
|
|
64
|
-
margin: 0;
|
|
65
|
-
align-items: center;
|
|
66
|
-
|
|
67
|
-
.detail {
|
|
68
|
-
text-align: center;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
`;
|
|
72
|
-
|
|
73
|
-
export default IntroduceContainer;
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import ModalHeader from '../Header/ModalHeader';
|
|
2
|
-
import Modal from './index';
|
|
3
|
-
import { SlotWrapper } from '../../styled';
|
|
4
|
-
import { SupportWallets } from '@web3jskit/wallethelper';
|
|
5
|
-
import { useTranslation } from 'react-i18next';
|
|
6
|
-
import { useCallback, useEffect, useMemo, useState, type ReactNode } from 'react';
|
|
7
|
-
import { WalletTriggerButton } from '../WalletTriggerButton';
|
|
8
|
-
import { Introduce } from '../Introduce';
|
|
9
|
-
import { WalletList } from '../WalletList';
|
|
10
|
-
import { GetWallet } from '../GetWallet';
|
|
11
|
-
import { Connecting } from '../Connecting';
|
|
12
|
-
import { useWalletKit } from '../../hooks/useWalletKit';
|
|
13
|
-
import { AsideList, ModalAside, ModalContainer, ModalMain } from './style';
|
|
14
|
-
|
|
15
|
-
interface ModalProps {
|
|
16
|
-
isOpen: boolean;
|
|
17
|
-
closeAble?: boolean;
|
|
18
|
-
slots?: ReactNode[];
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
enum Step {
|
|
22
|
-
Introduce = 0,
|
|
23
|
-
WalletList = 1,
|
|
24
|
-
GetWallet = 2,
|
|
25
|
-
Connecting = 3
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export function ConnectModal({ isOpen, slots }: ModalProps) {
|
|
29
|
-
const { t } = useTranslation();
|
|
30
|
-
|
|
31
|
-
const { currentChain, getConnectors, currentConnector, connectStatus, closeModal } = useWalletKit();
|
|
32
|
-
|
|
33
|
-
const [step, setStep] = useState(Step.Introduce);
|
|
34
|
-
const [selectedWallet, setSelectedWallet] = useState<any | null>(null);
|
|
35
|
-
const [connectors, setConnectors] = useState<any[]>([]);
|
|
36
|
-
|
|
37
|
-
const requestConnectors = async () => {
|
|
38
|
-
const list = await getConnectors(currentChain);
|
|
39
|
-
setConnectors(list);
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
const connectorsGroupByType = useMemo(() => {
|
|
43
|
-
const result = connectors.reduce((acc, connector) => {
|
|
44
|
-
if (!acc[connector.connectorType]) {
|
|
45
|
-
acc[connector.connectorType] = [];
|
|
46
|
-
}
|
|
47
|
-
acc[connector.connectorType].push(connector);
|
|
48
|
-
return acc;
|
|
49
|
-
}, {});
|
|
50
|
-
return result;
|
|
51
|
-
}, [connectors]);
|
|
52
|
-
|
|
53
|
-
const sortedKeys = useMemo(() => {
|
|
54
|
-
const keys = Object.keys(connectorsGroupByType);
|
|
55
|
-
const sortedKeys = keys.sort((a, b) => {
|
|
56
|
-
const order = ['installed', 'run', 'more'];
|
|
57
|
-
return order.indexOf(a) - order.indexOf(b);
|
|
58
|
-
});
|
|
59
|
-
return sortedKeys;
|
|
60
|
-
}, [connectorsGroupByType]);
|
|
61
|
-
|
|
62
|
-
useEffect(() => {
|
|
63
|
-
if (isOpen) {
|
|
64
|
-
requestConnectors();
|
|
65
|
-
} else {
|
|
66
|
-
setStep(0);
|
|
67
|
-
setConnectors([]);
|
|
68
|
-
}
|
|
69
|
-
}, [isOpen, currentChain]);
|
|
70
|
-
|
|
71
|
-
useEffect(() => {
|
|
72
|
-
switch (connectStatus) {
|
|
73
|
-
case 'connected':
|
|
74
|
-
closeModal();
|
|
75
|
-
break;
|
|
76
|
-
default:
|
|
77
|
-
setStep(0);
|
|
78
|
-
break;
|
|
79
|
-
}
|
|
80
|
-
}, [connectStatus]);
|
|
81
|
-
|
|
82
|
-
const renderMainByStep = useCallback(() => {
|
|
83
|
-
switch (step) {
|
|
84
|
-
case 0:
|
|
85
|
-
return (
|
|
86
|
-
<Introduce
|
|
87
|
-
onGetWallet={() => {
|
|
88
|
-
setStep(Step.WalletList);
|
|
89
|
-
}}
|
|
90
|
-
/>
|
|
91
|
-
);
|
|
92
|
-
case 1:
|
|
93
|
-
return (
|
|
94
|
-
<WalletList
|
|
95
|
-
list={SupportWallets}
|
|
96
|
-
onBack={() => {
|
|
97
|
-
setStep(0);
|
|
98
|
-
}}
|
|
99
|
-
onGetWallet={wallet => {
|
|
100
|
-
if (wallet.name === 'Gel Wallet') {
|
|
101
|
-
window.open(wallet.webUrl, '_blank');
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
setSelectedWallet(wallet);
|
|
105
|
-
setStep(Step.GetWallet);
|
|
106
|
-
}}
|
|
107
|
-
/>
|
|
108
|
-
);
|
|
109
|
-
case 2:
|
|
110
|
-
return (
|
|
111
|
-
<GetWallet
|
|
112
|
-
wallet={selectedWallet}
|
|
113
|
-
onBack={() => {
|
|
114
|
-
setStep(Step.WalletList);
|
|
115
|
-
}}
|
|
116
|
-
/>
|
|
117
|
-
);
|
|
118
|
-
default:
|
|
119
|
-
return <></>;
|
|
120
|
-
}
|
|
121
|
-
}, [step]);
|
|
122
|
-
|
|
123
|
-
return (
|
|
124
|
-
<Modal isOpen={isOpen}>
|
|
125
|
-
<ModalContainer>
|
|
126
|
-
<ModalAside className={step !== 0 ? 'hidden' : ''}>
|
|
127
|
-
<ModalHeader title={t('connectWallet')} className="asideTitle" />
|
|
128
|
-
<AsideList>
|
|
129
|
-
{sortedKeys.map(connectorType => {
|
|
130
|
-
return (
|
|
131
|
-
<div className="typeBox" key={connectorType}>
|
|
132
|
-
<div className={`typeHeader ${connectorType}`}>{t(connectorType)}</div>
|
|
133
|
-
{connectorsGroupByType[connectorType].map((connector: any) => {
|
|
134
|
-
return <WalletTriggerButton key={connectorType + connector.name} connector={connector} />;
|
|
135
|
-
})}
|
|
136
|
-
</div>
|
|
137
|
-
);
|
|
138
|
-
})}
|
|
139
|
-
|
|
140
|
-
{slots ? (
|
|
141
|
-
slots.map((Slot: ReactNode, index: number) => {
|
|
142
|
-
return <SlotWrapper key={index}>{Slot}</SlotWrapper>;
|
|
143
|
-
})
|
|
144
|
-
) : (
|
|
145
|
-
<></>
|
|
146
|
-
)}
|
|
147
|
-
</AsideList>
|
|
148
|
-
</ModalAside>
|
|
149
|
-
<ModalMain>
|
|
150
|
-
{connectStatus === 'connecting' ? <Connecting wallet={currentConnector} /> : renderMainByStep()}
|
|
151
|
-
</ModalMain>
|
|
152
|
-
</ModalContainer>
|
|
153
|
-
</Modal>
|
|
154
|
-
);
|
|
155
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import Modal from './index';
|
|
2
|
-
import { useTranslation } from 'react-i18next';
|
|
3
|
-
import ModalHeader from '../Header/ModalHeader';
|
|
4
|
-
import { useWalletKit } from '../../hooks/useWalletKit';
|
|
5
|
-
import { formatAddress } from '../../utils/formatter';
|
|
6
|
-
import { InfoModalContainer } from './style';
|
|
7
|
-
import CopySvg from '../SVGs/copySvg';
|
|
8
|
-
import CopiedSvg from '../SVGs/copiedSvg';
|
|
9
|
-
import ExitSvg from '../SVGs/exitSvg';
|
|
10
|
-
import copyToClipboard from 'copy-to-clipboard';
|
|
11
|
-
import { useEffect, useState } from 'react';
|
|
12
|
-
import { generateRandomAvatar } from '../../utils/generateAvatar';
|
|
13
|
-
|
|
14
|
-
interface ModalProps {
|
|
15
|
-
isOpen: boolean;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export function WalletInfoModal({ isOpen }: ModalProps) {
|
|
19
|
-
const { t } = useTranslation();
|
|
20
|
-
const { walletAddress, closeModal, currentConnector, avatar, setAvatar } = useWalletKit();
|
|
21
|
-
|
|
22
|
-
const [copied, setCopied] = useState(false);
|
|
23
|
-
|
|
24
|
-
const generateAvatar = () => {
|
|
25
|
-
const newAvatar = generateRandomAvatar();
|
|
26
|
-
setAvatar(newAvatar);
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
useEffect(() => {
|
|
30
|
-
generateAvatar();
|
|
31
|
-
}, []);
|
|
32
|
-
|
|
33
|
-
return (
|
|
34
|
-
<Modal isOpen={isOpen}>
|
|
35
|
-
<InfoModalContainer>
|
|
36
|
-
<ModalHeader />
|
|
37
|
-
<div className="avatarBox" onClick={() => generateAvatar()}>
|
|
38
|
-
<div
|
|
39
|
-
className="avatar"
|
|
40
|
-
style={{
|
|
41
|
-
backgroundColor: avatar?.bg
|
|
42
|
-
}}
|
|
43
|
-
>
|
|
44
|
-
{avatar?.text}
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
<div className="accountInfo">
|
|
48
|
-
<div className="address">{formatAddress(walletAddress)}</div>
|
|
49
|
-
{/* <div className="tokenAmount">{'0 ETH'}</div> */}
|
|
50
|
-
</div>
|
|
51
|
-
<div className="btnGroup">
|
|
52
|
-
<div
|
|
53
|
-
className="button"
|
|
54
|
-
onClick={() => {
|
|
55
|
-
copyToClipboard(walletAddress);
|
|
56
|
-
if (copied) return;
|
|
57
|
-
setCopied(true);
|
|
58
|
-
setTimeout(() => {
|
|
59
|
-
setCopied(false);
|
|
60
|
-
}, 1000);
|
|
61
|
-
}}
|
|
62
|
-
>
|
|
63
|
-
<div className="btnIcon">{copied ? <CopiedSvg /> : <CopySvg />}</div>
|
|
64
|
-
<div className="btnText">{t(copied ? 'copied' : 'copyAddress')}</div>
|
|
65
|
-
</div>
|
|
66
|
-
<div
|
|
67
|
-
className="button"
|
|
68
|
-
onClick={() => {
|
|
69
|
-
currentConnector?.disconnect();
|
|
70
|
-
closeModal();
|
|
71
|
-
}}
|
|
72
|
-
>
|
|
73
|
-
<div className="btnIcon">
|
|
74
|
-
<ExitSvg />
|
|
75
|
-
</div>
|
|
76
|
-
<div className="btnText">{t('disConnect')}</div>
|
|
77
|
-
</div>
|
|
78
|
-
</div>
|
|
79
|
-
</InfoModalContainer>
|
|
80
|
-
</Modal>
|
|
81
|
-
);
|
|
82
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { type ReactNode, type RefObject } from 'react';
|
|
2
|
-
import { styled } from 'styled-components';
|
|
3
|
-
import { animated, useTransition } from '@react-spring/web';
|
|
4
|
-
import { DialogOverlay, DialogContent } from '@reach/dialog';
|
|
5
|
-
import '@reach/dialog/styles.css';
|
|
6
|
-
import { useWalletKit } from '../../hooks/useWalletKit';
|
|
7
|
-
|
|
8
|
-
const AnimatedDialogOverlay = animated(DialogOverlay);
|
|
9
|
-
|
|
10
|
-
const AnimatedDialogContent = animated(DialogContent);
|
|
11
|
-
|
|
12
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
13
|
-
const StyledDialogOverlay = styled(AnimatedDialogOverlay)`
|
|
14
|
-
&[data-reach-dialog-overlay] {
|
|
15
|
-
width: 100vw;
|
|
16
|
-
z-index: 99;
|
|
17
|
-
}
|
|
18
|
-
`;
|
|
19
|
-
|
|
20
|
-
const StyledDialogContent = styled(({ ...rest }) => <AnimatedDialogContent {...rest} />).attrs({
|
|
21
|
-
'aria-label': 'dialog'
|
|
22
|
-
})`
|
|
23
|
-
position: fixed;
|
|
24
|
-
left: 50%;
|
|
25
|
-
bottom: 50%;
|
|
26
|
-
transform: translate(-50%, 50%);
|
|
27
|
-
border-radius: 12px;
|
|
28
|
-
box-shadow: rgb(47 128 237 / 5%) 0 4px 8px 0;
|
|
29
|
-
overflow: hidden;
|
|
30
|
-
align-self: center;
|
|
31
|
-
padding: 0;
|
|
32
|
-
margin: 0;
|
|
33
|
-
outline: none;
|
|
34
|
-
width: auto;
|
|
35
|
-
background-color: ${({ theme }) => theme.modalBg};
|
|
36
|
-
|
|
37
|
-
@media (max-width: 768px) {
|
|
38
|
-
left: 0;
|
|
39
|
-
bottom: 0;
|
|
40
|
-
transform: none;
|
|
41
|
-
border-bottom-right-radius: 0;
|
|
42
|
-
border-bottom-left-radius: 0;
|
|
43
|
-
}
|
|
44
|
-
`;
|
|
45
|
-
|
|
46
|
-
interface ModalProps {
|
|
47
|
-
isOpen: boolean;
|
|
48
|
-
minHeight?: number | false;
|
|
49
|
-
maxHeight?: number;
|
|
50
|
-
initialFocusRef?: RefObject<any>;
|
|
51
|
-
children?: ReactNode;
|
|
52
|
-
closeAble?: boolean;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export default function Modal({ isOpen, children, closeAble = true }: ModalProps) {
|
|
56
|
-
const transitions = useTransition(isOpen, {
|
|
57
|
-
from: { opacity: 0 },
|
|
58
|
-
enter: { opacity: 1 },
|
|
59
|
-
leave: { opacity: 0 },
|
|
60
|
-
config: { duration: 150 }
|
|
61
|
-
});
|
|
62
|
-
const { closeModal } = useWalletKit();
|
|
63
|
-
return (
|
|
64
|
-
<>
|
|
65
|
-
{transitions((styles: any, item: any) => {
|
|
66
|
-
return (
|
|
67
|
-
item && (
|
|
68
|
-
<StyledDialogOverlay
|
|
69
|
-
style={{ opacity: styles.opacity }}
|
|
70
|
-
onDismiss={closeAble ? closeModal : () => {}}
|
|
71
|
-
isOpen={isOpen}
|
|
72
|
-
>
|
|
73
|
-
<StyledDialogContent className={'dialog-content-style'}>{children}</StyledDialogContent>
|
|
74
|
-
</StyledDialogOverlay>
|
|
75
|
-
)
|
|
76
|
-
);
|
|
77
|
-
})}
|
|
78
|
-
</>
|
|
79
|
-
);
|
|
80
|
-
}
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import { styled } from 'styled-components';
|
|
2
|
-
|
|
3
|
-
export const ModalContainer = styled.div`
|
|
4
|
-
display: flex;
|
|
5
|
-
width: 720px;
|
|
6
|
-
height: 506px;
|
|
7
|
-
|
|
8
|
-
@media (max-width: 768px) {
|
|
9
|
-
flex-direction: column;
|
|
10
|
-
width: 100vw;
|
|
11
|
-
height: 454px;
|
|
12
|
-
}
|
|
13
|
-
`;
|
|
14
|
-
|
|
15
|
-
export const ModalAside = styled.div`
|
|
16
|
-
width: 200px;
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
border-right: 1px solid ${({ theme }) => theme.borderColor};
|
|
20
|
-
padding-top: 16px;
|
|
21
|
-
box-sizing: border-box;
|
|
22
|
-
|
|
23
|
-
@media (max-width: 768px) {
|
|
24
|
-
width: 100%;
|
|
25
|
-
border-right: none;
|
|
26
|
-
padding-top: 0;
|
|
27
|
-
padding-bottom: 24px;
|
|
28
|
-
background-color: ${({ theme }) => theme.modalSideBg};
|
|
29
|
-
|
|
30
|
-
&.hidden {
|
|
31
|
-
display: none;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
`;
|
|
35
|
-
|
|
36
|
-
export const AsideList = styled.div`
|
|
37
|
-
overflow-y: auto;
|
|
38
|
-
overflow-x: hidden;
|
|
39
|
-
display: flex;
|
|
40
|
-
flex-direction: column;
|
|
41
|
-
gap: 16px;
|
|
42
|
-
padding: 0 20px 20px;
|
|
43
|
-
|
|
44
|
-
.typeBox {
|
|
45
|
-
display: flex;
|
|
46
|
-
flex-direction: column;
|
|
47
|
-
gap: 4px;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.typeHeader {
|
|
51
|
-
font-size: 14px;
|
|
52
|
-
line-height: 14px;
|
|
53
|
-
font-weight: 700;
|
|
54
|
-
color: ${({ theme }) => theme.gray};
|
|
55
|
-
margin-bottom: 14px;
|
|
56
|
-
|
|
57
|
-
&.installed {
|
|
58
|
-
color: ${({ theme }) => theme.blue};
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
@media (max-width: 768px) {
|
|
63
|
-
overflow-x: auto;
|
|
64
|
-
overflow-y: hidden;
|
|
65
|
-
flex-direction: row;
|
|
66
|
-
padding: 0 20px;
|
|
67
|
-
|
|
68
|
-
.typeBox {
|
|
69
|
-
flex-direction: row;
|
|
70
|
-
|
|
71
|
-
.typeHeader {
|
|
72
|
-
display: none;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// &::-webkit-scrollbar {
|
|
77
|
-
// display: none;
|
|
78
|
-
// }
|
|
79
|
-
}
|
|
80
|
-
`;
|
|
81
|
-
|
|
82
|
-
export const ModalMain = styled.div`
|
|
83
|
-
flex: 1;
|
|
84
|
-
height: 100%;
|
|
85
|
-
`;
|
|
86
|
-
|
|
87
|
-
export const InfoModalContainer = styled.div`
|
|
88
|
-
display: flex;
|
|
89
|
-
flex-direction: column;
|
|
90
|
-
align-items: center;
|
|
91
|
-
width: 360px;
|
|
92
|
-
height: 240px;
|
|
93
|
-
text-align: center;
|
|
94
|
-
|
|
95
|
-
.avatarBox {
|
|
96
|
-
margin-top: -28px;
|
|
97
|
-
font-size: 41px;
|
|
98
|
-
|
|
99
|
-
.avatar {
|
|
100
|
-
width: 74px;
|
|
101
|
-
height: 74px;
|
|
102
|
-
line-height: 74px;
|
|
103
|
-
border-radius: 50%;
|
|
104
|
-
user-select: none;
|
|
105
|
-
cursor: pointer;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.accountInfo {
|
|
110
|
-
margin-top: 12px;
|
|
111
|
-
color: ${({ theme }) => theme.textColor};
|
|
112
|
-
|
|
113
|
-
.address {
|
|
114
|
-
font-size: 18px;
|
|
115
|
-
font-weight: 800;
|
|
116
|
-
line-height: 24px;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.tokenAmount {
|
|
120
|
-
font-size: 14px;
|
|
121
|
-
font-weight: 600;
|
|
122
|
-
line-height: 18px;
|
|
123
|
-
color: ${({ theme }) => theme.textColor3};
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.btnGroup {
|
|
128
|
-
display: flex;
|
|
129
|
-
gap: 8px;
|
|
130
|
-
margin-top: 16px;
|
|
131
|
-
width: 100%;
|
|
132
|
-
justify-content: center;
|
|
133
|
-
padding: 0 16px 16px;
|
|
134
|
-
box-sizing: border-box;
|
|
135
|
-
|
|
136
|
-
.button {
|
|
137
|
-
padding: 8px;
|
|
138
|
-
color: ${({ theme }) => theme.textColor};
|
|
139
|
-
width: 100%;
|
|
140
|
-
display: flex;
|
|
141
|
-
flex-direction: column;
|
|
142
|
-
align-items: center;
|
|
143
|
-
cursor: pointer;
|
|
144
|
-
border-radius: 12px;
|
|
145
|
-
background-color: ${({ theme }) => theme.infoBtnBg};
|
|
146
|
-
|
|
147
|
-
&:hover {
|
|
148
|
-
background-color: ${({ theme }) => theme.infoBtnHoverBg};
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.btnIcon {
|
|
153
|
-
height: 18px;
|
|
154
|
-
}
|
|
155
|
-
.btnText {
|
|
156
|
-
font-size: 13px;
|
|
157
|
-
font-weight: 600;
|
|
158
|
-
line-height: 18px;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
@media (max-width: 768px) {
|
|
163
|
-
width: 100vw;
|
|
164
|
-
height: 280px;
|
|
165
|
-
|
|
166
|
-
.avatarBox {
|
|
167
|
-
margin-top: -4px;
|
|
168
|
-
font-size: 45px;
|
|
169
|
-
|
|
170
|
-
.avatar {
|
|
171
|
-
width: 82px;
|
|
172
|
-
height: 82px;
|
|
173
|
-
line-height: 82px;
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.accountInfo {
|
|
178
|
-
margin-top: 16px;
|
|
179
|
-
|
|
180
|
-
.address {
|
|
181
|
-
font-size: 20px;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.tokenAmount {
|
|
185
|
-
font-size: 16px;
|
|
186
|
-
line-height: 20px;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
`;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
const BackArrowSvg = (props: any) => (
|
|
2
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" {...props}>
|
|
3
|
-
<path
|
|
4
|
-
d="M3.05505 12.2283C3.08043 12.2779 3.11445 12.3238 3.15686 12.3637C3.16913 12.3753 3.18186 12.3862 3.195 12.3963L9.18767 17.3904C9.4033 17.5629 9.71795 17.528 9.89045 17.3124C10.063 17.0967 10.028 16.7821 9.81237 16.6096L4.92541 12.5H19.5C19.7762 12.5 20 12.2761 20 12C20 11.7239 19.7762 11.5 19.5 11.5H4.803L9.8345 6.87165C10.0398 6.68692 10.0564 6.37078 9.87167 6.16552C9.68694 5.96027 9.37079 5.94363 9.16554 6.12836L3.17252 11.6221C3.15999 11.633 3.14791 11.6445 3.13633 11.6568C3.09631 11.6992 3.06501 11.747 3.04255 11.7979C3.01196 11.867 2.99805 11.9411 3.00022 12.0145C3.00231 12.0879 3.02049 12.1611 3.05505 12.2283Z"
|
|
5
|
-
fill="#161617"
|
|
6
|
-
/>
|
|
7
|
-
</svg>
|
|
8
|
-
);
|
|
9
|
-
|
|
10
|
-
export default BackArrowSvg;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
const CloseSvg = () => (
|
|
2
|
-
<svg aria-hidden="true" fill="none" height="10" viewBox="0 0 10 10" width="10" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<title>Close</title>
|
|
4
|
-
<path
|
|
5
|
-
d="M1.70711 0.292893C1.31658 -0.0976311 0.683417 -0.0976311 0.292893 0.292893C-0.0976311 0.683417 -0.0976311 1.31658 0.292893 1.70711L3.58579 5L0.292893 8.29289C-0.0976311 8.68342 -0.0976311 9.31658 0.292893 9.70711C0.683417 10.0976 1.31658 10.0976 1.70711 9.70711L5 6.41421L8.29289 9.70711C8.68342 10.0976 9.31658 10.0976 9.70711 9.70711C10.0976 9.31658 10.0976 8.68342 9.70711 8.29289L6.41421 5L9.70711 1.70711C10.0976 1.31658 10.0976 0.683417 9.70711 0.292893C9.31658 -0.0976311 8.68342 -0.0976311 8.29289 0.292893L5 3.58579L1.70711 0.292893Z"
|
|
6
|
-
fill="currentColor"
|
|
7
|
-
></path>
|
|
8
|
-
</svg>
|
|
9
|
-
);
|
|
10
|
-
|
|
11
|
-
export default CloseSvg;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
const CopiedSvg = () => (
|
|
2
|
-
<svg fill="none" height="13" viewBox="0 0 13 13" width="13" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<title>Copied</title>
|
|
4
|
-
<path
|
|
5
|
-
d="M4.94568 12.2646C5.41052 12.2646 5.77283 12.0869 6.01892 11.7109L12.39 1.96973C12.5677 1.69629 12.6429 1.44336 12.6429 1.2041C12.6429 0.561523 12.1644 0.0966797 11.5082 0.0966797C11.057 0.0966797 10.7767 0.260742 10.5033 0.691406L4.9115 9.50977L2.07458 5.98926C1.82166 5.68848 1.54822 5.55176 1.16541 5.55176C0.502319 5.55176 0.0238037 6.02344 0.0238037 6.66602C0.0238037 6.95312 0.112671 7.20605 0.358765 7.48633L3.88611 11.7588C4.18005 12.1074 4.50818 12.2646 4.94568 12.2646Z"
|
|
6
|
-
fill="currentColor"
|
|
7
|
-
></path>
|
|
8
|
-
</svg>
|
|
9
|
-
);
|
|
10
|
-
|
|
11
|
-
export default CopiedSvg;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
const CopySvg = () => (
|
|
2
|
-
<svg fill="none" height="16" viewBox="0 0 17 16" width="17" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<title>Copy</title>
|
|
4
|
-
<path
|
|
5
|
-
d="M3.04236 12.3027H4.18396V13.3008C4.18396 14.8525 5.03845 15.7002 6.59705 15.7002H13.6244C15.183 15.7002 16.0375 14.8525 16.0375 13.3008V6.24609C16.0375 4.69434 15.183 3.84668 13.6244 3.84668H12.4828V2.8418C12.4828 1.29688 11.6283 0.442383 10.0697 0.442383H3.04236C1.48376 0.442383 0.629272 1.29004 0.629272 2.8418V9.90332C0.629272 11.4551 1.48376 12.3027 3.04236 12.3027ZM3.23376 10.5391C2.68689 10.5391 2.39294 10.2656 2.39294 9.68457V3.06055C2.39294 2.47949 2.68689 2.21289 3.23376 2.21289H9.8783C10.4252 2.21289 10.7191 2.47949 10.7191 3.06055V3.84668H6.59705C5.03845 3.84668 4.18396 4.69434 4.18396 6.24609V10.5391H3.23376ZM6.78845 13.9365C6.24158 13.9365 5.94763 13.6699 5.94763 13.0889V6.45801C5.94763 5.87695 6.24158 5.61035 6.78845 5.61035H13.433C13.9799 5.61035 14.2738 5.87695 14.2738 6.45801V13.0889C14.2738 13.6699 13.9799 13.9365 13.433 13.9365H6.78845Z"
|
|
6
|
-
fill="currentColor"
|
|
7
|
-
></path>
|
|
8
|
-
</svg>
|
|
9
|
-
);
|
|
10
|
-
|
|
11
|
-
export default CopySvg;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
const ExitSvg = () => (
|
|
2
|
-
<svg fill="none" height="16" viewBox="0 0 18 16" width="18" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<title>Disconnect</title>
|
|
4
|
-
<path
|
|
5
|
-
d="M2.67834 15.5908H9.99963C11.5514 15.5908 12.399 14.7432 12.399 13.1777V10.2656H10.6354V12.9863C10.6354 13.5332 10.3688 13.8271 9.78772 13.8271H2.89026C2.3092 13.8271 2.0426 13.5332 2.0426 12.9863V3.15625C2.0426 2.60254 2.3092 2.30859 2.89026 2.30859H9.78772C10.3688 2.30859 10.6354 2.60254 10.6354 3.15625V5.89746H12.399V2.95801C12.399 1.39941 11.5514 0.544922 9.99963 0.544922H2.67834C1.12659 0.544922 0.278931 1.39941 0.278931 2.95801V13.1777C0.278931 14.7432 1.12659 15.5908 2.67834 15.5908ZM7.43616 8.85059H14.0875L15.0924 8.78906L14.566 9.14453L13.6842 9.96484C13.5406 10.1016 13.4586 10.2861 13.4586 10.4844C13.4586 10.8398 13.7321 11.168 14.1217 11.168C14.3199 11.168 14.4635 11.0928 14.6002 10.9561L16.7809 8.68652C16.986 8.48145 17.0543 8.27637 17.0543 8.06445C17.0543 7.85254 16.986 7.64746 16.7809 7.43555L14.6002 5.17285C14.4635 5.03613 14.3199 4.9541 14.1217 4.9541C13.7321 4.9541 13.4586 5.27539 13.4586 5.6377C13.4586 5.83594 13.5406 6.02734 13.6842 6.15723L14.566 6.98438L15.0924 7.33984L14.0875 7.27148H7.43616C7.01917 7.27148 6.65686 7.62012 6.65686 8.06445C6.65686 8.50195 7.01917 8.85059 7.43616 8.85059Z"
|
|
6
|
-
fill="currentColor"
|
|
7
|
-
></path>
|
|
8
|
-
</svg>
|
|
9
|
-
);
|
|
10
|
-
|
|
11
|
-
export default ExitSvg;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
const SpinSvg = (props: React.SVGProps<SVGSVGElement> & { className?: string }) => (
|
|
2
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28" fill="none" {...props}>
|
|
3
|
-
<path
|
|
4
|
-
d="M21.3914 24.6515C21.6898 25.1549 21.5228 25.8278 20.9999 26.1124C20.488 26.4106 19.8365 26.2355 19.5463 25.7212C19.2342 25.2178 19.4149 24.5585 19.9213 24.2603C20.4524 23.9648 21.093 24.1454 21.3914 24.6515ZM15.0813 26.9303C15.0813 27.513 14.5995 28 13.9945 28C13.4114 28 12.9241 27.524 12.9241 26.9303V26.1808C12.9241 25.5844 13.4141 25.1084 13.9945 25.1084C14.5913 25.1084 15.0813 25.5844 15.0813 26.1808V26.9303ZM8.47553 25.7212C8.17165 26.2491 7.5119 26.416 7.00545 26.1178C6.48531 25.8251 6.30189 25.1713 6.6085 24.6488L7.40514 23.2563C7.71174 22.7447 8.36876 22.5669 8.8889 22.8596C9.39261 23.1578 9.57877 23.8226 9.27216 24.3287L8.47553 25.7212ZM3.34805 21.396C2.82791 21.686 2.16268 21.5109 1.87798 20.9993C1.5741 20.4959 1.74657 19.8284 2.26124 19.5302L4.40202 18.291C4.91394 18.0064 5.57917 18.1679 5.87209 18.6876C6.16228 19.191 5.98433 19.8585 5.47515 20.1567L3.34805 21.396ZM1.07039 15.0738C0.4736 15.0738 0 14.5923 0 14.0041C0 13.4077 0.4736 12.9262 1.07039 12.9262H4.40476C5.00155 12.9262 5.47515 13.4077 5.47515 13.9959C5.47515 14.5923 5.00155 15.0738 4.40476 15.0738H1.07039ZM2.26397 8.46155C1.74383 8.17157 1.5741 7.515 1.88071 7.00068C2.16542 6.4809 2.82791 6.30581 3.35079 6.60401L6.97534 8.70777C7.48726 9.00049 7.65699 9.65432 7.37228 10.1604C7.06841 10.6802 6.40866 10.8471 5.90495 10.5571L2.26397 8.46155ZM6.6085 3.3403L9.13254 7.72017C9.43915 8.23175 10.0962 8.41505 10.6081 8.11138C11.12 7.8214 11.2898 7.15662 10.9914 6.64231L8.45636 2.27064C8.16618 1.76453 7.50916 1.58124 7.00271 1.87943C6.48257 2.17763 6.31558 2.83693 6.6085 3.3403ZM12.9268 1.07787C12.9268 0.495164 13.4168 0 13.9972 0C14.594 0 15.084 0.484221 15.084 1.07787V6.12252C15.084 6.71891 14.6022 7.20039 13.9972 7.2086C13.4141 7.2086 12.9268 6.73532 12.9268 6.12252V1.07787ZM19.5326 2.27064C19.8392 1.75085 20.488 1.58124 21.0027 1.87396C21.5228 2.16395 21.7062 2.82052 21.3996 3.34304L18.8701 7.72291C18.5854 8.23449 17.9119 8.41505 17.4 8.11959C16.8881 7.8214 16.7184 7.15662 17.0085 6.64231L19.5326 2.27064ZM24.6737 6.60401L20.2854 9.1318C19.7735 9.42179 19.5955 10.0784 19.8885 10.6009C20.1923 11.1042 20.8521 11.2739 21.3585 10.9921L25.7496 8.46429C26.2533 8.1743 26.4395 7.51773 26.1329 7.00342C25.8372 6.48363 25.1775 6.29761 24.6737 6.60401ZM26.9295 12.9262C27.5318 12.9262 28.0081 13.4077 27.9999 14.0041C27.9999 14.5923 27.5345 15.0738 26.9295 15.0738H21.8759C21.2928 15.0738 20.8028 14.5923 20.8028 13.9959C20.8028 13.4077 21.2928 12.9262 21.8759 12.9262H26.9295Z"
|
|
5
|
-
fill="#6A6A6A"
|
|
6
|
-
/>
|
|
7
|
-
</svg>
|
|
8
|
-
);
|
|
9
|
-
|
|
10
|
-
export default SpinSvg;
|