@hot-labs/kit 1.2.0-alpha.1 → 1.2.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 +2 -9
- package/build/HotConnector.d.ts +105 -0
- package/build/HotConnector.js +303 -0
- package/build/HotConnector.js.map +1 -0
- package/build/OmniConnector.d.ts +90 -0
- package/build/OmniConnector.js +121 -0
- package/build/OmniConnector.js.map +1 -0
- package/build/OmniWallet.d.ts +35 -0
- package/build/OmniWallet.js +56 -0
- package/build/OmniWallet.js.map +1 -0
- package/build/activity.d.ts +18 -0
- package/build/activity.js +87 -0
- package/build/activity.js.map +1 -0
- package/build/core/Intents.d.ts +100 -0
- package/build/core/Intents.js +472 -0
- package/build/core/Intents.js.map +1 -0
- package/build/core/api.d.ts +60 -0
- package/build/core/api.js +108 -0
- package/build/core/api.js.map +1 -0
- package/build/core/bridge.d.ts +3 -0
- package/build/core/bridge.js +36 -0
- package/build/core/bridge.js.map +1 -0
- package/build/core/chains.d.ts +115 -0
- package/build/core/chains.js +381 -0
- package/build/core/chains.js.map +1 -0
- package/build/core/defaultTokens.d.ts +17 -0
- package/build/core/defaultTokens.js +1079 -0
- package/build/core/defaultTokens.js.map +1 -0
- package/build/core/events.d.ts +42 -0
- package/build/core/events.js +64 -0
- package/build/core/events.js.map +1 -0
- package/build/core/index.d.ts +10 -0
- package/build/core/index.js +11 -0
- package/build/core/index.js.map +1 -0
- package/build/core/recipient.d.ts +10 -0
- package/build/core/recipient.js +40 -0
- package/build/core/recipient.js.map +1 -0
- package/build/core/telemetry.d.ts +13 -0
- package/build/core/telemetry.js +27 -0
- package/build/core/telemetry.js.map +1 -0
- package/build/core/token.d.ts +37 -0
- package/build/core/token.js +106 -0
- package/build/core/token.js.map +1 -0
- package/build/core/tokens.d.ts +14 -0
- package/build/core/tokens.js +51 -0
- package/build/core/tokens.js.map +1 -0
- package/build/core/types.d.ts +60 -0
- package/build/core/types.js +2 -0
- package/build/core/types.js.map +1 -0
- package/build/core/utils.d.ts +25 -0
- package/build/core/utils.js +170 -0
- package/build/core/utils.js.map +1 -0
- package/build/cosmos/connector.d.ts +36 -0
- package/build/cosmos/connector.js +211 -0
- package/build/cosmos/connector.js.map +1 -0
- package/build/cosmos/helpers.d.ts +2 -0
- package/build/cosmos/helpers.js +29 -0
- package/build/cosmos/helpers.js.map +1 -0
- package/build/cosmos/index.d.ts +6 -0
- package/build/cosmos/index.js +5 -0
- package/build/cosmos/index.js.map +1 -0
- package/build/cosmos/wallet.d.ts +26 -0
- package/build/cosmos/wallet.js +51 -0
- package/build/cosmos/wallet.js.map +1 -0
- package/build/defaults.d.ts +1 -0
- package/build/defaults.js +7 -0
- package/build/defaults.js.map +1 -0
- package/build/evm/abi.d.ts +17 -0
- package/build/evm/abi.js +38 -0
- package/build/evm/abi.js.map +1 -0
- package/build/evm/connector.d.ts +29 -0
- package/build/evm/connector.js +118 -0
- package/build/evm/connector.js.map +1 -0
- package/build/evm/index.d.ts +6 -0
- package/build/evm/index.js +5 -0
- package/build/evm/index.js.map +1 -0
- package/build/evm/injected.d.ts +1 -0
- package/build/evm/injected.js +33 -0
- package/build/evm/injected.js.map +1 -0
- package/build/evm/wallet.d.ts +42 -0
- package/build/evm/wallet.js +130 -0
- package/build/evm/wallet.js.map +1 -0
- package/build/exchange.d.ts +68 -0
- package/build/exchange.js +384 -0
- package/build/exchange.js.map +1 -0
- package/build/hot-wallet/google.d.ts +25 -0
- package/build/hot-wallet/google.js +117 -0
- package/build/hot-wallet/google.js.map +1 -0
- package/build/hot-wallet/iframe.d.ts +36 -0
- package/build/hot-wallet/iframe.js +140 -0
- package/build/hot-wallet/iframe.js.map +1 -0
- package/build/hot-wallet/index.d.ts +5 -0
- package/build/hot-wallet/index.js +4 -0
- package/build/hot-wallet/index.js.map +1 -0
- package/build/hot-wallet/proxy.d.ts +8 -0
- package/build/hot-wallet/proxy.js +45 -0
- package/build/hot-wallet/proxy.js.map +1 -0
- package/build/index.d.ts +6 -0
- package/build/index.js +7 -0
- package/build/index.js.map +1 -0
- package/build/near/connector.d.ts +18 -0
- package/build/near/connector.js +58 -0
- package/build/near/connector.js.map +1 -0
- package/build/near/index.d.ts +7 -0
- package/build/near/index.js +5 -0
- package/build/near/index.js.map +1 -0
- package/build/near/rpc.d.ts +23 -0
- package/build/near/rpc.js +153 -0
- package/build/near/rpc.js.map +1 -0
- package/build/near/wallet.d.ts +55 -0
- package/build/near/wallet.js +201 -0
- package/build/near/wallet.js.map +1 -0
- package/build/solana/WalletStandard.d.ts +25 -0
- package/build/solana/WalletStandard.js +56 -0
- package/build/solana/WalletStandard.js.map +1 -0
- package/build/solana/connector.d.ts +30 -0
- package/build/solana/connector.js +139 -0
- package/build/solana/connector.js.map +1 -0
- package/build/solana/index.d.ts +6 -0
- package/build/solana/index.js +5 -0
- package/build/solana/index.js.map +1 -0
- package/build/solana/injected/account.d.ts +11 -0
- package/build/solana/injected/account.js +41 -0
- package/build/solana/injected/account.js.map +1 -0
- package/build/solana/injected/index.d.ts +1 -0
- package/build/solana/injected/index.js +82 -0
- package/build/solana/injected/index.js.map +1 -0
- package/build/solana/injected/register.d.ts +2 -0
- package/build/solana/injected/register.js +41 -0
- package/build/solana/injected/register.js.map +1 -0
- package/build/solana/injected/solana-wallet.d.ts +34 -0
- package/build/solana/injected/solana-wallet.js +223 -0
- package/build/solana/injected/solana-wallet.js.map +1 -0
- package/build/solana/injected/utils.d.ts +32 -0
- package/build/solana/injected/utils.js +36 -0
- package/build/solana/injected/utils.js.map +1 -0
- package/build/solana/wallet.d.ts +40 -0
- package/build/solana/wallet.js +181 -0
- package/build/solana/wallet.js.map +1 -0
- package/build/solana/walletStandartList.d.ts +102 -0
- package/build/solana/walletStandartList.js +150 -0
- package/build/solana/walletStandartList.js.map +1 -0
- package/build/stellar/connector.d.ts +29 -0
- package/build/stellar/connector.js +64 -0
- package/build/stellar/connector.js.map +1 -0
- package/build/stellar/freigher.d.ts +46 -0
- package/build/stellar/freigher.js +110 -0
- package/build/stellar/freigher.js.map +1 -0
- package/build/stellar/hotWallet.d.ts +33 -0
- package/build/stellar/hotWallet.js +28 -0
- package/build/stellar/hotWallet.js.map +1 -0
- package/build/stellar/index.d.ts +6 -0
- package/build/stellar/index.js +5 -0
- package/build/stellar/index.js.map +1 -0
- package/build/stellar/wallet.d.ts +67 -0
- package/build/stellar/wallet.js +212 -0
- package/build/stellar/wallet.js.map +1 -0
- package/build/storage.d.ts +10 -0
- package/build/storage.js +12 -0
- package/build/storage.js.map +1 -0
- package/build/ton/connector.d.ts +24 -0
- package/build/ton/connector.js +111 -0
- package/build/ton/connector.js.map +1 -0
- package/build/ton/index.d.ts +7 -0
- package/build/ton/index.js +5 -0
- package/build/ton/index.js.map +1 -0
- package/build/ton/injected.d.ts +1 -0
- package/build/ton/injected.js +49 -0
- package/build/ton/injected.js.map +1 -0
- package/build/ton/utils.d.ts +45 -0
- package/build/ton/utils.js +63 -0
- package/build/ton/utils.js.map +1 -0
- package/build/ton/wallet.d.ts +54 -0
- package/build/ton/wallet.js +138 -0
- package/build/ton/wallet.js.map +1 -0
- package/build/tron/connector.d.ts +51 -0
- package/build/tron/connector.js +65 -0
- package/build/tron/connector.js.map +1 -0
- package/build/tron/index.d.ts +6 -0
- package/build/tron/index.js +5 -0
- package/build/tron/index.js.map +1 -0
- package/build/tron/wallet.d.ts +52 -0
- package/build/tron/wallet.js +122 -0
- package/build/tron/wallet.js.map +1 -0
- package/build/ui/Popup.d.ts +12 -0
- package/build/ui/Popup.js +43 -0
- package/build/ui/Popup.js.map +1 -0
- package/build/ui/bridge/Bridge.d.ts +29 -0
- package/build/ui/bridge/Bridge.js +389 -0
- package/build/ui/bridge/Bridge.js.map +1 -0
- package/build/ui/bridge/SelectRecipient.d.ts +14 -0
- package/build/ui/bridge/SelectRecipient.js +68 -0
- package/build/ui/bridge/SelectRecipient.js.map +1 -0
- package/build/ui/bridge/SelectSender.d.ts +13 -0
- package/build/ui/bridge/SelectSender.js +23 -0
- package/build/ui/bridge/SelectSender.js.map +1 -0
- package/build/ui/bridge/SelectToken.d.ts +13 -0
- package/build/ui/bridge/SelectToken.js +93 -0
- package/build/ui/bridge/SelectToken.js.map +1 -0
- package/build/ui/bridge/TokenCard.d.ts +21 -0
- package/build/ui/bridge/TokenCard.js +65 -0
- package/build/ui/bridge/TokenCard.js.map +1 -0
- package/build/ui/connect/AuthPopup.d.ts +2 -0
- package/build/ui/connect/AuthPopup.js +48 -0
- package/build/ui/connect/AuthPopup.js.map +1 -0
- package/build/ui/connect/ConnectWallet.d.ts +14 -0
- package/build/ui/connect/ConnectWallet.js +22 -0
- package/build/ui/connect/ConnectWallet.js.map +1 -0
- package/build/ui/connect/LogoutPopup.d.ts +10 -0
- package/build/ui/connect/LogoutPopup.js +8 -0
- package/build/ui/connect/LogoutPopup.js.map +1 -0
- package/build/ui/connect/PrimaryWallet.d.ts +6 -0
- package/build/ui/connect/PrimaryWallet.js +18 -0
- package/build/ui/connect/PrimaryWallet.js.map +1 -0
- package/build/ui/connect/WCPopup.d.ts +13 -0
- package/build/ui/connect/WCPopup.js +81 -0
- package/build/ui/connect/WCPopup.js.map +1 -0
- package/build/ui/connect/WCRequest.d.ts +9 -0
- package/build/ui/connect/WCRequest.js +13 -0
- package/build/ui/connect/WCRequest.js.map +1 -0
- package/build/ui/connect/WalletPicker.d.ts +11 -0
- package/build/ui/connect/WalletPicker.js +48 -0
- package/build/ui/connect/WalletPicker.js.map +1 -0
- package/build/ui/icons/arrow-right.d.ts +3 -0
- package/build/ui/icons/arrow-right.js +5 -0
- package/build/ui/icons/arrow-right.js.map +1 -0
- package/build/ui/icons/close.d.ts +1 -0
- package/build/ui/icons/close.js +5 -0
- package/build/ui/icons/close.js.map +1 -0
- package/build/ui/icons/exchange.d.ts +5 -0
- package/build/ui/icons/exchange.js +6 -0
- package/build/ui/icons/exchange.js.map +1 -0
- package/build/ui/icons/logout.d.ts +1 -0
- package/build/ui/icons/logout.js +3 -0
- package/build/ui/icons/logout.js.map +1 -0
- package/build/ui/icons/pending.d.ts +1 -0
- package/build/ui/icons/pending.js +5 -0
- package/build/ui/icons/pending.js.map +1 -0
- package/build/ui/icons/plus.d.ts +2 -0
- package/build/ui/icons/plus.js +6 -0
- package/build/ui/icons/plus.js.map +1 -0
- package/build/ui/icons/qr.d.ts +1 -0
- package/build/ui/icons/qr.js +5 -0
- package/build/ui/icons/qr.js.map +1 -0
- package/build/ui/icons/refresh.d.ts +2 -0
- package/build/ui/icons/refresh.js +6 -0
- package/build/ui/icons/refresh.js.map +1 -0
- package/build/ui/icons/search.d.ts +1 -0
- package/build/ui/icons/search.js +5 -0
- package/build/ui/icons/search.js.map +1 -0
- package/build/ui/icons/switch.d.ts +1 -0
- package/build/ui/icons/switch.js +5 -0
- package/build/ui/icons/switch.js.map +1 -0
- package/build/ui/icons/wallet.d.ts +1 -0
- package/build/ui/icons/wallet.js +5 -0
- package/build/ui/icons/wallet.js.map +1 -0
- package/build/ui/profile/DepositQR.d.ts +9 -0
- package/build/ui/profile/DepositQR.js +56 -0
- package/build/ui/profile/DepositQR.js.map +1 -0
- package/build/ui/profile/Payment.d.ts +23 -0
- package/build/ui/profile/Payment.js +150 -0
- package/build/ui/profile/Payment.js.map +1 -0
- package/build/ui/profile/Profile.d.ts +7 -0
- package/build/ui/profile/Profile.js +135 -0
- package/build/ui/profile/Profile.js.map +1 -0
- package/build/ui/router.d.ts +51 -0
- package/build/ui/router.js +68 -0
- package/build/ui/router.js.map +1 -0
- package/build/ui/styles.d.ts +13 -0
- package/build/ui/styles.js +281 -0
- package/build/ui/styles.js.map +1 -0
- package/build/ui/uikit/Stepper.d.ts +13 -0
- package/build/ui/uikit/Stepper.js +22 -0
- package/build/ui/uikit/Stepper.js.map +1 -0
- package/build/ui/uikit/Toast.d.ts +4 -0
- package/build/ui/uikit/Toast.js +33 -0
- package/build/ui/uikit/Toast.js.map +1 -0
- package/build/ui/uikit/button.d.ts +2 -0
- package/build/ui/uikit/button.js +52 -0
- package/build/ui/uikit/button.js.map +1 -0
- package/build/ui/uikit/image.d.ts +6 -0
- package/build/ui/uikit/image.js +38 -0
- package/build/ui/uikit/image.js.map +1 -0
- package/build/ui/uikit/loader.d.ts +2 -0
- package/build/ui/uikit/loader.js +50 -0
- package/build/ui/uikit/loader.js.map +1 -0
- package/build/ui/uikit/tabs.d.ts +12 -0
- package/build/ui/uikit/tabs.js +35 -0
- package/build/ui/uikit/tabs.js.map +1 -0
- package/build/ui/uikit/text.d.ts +6 -0
- package/build/ui/uikit/text.js +59 -0
- package/build/ui/uikit/text.js.map +1 -0
- package/build/ui/utils.d.ts +1 -0
- package/build/ui/utils.js +20 -0
- package/build/ui/utils.js.map +1 -0
- package/package.json +8 -4
- package/src/HotConnector.ts +24 -31
- package/src/OmniConnector.ts +10 -9
- package/src/OmniWallet.ts +24 -25
- package/src/core/Intents.ts +222 -151
- package/src/core/api.ts +56 -10
- package/src/core/bridge.ts +3 -2
- package/src/core/index.ts +1 -1
- package/src/core/telemetry.ts +28 -0
- package/src/core/token.ts +4 -0
- package/src/core/tokens.ts +0 -9
- package/src/core/types.ts +21 -0
- package/src/core/utils.ts +17 -1
- package/src/cosmos/connector.ts +22 -26
- package/src/cosmos/wallet.ts +3 -8
- package/src/evm/connector.ts +5 -0
- package/src/evm/wallet.ts +9 -6
- package/src/exchange.ts +24 -30
- package/src/hot-wallet/google.ts +12 -5
- package/src/hot-wallet/proxy.ts +2 -2
- package/src/index.ts +3 -1
- package/src/near/connector.ts +2 -2
- package/src/{core/nearRpc.ts → near/rpc.ts} +9 -23
- package/src/near/wallet.ts +39 -31
- package/src/solana/{protocol.ts → WalletStandard.ts} +2 -4
- package/src/solana/connector.ts +9 -8
- package/src/solana/injected/solana-wallet.ts +6 -6
- package/src/solana/wallet.ts +11 -20
- package/src/stellar/connector.ts +1 -6
- package/src/stellar/wallet.ts +17 -17
- package/src/ton/connector.ts +1 -5
- package/src/ton/wallet.ts +3 -3
- package/src/tron/connector.ts +89 -0
- package/src/tron/index.ts +7 -0
- package/src/tron/wallet.ts +146 -0
- package/src/ui/Popup.tsx +12 -4
- package/src/ui/{payment → bridge}/Bridge.tsx +266 -212
- package/src/ui/{payment → bridge}/SelectRecipient.tsx +5 -4
- package/src/ui/{payment → bridge}/SelectSender.tsx +5 -5
- package/src/ui/{payment → bridge}/SelectToken.tsx +6 -4
- package/src/ui/bridge/TokenCard.tsx +99 -0
- package/src/ui/connect/AuthPopup.tsx +1 -1
- package/src/ui/connect/ConnectWallet.tsx +16 -10
- package/src/ui/connect/PrimaryWallet.tsx +65 -0
- package/src/ui/connect/WCRequest.tsx +1 -1
- package/src/ui/connect/WalletPicker.tsx +1 -1
- package/src/ui/icons/arrow-right.tsx +3 -4
- package/src/ui/icons/close.tsx +1 -1
- package/src/ui/icons/exchange.tsx +4 -11
- package/src/ui/icons/logout.tsx +4 -13
- package/src/ui/icons/pending.tsx +2 -4
- package/src/ui/icons/plus.tsx +12 -0
- package/src/ui/icons/qr.tsx +1 -2
- package/src/ui/icons/refresh.tsx +20 -0
- package/src/ui/icons/search.tsx +4 -4
- package/src/ui/icons/switch.tsx +4 -4
- package/src/ui/icons/wallet.tsx +2 -4
- package/src/ui/profile/Payment.tsx +309 -0
- package/src/ui/{payment → profile}/Profile.tsx +110 -70
- package/src/ui/router.tsx +57 -17
- package/src/ui/styles.ts +4 -11
- package/src/ui/uikit/Stepper.tsx +50 -0
- package/src/ui/uikit/Toast.tsx +45 -0
- package/src/ui/uikit/button.tsx +53 -0
- package/src/ui/uikit/image.tsx +45 -0
- package/src/ui/uikit/loader.tsx +52 -0
- package/src/ui/uikit/tabs.tsx +56 -0
- package/src/ui/uikit/text.tsx +64 -0
- package/src/ui/utils.ts +14 -0
- package/src/ui/payment/Payment.tsx +0 -79
- package/src/ui/payment/TokenCard.tsx +0 -98
- /package/src/solana/{wallets.ts → walletStandartList.ts} +0 -0
- /package/src/ui/{payment → profile}/DepositQR.tsx +0 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { observer } from "mobx-react-lite";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import { useEffect } from "react";
|
|
5
|
+
import PlusIcon from "../icons/plus";
|
|
6
|
+
import { LogoutIcon } from "../icons/logout";
|
|
7
|
+
import ExchangeIcon from "../icons/exchange";
|
|
8
|
+
import { formatter } from "../../core/utils";
|
|
9
|
+
import { tokens } from "../../core/tokens";
|
|
10
|
+
import { openBridge, openConnector } from "../router";
|
|
11
|
+
import { TokenCard, TokenIcon } from "../bridge/TokenCard";
|
|
12
|
+
import { ImageView } from "../uikit/image";
|
|
13
|
+
import { Loader } from "../uikit/loader";
|
|
14
|
+
import { PopupOption } from "../styles";
|
|
15
|
+
import Popup from "../Popup";
|
|
16
|
+
export const Profile = observer(({ hot, onClose }) => {
|
|
17
|
+
let totalBalance = 0;
|
|
18
|
+
const tokensList = hot.walletsTokens
|
|
19
|
+
.map(({ token, wallet, balance }) => {
|
|
20
|
+
if (token.float(balance) < 0.000001)
|
|
21
|
+
return null;
|
|
22
|
+
totalBalance += token.float(balance) * token.usd;
|
|
23
|
+
return {
|
|
24
|
+
chain: token.chain,
|
|
25
|
+
component: (_jsx(TokenCard //
|
|
26
|
+
, { onSelect: () => {
|
|
27
|
+
if (token.chain === -4)
|
|
28
|
+
hot.withdraw(token.address, +token.float(balance).toFixed(6), { sender: wallet });
|
|
29
|
+
else
|
|
30
|
+
openBridge(hot, { title: "Exchange", sender: wallet, from: token });
|
|
31
|
+
}, wallet: wallet, token: token, hot: hot }, `${wallet.type}:${wallet.address}:${token.id}`)),
|
|
32
|
+
};
|
|
33
|
+
})
|
|
34
|
+
.filter((t) => t != null);
|
|
35
|
+
const omniTokens = tokensList.filter((t) => t.chain === -4);
|
|
36
|
+
const nonOmniTokens = tokensList.filter((t) => t.chain !== -4);
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
if (hot.wallets.length > 0)
|
|
39
|
+
return;
|
|
40
|
+
onClose();
|
|
41
|
+
}, [hot.wallets.length]);
|
|
42
|
+
return (_jsxs(Popup, { onClose: onClose, style: { gap: 16 }, children: [_jsxs("div", { style: { display: "flex", flexWrap: "wrap", width: "100%", gap: 8 }, children: [hot.connectors.map((connector) => connector.wallets.map((wallet) => (_jsxs(WalletCard, { onClick: () => connector.disconnect(), children: [_jsx(ImageView, { src: wallet.icon, alt: connector.name, size: 20 }), _jsx("div", { children: formatter.truncateAddress(wallet.address, 8) }), _jsx(LogoutIcon, {})] })))), hot.wallets.length < 6 && (_jsxs(WalletCard, { style: { paddingRight: 12 }, onClick: () => openConnector(hot), children: [_jsx(PlusIcon, {}), "Add wallet"] }))] }), _jsxs(Card, { children: [_jsx(PSmall, { children: "YOUR BALANCE" }), _jsxs(BalanceCard, { children: ["$", formatter.amount(totalBalance)] }), _jsxs("div", { style: { width: "100%", display: "flex", gap: 12, marginTop: 24 }, children: [_jsxs(ActionButton, { onClick: () => (onClose(), openBridge(hot, { title: "Exchange" })), children: [_jsx(ExchangeIcon, {}), "Exchange"] }), _jsx(ActionButton, { disabled: true, onClick: () => (onClose(), openBridge(hot, { title: "Deposit" })), children: "Deposit" })] })] }), hot.activity.withdrawalsList.length > 0 && (_jsxs(TokenCards, { children: [_jsx("p", { style: { fontSize: 16, fontWeight: 600, color: "#d2d2d2", textAlign: "left" }, children: "Pending withdrawals" }), hot.activity.withdrawalsList.map((withdrawal) => {
|
|
43
|
+
const token = tokens.get(withdrawal.token, withdrawal.chain);
|
|
44
|
+
return (_jsxs(PopupOption, { onClick: () => hot.activity.finishWithdrawal(withdrawal), disabled: withdrawal.loading, children: [_jsx(TokenIcon, { token: token }), _jsxs("div", { children: [_jsxs("p", { style: { marginTop: -4, textAlign: "left", fontSize: 20, fontWeight: "bold" }, children: [token.float(withdrawal.amount), " ", token.symbol] }), _jsx("p", { style: { textAlign: "left", fontSize: 12, color: "#828282" }, children: new Date(withdrawal.timestamp).toLocaleString() })] }), _jsx("div", { style: { marginLeft: "auto", padding: "8px 12px", borderRadius: 16, background: "#1a1a1a", color: "#fff" }, children: _jsx("p", { style: { color: "#d6d6d6" }, children: withdrawal.loading ? _jsx(Loader, {}) : "Withdraw" }) })] }, withdrawal.nonce));
|
|
45
|
+
})] })), omniTokens.length > 0 && (_jsxs(TokenCards, { children: [_jsx("p", { style: { fontSize: 16, fontWeight: 600, color: "#d2d2d2", textAlign: "left" }, children: "Tokens to withdraw" }), omniTokens.map((t) => t.component)] })), nonOmniTokens.length > 0 && (_jsxs(TokenCards, { children: [_jsx("p", { style: { fontSize: 16, fontWeight: 600, color: "#d2d2d2", textAlign: "left" }, children: "Portfolio" }), nonOmniTokens.map((t) => t.component)] }))] }));
|
|
46
|
+
});
|
|
47
|
+
const ActionButton = styled.button `
|
|
48
|
+
display: flex;
|
|
49
|
+
padding: 0 24px;
|
|
50
|
+
border-radius: 12px;
|
|
51
|
+
background: #e7e7e7;
|
|
52
|
+
border: none;
|
|
53
|
+
outline: none;
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
transition: background 0.2s ease-in-out;
|
|
56
|
+
height: 48px;
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
justify-content: center;
|
|
60
|
+
gap: 8px;
|
|
61
|
+
flex: 1;
|
|
62
|
+
|
|
63
|
+
color: #121212;
|
|
64
|
+
text-align: center;
|
|
65
|
+
font-family: "Golos Text";
|
|
66
|
+
font-size: 16px;
|
|
67
|
+
font-style: normal;
|
|
68
|
+
font-weight: 500;
|
|
69
|
+
line-height: 22px;
|
|
70
|
+
letter-spacing: -0.16px;
|
|
71
|
+
|
|
72
|
+
&:hover {
|
|
73
|
+
background: #d2d2d2;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&:disabled {
|
|
77
|
+
background: #3e3e3e;
|
|
78
|
+
color: #828282;
|
|
79
|
+
cursor: not-allowed;
|
|
80
|
+
}
|
|
81
|
+
`;
|
|
82
|
+
const TokenCards = styled.div `
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
gap: 8px;
|
|
86
|
+
width: 100%;
|
|
87
|
+
`;
|
|
88
|
+
const WalletCard = styled.div `
|
|
89
|
+
display: flex;
|
|
90
|
+
align-items: center;
|
|
91
|
+
gap: 8px;
|
|
92
|
+
border-radius: 24px;
|
|
93
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
94
|
+
padding: 6px;
|
|
95
|
+
padding-left: 8px;
|
|
96
|
+
padding-right: 8px;
|
|
97
|
+
background: #1a1a1a;
|
|
98
|
+
cursor: pointer;
|
|
99
|
+
transition: background 0.2s ease-in-out;
|
|
100
|
+
|
|
101
|
+
&:hover {
|
|
102
|
+
background: rgba(255, 255, 255, 0.04);
|
|
103
|
+
}
|
|
104
|
+
`;
|
|
105
|
+
const BalanceCard = styled.h2 `
|
|
106
|
+
color: #fff;
|
|
107
|
+
font-family: "Golos Text";
|
|
108
|
+
font-size: 32px;
|
|
109
|
+
font-style: normal;
|
|
110
|
+
font-weight: 600;
|
|
111
|
+
line-height: 44px;
|
|
112
|
+
text-align: left;
|
|
113
|
+
margin: 0;
|
|
114
|
+
`;
|
|
115
|
+
const PSmall = styled.p `
|
|
116
|
+
color: #bfbfbf;
|
|
117
|
+
font-family: "Golos Text";
|
|
118
|
+
font-size: 14px;
|
|
119
|
+
font-style: normal;
|
|
120
|
+
font-weight: 400;
|
|
121
|
+
line-height: 20px;
|
|
122
|
+
letter-spacing: -0.14px;
|
|
123
|
+
text-align: left;
|
|
124
|
+
margin: 0;
|
|
125
|
+
`;
|
|
126
|
+
const Card = styled.div `
|
|
127
|
+
display: flex;
|
|
128
|
+
padding: 12px;
|
|
129
|
+
flex-direction: column;
|
|
130
|
+
border-radius: 16px;
|
|
131
|
+
border: 1px solid #323232;
|
|
132
|
+
background: #272727;
|
|
133
|
+
width: 100%;
|
|
134
|
+
`;
|
|
135
|
+
//# sourceMappingURL=Profile.js.map
|
|
@@ -0,0 +1 @@
|
|
|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B,CAAC;AAEF,MAAM,WAAW,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;;;;;CAS5B,CAAC;AAEF,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAA;;;;;;;;;;CAUtB,CAAC;AAEF,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;CAQtB,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { HotConnector } from "../HotConnector";
|
|
2
|
+
import { OmniConnector } from "../OmniConnector";
|
|
3
|
+
import { OmniWallet } from "../OmniWallet";
|
|
4
|
+
import { BridgeReview } from "../exchange";
|
|
5
|
+
import { WalletType } from "../core/chains";
|
|
6
|
+
import { Recipient } from "../core/recipient";
|
|
7
|
+
import { Intents } from "../core/Intents";
|
|
8
|
+
import { Token } from "../core/token";
|
|
9
|
+
import { BridgeProps } from "./bridge/Bridge";
|
|
10
|
+
export declare const openPayment: (connector: HotConnector, { intents, title, allowedTokens, prepaidAmount, payableToken, needAmount, onConfirm, }: {
|
|
11
|
+
intents: Intents;
|
|
12
|
+
title?: string;
|
|
13
|
+
allowedTokens?: string[];
|
|
14
|
+
prepaidAmount: bigint;
|
|
15
|
+
payableToken: Token;
|
|
16
|
+
needAmount: bigint;
|
|
17
|
+
onConfirm: (args: {
|
|
18
|
+
depositQoute?: BridgeReview;
|
|
19
|
+
processing?: () => Promise<BridgeReview>;
|
|
20
|
+
}) => Promise<void>;
|
|
21
|
+
}) => Promise<void>;
|
|
22
|
+
export declare const openLogoutPopup: (connector: OmniConnector) => Promise<void>;
|
|
23
|
+
export declare const openBridge: (hot: HotConnector, setup?: BridgeProps["setup"]) => Promise<BridgeReview>;
|
|
24
|
+
export declare const openConnector: (hot: HotConnector) => Promise<void>;
|
|
25
|
+
export declare const openConnectPrimaryWallet: (hot: HotConnector) => Promise<void>;
|
|
26
|
+
export declare const openProfile: (hot: HotConnector) => void;
|
|
27
|
+
export declare const openSelectTokenPopup: ({ hot, initialChain, onSelect }: {
|
|
28
|
+
hot: HotConnector;
|
|
29
|
+
initialChain?: number;
|
|
30
|
+
onSelect: (token: Token, wallet?: OmniWallet) => void;
|
|
31
|
+
}) => void;
|
|
32
|
+
export declare const openWalletPicker: (connector: OmniConnector, onSelect?: (wallet: OmniWallet) => void) => void;
|
|
33
|
+
export declare const openSelectSender: (props: {
|
|
34
|
+
hot: HotConnector;
|
|
35
|
+
type: WalletType;
|
|
36
|
+
onSelect: (wallet?: OmniWallet | "qr") => void;
|
|
37
|
+
}) => void;
|
|
38
|
+
export declare const openSelectRecipient: (props: {
|
|
39
|
+
hot: HotConnector;
|
|
40
|
+
recipient?: Recipient;
|
|
41
|
+
type: WalletType;
|
|
42
|
+
onSelect: (wallet?: Recipient) => void;
|
|
43
|
+
}) => void;
|
|
44
|
+
export declare const openWCRequest: <T>(args: {
|
|
45
|
+
task: () => Promise<T>;
|
|
46
|
+
deeplink?: string;
|
|
47
|
+
name: string;
|
|
48
|
+
icon: string;
|
|
49
|
+
request: any;
|
|
50
|
+
}) => Promise<T>;
|
|
51
|
+
export declare const openToast: (message: string) => () => void;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { present } from "./Popup";
|
|
3
|
+
import { SelectTokenPopup } from "./bridge/SelectToken";
|
|
4
|
+
import { SelectRecipient } from "./bridge/SelectRecipient";
|
|
5
|
+
import { SelectSender } from "./bridge/SelectSender";
|
|
6
|
+
import { Payment } from "./profile/Payment";
|
|
7
|
+
import { Profile } from "./profile/Profile";
|
|
8
|
+
import { Bridge } from "./bridge/Bridge";
|
|
9
|
+
import ConnectPrimaryWallet from "./connect/PrimaryWallet";
|
|
10
|
+
import { LogoutPopup } from "./connect/LogoutPopup";
|
|
11
|
+
import { WalletPicker } from "./connect/WalletPicker";
|
|
12
|
+
import { Connector } from "./connect/ConnectWallet";
|
|
13
|
+
import { WCRequest } from "./connect/WCRequest";
|
|
14
|
+
import Toast from "./uikit/Toast";
|
|
15
|
+
export const openPayment = (connector, { intents, title, allowedTokens, prepaidAmount, payableToken, needAmount, onConfirm, }) => {
|
|
16
|
+
return new Promise((resolve, reject) => {
|
|
17
|
+
present((close) => (_jsx(Payment //
|
|
18
|
+
, { title: title, intents: intents, connector: connector, needAmount: needAmount, prepaidAmount: prepaidAmount, allowedTokens: allowedTokens, payableToken: payableToken, close: () => (close(), resolve()), onReject: () => (close(), reject(new Error("User rejected"))), onConfirm: onConfirm })));
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
export const openLogoutPopup = (connector) => {
|
|
22
|
+
return new Promise((resolve, reject) => {
|
|
23
|
+
present((close) => {
|
|
24
|
+
return (_jsx(LogoutPopup //
|
|
25
|
+
, { connector: connector, onApprove: () => (close(), resolve()), onReject: () => (close(), reject(new Error("User rejected"))) }));
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
export const openBridge = (hot, setup) => {
|
|
30
|
+
return new Promise((resolve, reject) => {
|
|
31
|
+
present((close) => (_jsx(Bridge //
|
|
32
|
+
, { hot: hot, setup: setup, onProcess: resolve, onClose: () => (close(), reject(new Error("User rejected"))) })));
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
export const openConnector = (hot) => {
|
|
36
|
+
return new Promise((resolve) => {
|
|
37
|
+
present((close) => _jsx(Connector, { hot: hot, onClose: () => (resolve(), close()) }));
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
export const openConnectPrimaryWallet = (hot) => {
|
|
41
|
+
return new Promise((resolve) => {
|
|
42
|
+
present((close) => _jsx(ConnectPrimaryWallet, { hot: hot, onClose: () => (close(), resolve()) }));
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
export const openProfile = (hot) => {
|
|
46
|
+
present((close) => _jsx(Profile, { hot: hot, onClose: close }));
|
|
47
|
+
};
|
|
48
|
+
export const openSelectTokenPopup = ({ hot, initialChain, onSelect }) => {
|
|
49
|
+
present((close) => _jsx(SelectTokenPopup, { hot: hot, initialChain: initialChain, onClose: close, onSelect: (t, w) => (onSelect(t, w), close()) }));
|
|
50
|
+
};
|
|
51
|
+
export const openWalletPicker = (connector, onSelect) => {
|
|
52
|
+
present((close) => _jsx(WalletPicker, { initialConnector: connector, onSelect: onSelect, onClose: close }));
|
|
53
|
+
};
|
|
54
|
+
export const openSelectSender = (props) => {
|
|
55
|
+
present((close) => _jsx(SelectSender, { ...props, onClose: close }));
|
|
56
|
+
};
|
|
57
|
+
export const openSelectRecipient = (props) => {
|
|
58
|
+
present((close) => _jsx(SelectRecipient, { ...props, onClose: close }));
|
|
59
|
+
};
|
|
60
|
+
export const openWCRequest = (args) => {
|
|
61
|
+
const taskPromise = args.task();
|
|
62
|
+
present((close) => _jsx(WCRequest, { deeplink: args.deeplink, name: args.name, icon: args.icon, onClose: close, task: taskPromise }));
|
|
63
|
+
return taskPromise;
|
|
64
|
+
};
|
|
65
|
+
export const openToast = (message) => {
|
|
66
|
+
return present(() => _jsx(Toast, { message: message }));
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=router.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"router.js","sourceRoot":"","sources":["../../src/ui/router.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,OAAO,oBAAoB,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC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A6G,EAAE,EAAE;IACnJ,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAC,eAAe,OAAK,KAAK,EAAE,OAAO,EAAE,KAAK,GAAI,CAAC,CAAC;AACrE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAK,IAA6F,EAAc,EAAE;IAC7I,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IAChC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAC,SAAS,IAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,GAAI,CAAC,CAAC;IAChI,OAAO,WAAW,CAAC;AACrB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,OAAe,EAAE,EAAE;IAC3C,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,KAAC,KAAK,IAAC,OAAO,EAAE,OAAO,GAAI,CAAC,CAAC;AACpD,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const ModalContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
2
|
+
export declare const ModalOverlay: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
+
export declare const ModalContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
4
|
+
$mobileFullscreen?: boolean;
|
|
5
|
+
}>> & string;
|
|
6
|
+
export declare const ModalHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
7
|
+
export declare const ModalBody: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
8
|
+
export declare const Footer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
9
|
+
export declare const GetWalletLink: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>> & string;
|
|
10
|
+
export declare const PopupOption: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
11
|
+
export declare const PopupOptionInfo: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
12
|
+
export declare const PopupButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
13
|
+
export declare const PopupRoot: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import styled, { css } from "styled-components";
|
|
2
|
+
const font = `Golos Text, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"`;
|
|
3
|
+
export const ModalContainer = styled.div `
|
|
4
|
+
position: fixed;
|
|
5
|
+
top: 0;
|
|
6
|
+
left: 0;
|
|
7
|
+
width: 100%;
|
|
8
|
+
height: 100%;
|
|
9
|
+
z-index: 100000000;
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
align-items: center;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
transition: opacity 0.2s ease-in-out;
|
|
15
|
+
pointer-events: all;
|
|
16
|
+
|
|
17
|
+
@media (max-width: 600px) {
|
|
18
|
+
justify-content: flex-end;
|
|
19
|
+
}
|
|
20
|
+
`;
|
|
21
|
+
export const ModalOverlay = styled.div `
|
|
22
|
+
position: absolute;
|
|
23
|
+
top: 0;
|
|
24
|
+
left: 0;
|
|
25
|
+
width: 100%;
|
|
26
|
+
height: 100%;
|
|
27
|
+
z-index: 100000000;
|
|
28
|
+
background-color: rgba(0, 0, 0, 0.2);
|
|
29
|
+
backdrop-filter: blur(10px);
|
|
30
|
+
z-index: 1;
|
|
31
|
+
`;
|
|
32
|
+
export const ModalContent = styled.div `
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
align-items: center;
|
|
36
|
+
max-width: 420px;
|
|
37
|
+
max-height: 660px;
|
|
38
|
+
width: 100%;
|
|
39
|
+
border-radius: 24px;
|
|
40
|
+
background: #0d0d0d;
|
|
41
|
+
border: 1.5px solid rgba(255, 255, 255, 0.1);
|
|
42
|
+
transition: transform 0.2s ease-in-out;
|
|
43
|
+
z-index: 2;
|
|
44
|
+
|
|
45
|
+
@media (max-width: 600px) {
|
|
46
|
+
max-width: 100%;
|
|
47
|
+
width: 100%;
|
|
48
|
+
max-height: 90%;
|
|
49
|
+
border-bottom-left-radius: 0;
|
|
50
|
+
border-bottom-right-radius: 0;
|
|
51
|
+
border: none;
|
|
52
|
+
border-top: 1.5px solid rgba(255, 255, 255, 0.1);
|
|
53
|
+
|
|
54
|
+
${(props) => props.$mobileFullscreen &&
|
|
55
|
+
css `
|
|
56
|
+
border-bottom-left-radius: 0;
|
|
57
|
+
border-bottom-right-radius: 0;
|
|
58
|
+
height: 100%;
|
|
59
|
+
border-radius: 0;
|
|
60
|
+
max-height: 100%;
|
|
61
|
+
border: none;
|
|
62
|
+
`}
|
|
63
|
+
}
|
|
64
|
+
`;
|
|
65
|
+
export const ModalHeader = styled.div `
|
|
66
|
+
display: flex;
|
|
67
|
+
padding: 16px;
|
|
68
|
+
gap: 16px;
|
|
69
|
+
align-self: stretch;
|
|
70
|
+
align-items: center;
|
|
71
|
+
justify-content: center;
|
|
72
|
+
position: relative;
|
|
73
|
+
|
|
74
|
+
button {
|
|
75
|
+
position: absolute;
|
|
76
|
+
right: 16px;
|
|
77
|
+
top: 16px;
|
|
78
|
+
width: 32px;
|
|
79
|
+
height: 32px;
|
|
80
|
+
border-radius: 12px;
|
|
81
|
+
cursor: pointer;
|
|
82
|
+
transition: background 0.2s ease-in-out;
|
|
83
|
+
border: none;
|
|
84
|
+
background: none;
|
|
85
|
+
display: flex;
|
|
86
|
+
align-items: center;
|
|
87
|
+
justify-content: center;
|
|
88
|
+
|
|
89
|
+
&:hover {
|
|
90
|
+
background: rgba(255, 255, 255, 0.04);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
p {
|
|
95
|
+
color: #fff;
|
|
96
|
+
text-align: center;
|
|
97
|
+
font-size: 24px;
|
|
98
|
+
font-style: normal;
|
|
99
|
+
font-weight: 600;
|
|
100
|
+
line-height: normal;
|
|
101
|
+
margin: 0;
|
|
102
|
+
}
|
|
103
|
+
`;
|
|
104
|
+
export const ModalBody = styled.div `
|
|
105
|
+
display: flex;
|
|
106
|
+
padding: 16px;
|
|
107
|
+
flex-direction: column;
|
|
108
|
+
align-items: flex-start;
|
|
109
|
+
text-align: center;
|
|
110
|
+
gap: 4px;
|
|
111
|
+
overflow: auto;
|
|
112
|
+
border-radius: 24px;
|
|
113
|
+
background: rgba(255, 255, 255, 0.08);
|
|
114
|
+
width: 100%;
|
|
115
|
+
flex: 1;
|
|
116
|
+
|
|
117
|
+
textarea {
|
|
118
|
+
width: 100%;
|
|
119
|
+
padding: 12px;
|
|
120
|
+
border-radius: 12px;
|
|
121
|
+
background: #0d0d0d;
|
|
122
|
+
color: #fff;
|
|
123
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
124
|
+
outline: none;
|
|
125
|
+
font-size: 12px;
|
|
126
|
+
transition: background 0.2s ease-in-out;
|
|
127
|
+
font-family: monospace;
|
|
128
|
+
}
|
|
129
|
+
`;
|
|
130
|
+
export const Footer = styled.div `
|
|
131
|
+
width: 100%;
|
|
132
|
+
display: flex;
|
|
133
|
+
align-items: center;
|
|
134
|
+
justify-content: flex-start;
|
|
135
|
+
padding: 16px 24px;
|
|
136
|
+
color: #fff;
|
|
137
|
+
gap: 12px;
|
|
138
|
+
|
|
139
|
+
img {
|
|
140
|
+
width: 24px;
|
|
141
|
+
height: 24px;
|
|
142
|
+
border-radius: 50%;
|
|
143
|
+
object-fit: cover;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
* {
|
|
147
|
+
white-space: nowrap;
|
|
148
|
+
overflow: hidden;
|
|
149
|
+
text-overflow: ellipsis;
|
|
150
|
+
}
|
|
151
|
+
`;
|
|
152
|
+
export const GetWalletLink = styled.a `
|
|
153
|
+
color: #fff;
|
|
154
|
+
text-align: center;
|
|
155
|
+
font-size: 16px;
|
|
156
|
+
font-style: normal;
|
|
157
|
+
font-weight: 500;
|
|
158
|
+
margin-left: auto;
|
|
159
|
+
text-decoration: none;
|
|
160
|
+
transition: opacity 0.2s ease-in-out;
|
|
161
|
+
opacity: 0.8;
|
|
162
|
+
|
|
163
|
+
&:hover {
|
|
164
|
+
opacity: 1;
|
|
165
|
+
}
|
|
166
|
+
`;
|
|
167
|
+
export const PopupOption = styled.button `
|
|
168
|
+
display: flex;
|
|
169
|
+
padding: 8px;
|
|
170
|
+
align-items: center;
|
|
171
|
+
align-self: stretch;
|
|
172
|
+
cursor: pointer;
|
|
173
|
+
transition: background 0.2s ease-in-out;
|
|
174
|
+
border-radius: 24px;
|
|
175
|
+
outline: none;
|
|
176
|
+
border: none;
|
|
177
|
+
background: transparent;
|
|
178
|
+
width: 100%;
|
|
179
|
+
gap: 12px;
|
|
180
|
+
|
|
181
|
+
img {
|
|
182
|
+
width: 44px;
|
|
183
|
+
height: 44px;
|
|
184
|
+
border-radius: 16px;
|
|
185
|
+
object-fit: cover;
|
|
186
|
+
flex-shrink: 0;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
&:hover {
|
|
190
|
+
background: rgba(255, 255, 255, 0.04);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
p {
|
|
194
|
+
color: rgba(255, 255, 255, 0.9);
|
|
195
|
+
text-align: center;
|
|
196
|
+
font-size: 18px;
|
|
197
|
+
font-style: normal;
|
|
198
|
+
font-weight: 600;
|
|
199
|
+
line-height: normal;
|
|
200
|
+
letter-spacing: -0.36px;
|
|
201
|
+
margin: 0;
|
|
202
|
+
}
|
|
203
|
+
`;
|
|
204
|
+
export const PopupOptionInfo = styled.div `
|
|
205
|
+
display: flex;
|
|
206
|
+
flex-direction: column;
|
|
207
|
+
align-items: flex-start;
|
|
208
|
+
text-align: left;
|
|
209
|
+
flex: 1;
|
|
210
|
+
margin-top: -2px;
|
|
211
|
+
|
|
212
|
+
.wallet-address {
|
|
213
|
+
color: rgba(255, 255, 255, 0.5);
|
|
214
|
+
font-size: 14px;
|
|
215
|
+
font-style: normal;
|
|
216
|
+
font-weight: 400;
|
|
217
|
+
line-height: normal;
|
|
218
|
+
}
|
|
219
|
+
`;
|
|
220
|
+
export const PopupButton = styled.button `
|
|
221
|
+
width: 100%;
|
|
222
|
+
padding: 12px;
|
|
223
|
+
border-radius: 24px;
|
|
224
|
+
background: rgb(221, 221, 221);
|
|
225
|
+
color: rgb(20, 20, 20) !important;
|
|
226
|
+
font-weight: bold;
|
|
227
|
+
border: none;
|
|
228
|
+
cursor: pointer;
|
|
229
|
+
font-size: 16px;
|
|
230
|
+
transition: background 0.2s ease-in-out;
|
|
231
|
+
margin-top: 16px;
|
|
232
|
+
height: 56px;
|
|
233
|
+
|
|
234
|
+
&:hover {
|
|
235
|
+
background: rgb(160, 160, 160);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
&:disabled {
|
|
239
|
+
opacity: 0.5;
|
|
240
|
+
cursor: not-allowed;
|
|
241
|
+
}
|
|
242
|
+
`;
|
|
243
|
+
export const PopupRoot = styled.div `
|
|
244
|
+
@import url("https://fonts.googleapis.com/css2?family=Golos+Text:wght@400..900&display=swap");
|
|
245
|
+
height: 100%;
|
|
246
|
+
width: 100%;
|
|
247
|
+
|
|
248
|
+
h1,
|
|
249
|
+
h2,
|
|
250
|
+
h3,
|
|
251
|
+
h4,
|
|
252
|
+
h5,
|
|
253
|
+
h6,
|
|
254
|
+
p {
|
|
255
|
+
font-family: ${font};
|
|
256
|
+
margin: 0;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/* Hide scrollbar for all scrollable elements inside PopupRoot */
|
|
260
|
+
&::-webkit-scrollbar {
|
|
261
|
+
display: none;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
scrollbar-width: none; /* Firefox */
|
|
265
|
+
-ms-overflow-style: none; /* Internet Explorer 10+ */
|
|
266
|
+
|
|
267
|
+
/* Also hide scrollbars for all inner elements */
|
|
268
|
+
* {
|
|
269
|
+
-webkit-tap-highlight-color: transparent;
|
|
270
|
+
font-family: ${font};
|
|
271
|
+
scrollbar-width: none;
|
|
272
|
+
-ms-overflow-style: none;
|
|
273
|
+
box-sizing: border-box;
|
|
274
|
+
color: #fff;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
*::-webkit-scrollbar {
|
|
278
|
+
display: none;
|
|
279
|
+
}
|
|
280
|
+
`;
|
|
281
|
+
//# sourceM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W,GAAG,MAAM,CAAC,MAAM,CAAA;;;;;;;;;;;;;;;;;;;;;;CAsBvC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;mBAYhB,IAAI;;;;;;;;;;;;;;;mBAeJ,IAAI;;;;;;;;;;CAUtB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface Step {
|
|
3
|
+
label: string;
|
|
4
|
+
completed?: boolean;
|
|
5
|
+
active?: boolean;
|
|
6
|
+
}
|
|
7
|
+
interface StepperProps {
|
|
8
|
+
steps: Step[];
|
|
9
|
+
currentStep: number;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
export declare const HorizontalStepper: React.FC<StepperProps>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export const HorizontalStepper = ({ steps, currentStep, style }) => {
|
|
4
|
+
return (_jsx("div", { style: { padding: "0 32px 32px", display: "flex", alignItems: "center", width: "100%", margin: "16px 0", ...style }, children: steps.map((step, idx) => {
|
|
5
|
+
const isCompleted = idx < currentStep;
|
|
6
|
+
const isActive = idx === currentStep;
|
|
7
|
+
return (_jsxs(React.Fragment, { children: [_jsx("div", { style: { display: "flex", flexDirection: "column", alignItems: "center" }, children: _jsx("div", { style: {
|
|
8
|
+
width: 16,
|
|
9
|
+
height: 16,
|
|
10
|
+
position: "relative",
|
|
11
|
+
borderRadius: "50%",
|
|
12
|
+
border: isActive || isCompleted ? "2px solid #ffffff" : "2px solid #a0a0a0",
|
|
13
|
+
background: isCompleted ? "#ffffff" : "#333",
|
|
14
|
+
display: "flex",
|
|
15
|
+
alignItems: "center",
|
|
16
|
+
justifyContent: "center",
|
|
17
|
+
transition: "all 0.2s",
|
|
18
|
+
zIndex: 1,
|
|
19
|
+
}, children: _jsx("p", { style: { fontSize: 16, color: "#fff", opacity: isActive ? 1 : 0.5, position: "absolute", top: 24, width: 100 }, children: step.label }) }) }), idx < steps.length - 1 && _jsx("div", { style: { transition: "background 0.2s", flex: 1, height: 2, background: idx < currentStep ? "#ffffff" : "#333", margin: "0 6px", borderRadius: 24, minWidth: 24 } })] }, idx));
|
|
20
|
+
}) }));
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=Stepper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stepper.js","sourceRoot":"","sources":["../../../src/ui/uikit/Stepper.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAc1B,MAAM,CAAC,MAAM,iBAAiB,GAA2B,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE,EAAE;IACzF,OAAO,CACL,cAAK,KAAK,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,YACrH,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;YACvB,MAAM,WAAW,GAAG,GAAG,GAAG,WAAW,CAAC;YACtC,MAAM,QAAQ,GAAG,GAAG,KAAK,WAAW,CAAC;YAErC,OAAO,CACL,MAAC,KAAK,CAAC,QAAQ,eACb,cAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,YAC5E,cACE,KAAK,EAAE;gCACL,KAAK,EAAE,EAAE;gCACT,MAAM,EAAE,EAAE;gCACV,QAAQ,EAAE,UAAU;gCACpB,YAAY,EAAE,KAAK;gCACnB,MAAM,EAAE,QAAQ,IAAI,WAAW,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB;gCAC3E,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM;gCAC5C,OAAO,EAAE,MAAM;gCACf,UAAU,EAAE,QAAQ;gCACpB,cAAc,EAAE,QAAQ;gCACxB,UAAU,EAAE,UAAU;gCACtB,MAAM,EAAE,CAAC;6BACV,YAED,YAAG,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,YAAG,IAAI,CAAC,KAAK,GAAK,GAC/H,GACF,EAEL,GAAG,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,cAAK,KAAK,EAAE,EAAE,UAAU,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,UAAU,EAAE,GAAG,GAAG,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,GAAI,KArBlL,GAAG,CAsBP,CAClB,CAAC;QACJ,CAAC,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { Loader } from "./loader";
|
|
4
|
+
const Toast = ({ message }) => {
|
|
5
|
+
return (_jsxs(ToastRoot, { children: [_jsx("div", { style: { width: 44, height: 44, display: "flex", alignItems: "center", justifyContent: "center", borderRadius: 12, background: "rgba(255, 255, 255, 0.07)" }, children: _jsx(Loader, {}) }), _jsxs("div", { children: [_jsx("p", { style: { color: "#ADA5A4" }, children: "Executing transaction" }), _jsx("p", { style: { marginTop: 2 }, children: message })] })] }));
|
|
6
|
+
};
|
|
7
|
+
export default Toast;
|
|
8
|
+
const ToastRoot = styled.div `
|
|
9
|
+
position: fixed;
|
|
10
|
+
bottom: 48px;
|
|
11
|
+
left: 12px;
|
|
12
|
+
right: 12px;
|
|
13
|
+
background: var(--surface-common-container--low, #262729);
|
|
14
|
+
border: 1px solid var(--border-lowest, rgba(255, 255, 255, 0.07));
|
|
15
|
+
border-radius: 8px;
|
|
16
|
+
padding: 12px;
|
|
17
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: space-between;
|
|
21
|
+
z-index: 1000000000;
|
|
22
|
+
width: fit-content;
|
|
23
|
+
padding-right: 24px;
|
|
24
|
+
gap: 12px;
|
|
25
|
+
|
|
26
|
+
p {
|
|
27
|
+
color: var(--text-primary, #fff);
|
|
28
|
+
font-size: 16px;
|
|
29
|
+
font-weight: 500;
|
|
30
|
+
margin: 0;
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
33
|
+
//# sourceMappingURL=Toast.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toast.js","sourceRoot":"","sources":["../../../src/ui/uikit/Toast.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,KAAK,GAAG,CAAC,EAAE,OAAO,EAAuB,EAAE,EAAE;IACjD,OAAO,CACL,MAAC,SAAS,eACR,cAAK,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,EAAE,UAAU,EAAE,2BAA2B,EAAE,YAC/J,KAAC,MAAM,KAAG,GACN,EAEN,0BACE,YAAG,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,sCAA2B,EACzD,YAAG,KAAK,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,YAAG,OAAO,GAAK,IACrC,IACI,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,KAAK,CAAC;AAErB,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;CAwB3B,CAAC"}
|