tek-wallet 0.0.752 → 0.0.754
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/components/TekWallet/components/index.d.ts +7 -0
- package/dist/components/TekWallet/components/index.js +7 -0
- package/dist/components/TekWallet/components/layouts/ChildPageLayout/index.js +14 -3
- package/dist/components/TekWallet/components/ui/BackHeader/index.js +5 -1
- package/dist/components/TekWallet/components/ui/BottomActionLayout/index.d.ts +3 -3
- package/dist/components/TekWallet/components/ui/BottomActionLayout/index.js +24 -6
- package/dist/components/TekWallet/components/ui/Button/index.js +2 -2
- package/dist/components/TekWallet/components/ui/ConfirmByPasscode/index.js +2 -6
- package/dist/components/TekWallet/components/ui/ConfirmSendExternal/index.d.ts +6 -2
- package/dist/components/TekWallet/components/ui/ConfirmSendExternal/index.js +92 -12
- package/dist/components/TekWallet/components/ui/ConfirmSendInternal/index.d.ts +4 -2
- package/dist/components/TekWallet/components/ui/ConfirmSendInternal/index.js +12 -4
- package/dist/components/TekWallet/components/ui/ConfirmSwapToken/Result.d.ts +8 -0
- package/dist/components/TekWallet/components/ui/ConfirmSwapToken/Result.js +112 -0
- package/dist/components/TekWallet/components/ui/ConfirmSwapToken/index.d.ts +18 -0
- package/dist/components/TekWallet/components/ui/ConfirmSwapToken/index.js +169 -0
- package/dist/components/TekWallet/components/ui/CopyableText/index.js +1 -1
- package/dist/components/TekWallet/components/ui/DetailSwap/index.js +1 -1
- package/dist/components/TekWallet/components/ui/Fees/index.d.ts +1 -1
- package/dist/components/TekWallet/components/ui/Fees/index.js +51 -41
- package/dist/components/TekWallet/components/ui/FeesAutoDebounce/index.d.ts +10 -0
- package/dist/components/TekWallet/components/ui/FeesAutoDebounce/index.js +223 -0
- package/dist/components/TekWallet/components/ui/FiatDeposit/components/shareAction.js +2 -2
- package/dist/components/TekWallet/components/ui/FiatDeposit/components/shareImage.js +13 -13
- package/dist/components/TekWallet/components/ui/FiatDeposit/index.js +6 -4
- package/dist/components/TekWallet/components/ui/Formatter/index.d.ts +1 -0
- package/dist/components/TekWallet/components/ui/Formatter/index.js +4 -2
- package/dist/components/TekWallet/components/ui/FunctionItem/index.js +5 -4
- package/dist/components/TekWallet/components/ui/Icon/index.d.ts +4 -2
- package/dist/components/TekWallet/components/ui/Icon/index.js +44 -3
- package/dist/components/TekWallet/components/ui/Input/index.js +3 -3
- package/dist/components/TekWallet/components/ui/ListItemCustom/index.d.ts +2 -1
- package/dist/components/TekWallet/components/ui/ListItemCustom/index.js +3 -3
- package/dist/components/TekWallet/components/ui/QRCode/index.js +1 -1
- package/dist/components/TekWallet/components/ui/SendExternalToken/index.js +1 -1
- package/dist/components/TekWallet/components/ui/SendExternalTokenWithdrawn/index.d.ts +2 -5
- package/dist/components/TekWallet/components/ui/SvgPath/index.d.ts +12 -0
- package/dist/components/TekWallet/components/ui/SvgPath/index.js +27 -15
- package/dist/components/TekWallet/components/ui/SwapFunction/index.js +4 -4
- package/dist/components/TekWallet/components/ui/SwapToken/index.d.ts +2 -3
- package/dist/components/TekWallet/components/ui/TokensBoard/index.js +1 -3
- package/dist/components/TekWallet/components/ui/ValidateWalletAddress/index.d.ts +5 -0
- package/dist/components/TekWallet/components/ui/ValidateWalletAddress/index.js +67 -0
- package/dist/components/TekWallet/components/ui/WaitingData/index.d.ts +1 -0
- package/dist/components/TekWallet/components/ui/WaitingData/index.js +10 -6
- package/dist/components/TekWallet/components/ui/WithdrawFunction/index.d.ts +1 -1
- package/dist/components/TekWallet/components/ui/WithdrawFunction/index.js +70 -32
- package/dist/components/TekWallet/components/views/AssetView/Menu.d.ts +7 -0
- package/dist/components/TekWallet/components/views/AssetView/Menu.js +25 -0
- package/dist/components/TekWallet/components/views/AssetView/index.js +25 -26
- package/dist/components/TekWallet/components/views/NotFoundView/index.d.ts +2 -0
- package/dist/components/TekWallet/components/views/NotFoundView/index.js +7 -0
- package/dist/components/TekWallet/components/views/SendExternalView/components/Form.d.ts +11 -0
- package/dist/components/TekWallet/components/views/SendExternalView/components/Form.js +450 -0
- package/dist/components/TekWallet/components/views/SendExternalView/components/Result.d.ts +14 -0
- package/dist/components/TekWallet/components/views/SendExternalView/components/Result.js +140 -0
- package/dist/components/TekWallet/components/views/SendExternalView/components/SelectNetwork.d.ts +10 -0
- package/dist/components/TekWallet/components/views/SendExternalView/components/SelectNetwork.js +34 -0
- package/dist/components/TekWallet/components/views/SendExternalView/components/SelectToken.d.ts +8 -0
- package/dist/components/TekWallet/components/views/SendExternalView/components/SelectToken.js +173 -0
- package/dist/components/TekWallet/components/views/SendExternalView/components/Summary.d.ts +12 -0
- package/dist/components/TekWallet/components/views/SendExternalView/components/Summary.js +131 -0
- package/dist/components/TekWallet/components/views/SendExternalView/index.d.ts +23 -0
- package/dist/components/TekWallet/components/views/SendExternalView/index.js +143 -0
- package/dist/components/TekWallet/components/views/SendInternalView/components/AmountForm.d.ts +11 -0
- package/dist/components/TekWallet/components/views/SendInternalView/components/AmountForm.js +380 -0
- package/dist/components/TekWallet/components/views/SendInternalView/components/Form.d.ts +11 -0
- package/dist/components/TekWallet/components/views/SendInternalView/components/Form.js +381 -0
- package/dist/components/TekWallet/components/views/SendInternalView/components/Result.d.ts +13 -0
- package/dist/components/TekWallet/components/views/SendInternalView/components/Result.js +128 -0
- package/dist/components/TekWallet/components/views/SendInternalView/components/SelectToken.d.ts +8 -0
- package/dist/components/TekWallet/components/views/SendInternalView/components/SelectToken.js +173 -0
- package/dist/components/TekWallet/components/views/SendInternalView/components/Summary.d.ts +11 -0
- package/dist/components/TekWallet/components/views/SendInternalView/components/Summary.js +126 -0
- package/dist/components/TekWallet/components/views/SendInternalView/index.d.ts +24 -0
- package/dist/components/TekWallet/components/views/SendInternalView/index.js +155 -0
- package/dist/components/TekWallet/components/views/SwapView/components/CardTo/index.d.ts +11 -0
- package/dist/components/TekWallet/components/views/SwapView/components/CardTo/index.js +111 -0
- package/dist/components/TekWallet/components/views/SwapView/components/FromCard/index.d.ts +14 -0
- package/dist/components/TekWallet/components/views/SwapView/components/FromCard/index.js +180 -0
- package/dist/components/TekWallet/components/views/SwapView/components/SelectToken.d.ts +9 -0
- package/dist/components/TekWallet/components/views/SwapView/components/SelectToken.js +173 -0
- package/dist/components/TekWallet/components/views/SwapView/components/Summary.d.ts +14 -0
- package/dist/components/TekWallet/components/views/SwapView/components/Summary.js +239 -0
- package/dist/components/TekWallet/components/views/SwapView/functions/convertTokensRate.d.ts +3 -0
- package/dist/components/TekWallet/components/views/SwapView/functions/convertTokensRate.js +14 -0
- package/dist/components/TekWallet/components/views/SwapView/index.d.ts +11 -0
- package/dist/components/TekWallet/components/views/SwapView/index.js +218 -0
- package/dist/components/TekWallet/components/views/TekWalletView/expose.d.ts +2 -0
- package/dist/components/TekWallet/components/views/TekWalletView/expose.js +18 -0
- package/dist/components/TekWallet/components/views/TekWalletView/index.d.ts +3 -0
- package/dist/components/TekWallet/components/views/TekWalletView/index.js +16 -0
- package/dist/components/TekWallet/components/views/TekWalletView/routes.d.ts +9 -0
- package/dist/components/TekWallet/components/views/TekWalletView/routes.js +74 -0
- package/dist/components/TekWallet/hooks/useValidateAmount.d.ts +26 -0
- package/dist/components/TekWallet/hooks/useValidateAmount.js +103 -0
- package/dist/components/TekWallet/providers/EventHandlerProvider/index.js +5 -0
- package/dist/components/TekWallet/providers/RealtimeProvider/index.js +2 -2
- package/dist/components/TekWallet/providers/TekWalletProvider/index.d.ts +3 -0
- package/dist/components/TekWallet/providers/TekWalletProvider/index.js +8 -2
- package/dist/components/TekWallet/providers/WithdrawProvider/index.js +36 -0
- package/dist/components/TekWallet/services/axios/get-est-fee-service/type.d.ts +5 -4
- package/dist/components/TekWallet/services/axios/send-external-service/type.d.ts +5 -30
- package/dist/components/TekWallet/services/axios/swap-service/type.d.ts +4 -0
- package/dist/components/TekWallet/services/axios/transfer-internal-service/type.d.ts +4 -32
- package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/components.js +3 -3
- package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/palette.js +3 -3
- package/dist/components/TekWallet/theme/mui/theme.js +9 -9
- package/dist/components/TekWallet/utils/stop.d.ts +3 -0
- package/dist/components/TekWallet/utils/stop.js +6 -0
- package/package.json +2 -2
- package/dist/components/TekWallet/components/ui/CardFrom/index.d.ts +0 -10
- package/dist/components/TekWallet/components/ui/CardFrom/index.js +0 -91
- package/dist/components/TekWallet/components/ui/CardTo/index.d.ts +0 -10
- package/dist/components/TekWallet/components/ui/CardTo/index.js +0 -39
- package/dist/components/TekWallet/components/ui/ConfirmLayout copy/index.d.ts +0 -7
- package/dist/components/TekWallet/components/ui/ConfirmLayout copy/index.js +0 -67
- package/dist/components/TekWallet/components/views/HelpView/index.d.ts +0 -2
- package/dist/components/TekWallet/components/views/HelpView/index.js +0 -7
|
@@ -5,6 +5,7 @@ export interface GetEstimateFeeServiceQuery {
|
|
|
5
5
|
transaction_type: TransactionSlug;
|
|
6
6
|
currency: string;
|
|
7
7
|
to_currency_slug?: string;
|
|
8
|
+
network_slug?: string;
|
|
8
9
|
}
|
|
9
10
|
export interface GetEstimateFeeServiceResponse {
|
|
10
11
|
success: boolean;
|
|
@@ -18,10 +19,10 @@ export interface FeesDataType {
|
|
|
18
19
|
original_amount_in_usd: number;
|
|
19
20
|
original_amount_in_currency: number;
|
|
20
21
|
original_currency: string;
|
|
21
|
-
fee_detail:
|
|
22
|
+
fee_detail: FeeDetailType[];
|
|
22
23
|
}
|
|
23
|
-
export interface
|
|
24
|
-
fee_type:
|
|
24
|
+
export interface FeeDetailType {
|
|
25
|
+
fee_type: FeeType;
|
|
25
26
|
fee_in_usd: number;
|
|
26
27
|
fee_in_currency: number;
|
|
27
28
|
fee_percent: number;
|
|
@@ -29,7 +30,7 @@ export interface fee_detailType {
|
|
|
29
30
|
fee_fixed: number;
|
|
30
31
|
isEnoughBalanceToPay?: boolean;
|
|
31
32
|
}
|
|
32
|
-
export interface
|
|
33
|
+
export interface FeeType {
|
|
33
34
|
name: string;
|
|
34
35
|
slug: string;
|
|
35
36
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { CurrencyData, NetworkData } from "../expose";
|
|
2
|
+
import { FeesDataType } from "../get-est-fee-service/type";
|
|
1
3
|
export interface SendExternalBody {
|
|
2
4
|
amount: string;
|
|
3
5
|
currency_slug: string;
|
|
@@ -46,36 +48,9 @@ interface DataSendExternal {
|
|
|
46
48
|
description: null;
|
|
47
49
|
currency_usd_rate: null;
|
|
48
50
|
from_app_slug: string;
|
|
49
|
-
fee_info:
|
|
51
|
+
fee_info: FeesDataType;
|
|
50
52
|
order_id: null;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
fee_detail: Feedetail[];
|
|
54
|
-
fee_in_currency: number;
|
|
55
|
-
fee_in_usd: number;
|
|
56
|
-
original_amount_in_currency: number;
|
|
57
|
-
original_amount_in_usd: number;
|
|
58
|
-
original_currency: string;
|
|
59
|
-
}
|
|
60
|
-
interface Feedetail {
|
|
61
|
-
currency: Currency;
|
|
62
|
-
fee_fixed: number;
|
|
63
|
-
fee_in_currency: number;
|
|
64
|
-
fee_in_usd: number;
|
|
65
|
-
fee_percent: number;
|
|
66
|
-
fee_type: Feetype;
|
|
67
|
-
}
|
|
68
|
-
interface Feetype {
|
|
69
|
-
name: string;
|
|
70
|
-
slug: string;
|
|
71
|
-
}
|
|
72
|
-
interface Currency {
|
|
73
|
-
full_name: string;
|
|
74
|
-
icon: string;
|
|
75
|
-
id: number;
|
|
76
|
-
link: string;
|
|
77
|
-
name: string;
|
|
78
|
-
slug: string;
|
|
79
|
-
usd_rate: number;
|
|
53
|
+
currency_data: CurrencyData;
|
|
54
|
+
network_data: NetworkData;
|
|
80
55
|
}
|
|
81
56
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FeesDataType } from "../get-est-fee-service/type";
|
|
2
|
+
import { Output, SupportedToken } from "../get-swap-tokens-list-service/type";
|
|
2
3
|
export interface SwapBody {
|
|
3
4
|
amount: string;
|
|
4
5
|
currency_slug: string;
|
|
@@ -17,6 +18,7 @@ export interface SwapBody {
|
|
|
17
18
|
];
|
|
18
19
|
}
|
|
19
20
|
] | null;
|
|
21
|
+
await_completion?: boolean;
|
|
20
22
|
}
|
|
21
23
|
export interface SwapResponse {
|
|
22
24
|
success: boolean;
|
|
@@ -45,4 +47,6 @@ export interface SwapDataTransaction {
|
|
|
45
47
|
feeInfo: FeesDataType;
|
|
46
48
|
fee_info: FeesDataType;
|
|
47
49
|
to_currency_slug: string;
|
|
50
|
+
currency_data: SupportedToken;
|
|
51
|
+
to_currency_data: Output;
|
|
48
52
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FeesDataType } from "../get-est-fee-service/type";
|
|
1
2
|
export interface TransferInternalBody {
|
|
2
3
|
amount: number;
|
|
3
4
|
to_address: string;
|
|
@@ -9,6 +10,7 @@ export interface TransferInternalBody {
|
|
|
9
10
|
order_id?: string;
|
|
10
11
|
payment_via_fiat?: boolean;
|
|
11
12
|
email?: string;
|
|
13
|
+
message?: string;
|
|
12
14
|
}
|
|
13
15
|
export interface ExtraTransaction {
|
|
14
16
|
metadata?: string;
|
|
@@ -43,7 +45,7 @@ export interface TransferInternalData {
|
|
|
43
45
|
description: any;
|
|
44
46
|
currency_usd_rate: string;
|
|
45
47
|
from_app_slug: string;
|
|
46
|
-
fee_info:
|
|
48
|
+
fee_info: FeesDataType;
|
|
47
49
|
order_id: any;
|
|
48
50
|
parent_transaction_id: any;
|
|
49
51
|
child_transactions: any[];
|
|
@@ -53,6 +55,7 @@ export interface TransferInternalData {
|
|
|
53
55
|
currency_data: CurrencyData;
|
|
54
56
|
childrens: any[];
|
|
55
57
|
payment_via_fiat: PaymentViaFiat;
|
|
58
|
+
message: string;
|
|
56
59
|
}
|
|
57
60
|
export interface TransactionType {
|
|
58
61
|
id: number;
|
|
@@ -62,36 +65,6 @@ export interface TransactionType {
|
|
|
62
65
|
description: any;
|
|
63
66
|
icon: any;
|
|
64
67
|
}
|
|
65
|
-
export interface FeeInfo {
|
|
66
|
-
fee_detail: FeeDetail[];
|
|
67
|
-
fee_in_currency: number;
|
|
68
|
-
fee_in_usd: number;
|
|
69
|
-
original_amount_in_currency: number;
|
|
70
|
-
original_amount_in_usd: number;
|
|
71
|
-
original_currency: string;
|
|
72
|
-
}
|
|
73
|
-
export interface FeeDetail {
|
|
74
|
-
currency: Currency;
|
|
75
|
-
fee_fixed: number;
|
|
76
|
-
fee_in_currency: number;
|
|
77
|
-
fee_in_usd: number;
|
|
78
|
-
fee_percent: number;
|
|
79
|
-
fee_type: FeeType;
|
|
80
|
-
}
|
|
81
|
-
interface Currency {
|
|
82
|
-
decimals: number;
|
|
83
|
-
full_name: string;
|
|
84
|
-
icon: string;
|
|
85
|
-
id: number;
|
|
86
|
-
link: string;
|
|
87
|
-
name: string;
|
|
88
|
-
slug: string;
|
|
89
|
-
usd_rate: number;
|
|
90
|
-
}
|
|
91
|
-
export interface FeeType {
|
|
92
|
-
name: string;
|
|
93
|
-
slug: string;
|
|
94
|
-
}
|
|
95
68
|
export interface CurrencyData {
|
|
96
69
|
name: string;
|
|
97
70
|
id: number;
|
|
@@ -154,4 +127,3 @@ export interface PaymentLink {
|
|
|
154
127
|
export interface Self {
|
|
155
128
|
href: string;
|
|
156
129
|
}
|
|
157
|
-
export {};
|
|
@@ -75,14 +75,14 @@ exports.components = {
|
|
|
75
75
|
props: { loading: true, color: "primary" },
|
|
76
76
|
style: function () { return ({
|
|
77
77
|
background: "linear-gradient(0deg, rgba(30, 72, 65, 0.20) 0%, rgba(30, 72, 65, 0.20) 100%), #FFF !important",
|
|
78
|
-
color: "#
|
|
78
|
+
color: "#1C461D80 !important",
|
|
79
79
|
}); },
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
props: { loading: true, color: "secondary" },
|
|
83
83
|
style: function () { return ({
|
|
84
84
|
background: "linear-gradient(0deg, rgba(197, 233, 159, 0.20) 0%, rgba(197, 233, 159, 0.20) 100%), #FFF !important",
|
|
85
|
-
color: "#
|
|
85
|
+
color: "#1C461D80 !important",
|
|
86
86
|
}); },
|
|
87
87
|
},
|
|
88
88
|
{
|
|
@@ -110,7 +110,7 @@ exports.components = {
|
|
|
110
110
|
style: function () { return ({
|
|
111
111
|
color: "transparent !important",
|
|
112
112
|
"& .MuiCircularProgress-circle": {
|
|
113
|
-
stroke: "#
|
|
113
|
+
stroke: "#1C461D80",
|
|
114
114
|
},
|
|
115
115
|
}); },
|
|
116
116
|
},
|
|
@@ -4,12 +4,12 @@ exports.palette = void 0;
|
|
|
4
4
|
require("@mui/material/styles");
|
|
5
5
|
exports.palette = {
|
|
6
6
|
primary: {
|
|
7
|
-
main: "#
|
|
7
|
+
main: "#1C461D",
|
|
8
8
|
contrastText: "#BBF49C",
|
|
9
9
|
},
|
|
10
10
|
secondary: {
|
|
11
11
|
main: "#BBF49C",
|
|
12
|
-
contrastText: "#
|
|
12
|
+
contrastText: "#1C461D",
|
|
13
13
|
},
|
|
14
14
|
tertiary: {
|
|
15
15
|
main: "#ECF4E9",
|
|
@@ -19,7 +19,7 @@ exports.palette = {
|
|
|
19
19
|
},
|
|
20
20
|
negative: {
|
|
21
21
|
main: "#FFFFFF",
|
|
22
|
-
contrastText: "#
|
|
22
|
+
contrastText: "#1C461D",
|
|
23
23
|
},
|
|
24
24
|
accent: {
|
|
25
25
|
main: "#A3A3A3",
|
|
@@ -37,8 +37,8 @@ var background = {
|
|
|
37
37
|
black64: "rgba(0, 0, 0, 0.64)",
|
|
38
38
|
black24: "rgba(0, 0, 0, 0.24)",
|
|
39
39
|
black16: "rgba(0, 0, 0, 0.16)",
|
|
40
|
-
primary: "#
|
|
41
|
-
primary16: "#
|
|
40
|
+
primary: "#1C461D",
|
|
41
|
+
primary16: "#1C461D29",
|
|
42
42
|
secondary: "#C5E99F",
|
|
43
43
|
secondary16: "#C5E99F29",
|
|
44
44
|
error: "#FF434E",
|
|
@@ -50,7 +50,7 @@ var background = {
|
|
|
50
50
|
errorStatus: "#FF434E",
|
|
51
51
|
};
|
|
52
52
|
var border = {
|
|
53
|
-
primary: "#
|
|
53
|
+
primary: "#1C461D",
|
|
54
54
|
white: "#ffffff",
|
|
55
55
|
white64: "rgba(255, 255, 255, 0.64)",
|
|
56
56
|
white24: "rgba(255, 255, 255, 0.24)",
|
|
@@ -59,7 +59,7 @@ var border = {
|
|
|
59
59
|
black64: "rgba(0, 0, 0, 0.64)",
|
|
60
60
|
black24: "rgba(0, 0, 0, 0.24)",
|
|
61
61
|
black16: "rgba(0, 0, 0, 0.16)",
|
|
62
|
-
secondary: "#
|
|
62
|
+
secondary: "#C5E99F",
|
|
63
63
|
secondary16: "rgba(1, 255, 255, 0.16)",
|
|
64
64
|
accent: "#A3A3A3",
|
|
65
65
|
accent3: "#E5E6E6",
|
|
@@ -79,14 +79,14 @@ var text = {
|
|
|
79
79
|
black64: "rgba(0, 0, 0, 0.64)",
|
|
80
80
|
black24: "rgba(0, 0, 0, 0.24)",
|
|
81
81
|
blackContrast: "#121212",
|
|
82
|
-
primary: "#
|
|
82
|
+
primary: "#1C461D",
|
|
83
83
|
secondary: "#C5E99F",
|
|
84
84
|
accent: "#A3A3A3",
|
|
85
85
|
accent2: "#6B7271",
|
|
86
|
-
successStatus: "#
|
|
86
|
+
successStatus: "#1EA031",
|
|
87
87
|
errorStatus: "#FF434E",
|
|
88
88
|
loadingStatus: "#000000",
|
|
89
|
-
increase: "#
|
|
89
|
+
increase: "#1EA031",
|
|
90
90
|
decrease: "#FE6565",
|
|
91
91
|
warningStatus: "#FFA500",
|
|
92
92
|
alertStatus: "#1EA031",
|
|
@@ -185,7 +185,7 @@ var zIndex = {
|
|
|
185
185
|
var theme = {
|
|
186
186
|
palette: {
|
|
187
187
|
primary: {
|
|
188
|
-
main: "#
|
|
188
|
+
main: "#1C461D",
|
|
189
189
|
contrastText: "#000000",
|
|
190
190
|
},
|
|
191
191
|
secondary: {
|
|
@@ -308,7 +308,7 @@ var theme = {
|
|
|
308
308
|
},
|
|
309
309
|
value: {
|
|
310
310
|
color: text.black,
|
|
311
|
-
fontWeight: typography.
|
|
311
|
+
fontWeight: typography.fontWeight700,
|
|
312
312
|
fontSize: typography.fontSize14,
|
|
313
313
|
lineHeight: typography.leading140,
|
|
314
314
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tek-wallet",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.754",
|
|
4
4
|
"description": "A custom React provider with TypeScript support",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"ton-crypto": "^3.2.0",
|
|
64
64
|
"usehooks-ts": "^3.1.1",
|
|
65
65
|
"uuid": "^11.1.0",
|
|
66
|
-
"xhub-keyboard": "^0.0.
|
|
66
|
+
"xhub-keyboard": "^0.0.23"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { SupportedToken } from "../../../services/axios/get-swap-tokens-list-service/type";
|
|
3
|
-
interface Props {
|
|
4
|
-
className?: string;
|
|
5
|
-
selectedToken?: SupportedToken;
|
|
6
|
-
number?: number;
|
|
7
|
-
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
8
|
-
}
|
|
9
|
-
declare const CardForm: ({ selectedToken, onChange, number }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export default CardForm;
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
var material_1 = require("@mui/material");
|
|
8
|
-
var react_1 = require("react");
|
|
9
|
-
var Icon_1 = __importDefault(require("../Icon"));
|
|
10
|
-
var getIcon_1 = __importDefault(require("../../../utils/getIcon"));
|
|
11
|
-
var providers_1 = require("../../../providers");
|
|
12
|
-
var useWallet_1 = __importDefault(require("../../../hooks/useWallet"));
|
|
13
|
-
var useBoolean_1 = require("../../../hooks/useBoolean");
|
|
14
|
-
var Button_1 = __importDefault(require("../Button"));
|
|
15
|
-
var Text_1 = __importDefault(require("../Text"));
|
|
16
|
-
var getStandardNumber_1 = __importDefault(require("../../../utils/getStandardNumber"));
|
|
17
|
-
var SvgPath_1 = require("../SvgPath");
|
|
18
|
-
var CardForm = function (_a) {
|
|
19
|
-
var _b, _c, _d, _e, _f, _g;
|
|
20
|
-
var selectedToken = _a.selectedToken, onChange = _a.onChange, number = _a.number;
|
|
21
|
-
var selectTokenForm = (0, useBoolean_1.useBoolean)("selectTokenForm");
|
|
22
|
-
var _h = (0, useWallet_1.default)(), updateSwapTokens = _h.updateSwapTokens, fromTokens = _h.fromTokens;
|
|
23
|
-
var theme = (0, providers_1.useTheme)();
|
|
24
|
-
(0, react_1.useEffect)(function () {
|
|
25
|
-
if (!fromTokens) {
|
|
26
|
-
updateSwapTokens();
|
|
27
|
-
}
|
|
28
|
-
}, [fromTokens, updateSwapTokens]);
|
|
29
|
-
var displayToken = (0, react_1.useMemo)(function () {
|
|
30
|
-
return selectedToken;
|
|
31
|
-
}, [selectedToken]);
|
|
32
|
-
var handleClickGetMaxValue = function () {
|
|
33
|
-
if ((displayToken === null || displayToken === void 0 ? void 0 : displayToken.max_value) && onChange) {
|
|
34
|
-
var balance = Number(displayToken.balance);
|
|
35
|
-
var maxValue = Number(displayToken.max_value);
|
|
36
|
-
var minValue = Math.min(balance, maxValue);
|
|
37
|
-
onChange({
|
|
38
|
-
target: { value: minValue.toString() },
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { className: "p-4 rounded-16 backdrop-blur-[12px]", sx: {
|
|
43
|
-
border: "1px solid",
|
|
44
|
-
borderColor: "".concat((number && number < ((_b = displayToken === null || displayToken === void 0 ? void 0 : displayToken.min_value) !== null && _b !== void 0 ? _b : 0)) || (number && number > ((_c = displayToken === null || displayToken === void 0 ? void 0 : displayToken.max_value) !== null && _c !== void 0 ? _c : 0)) || (number && number > ((_d = Number(displayToken === null || displayToken === void 0 ? void 0 : displayToken.balance)) !== null && _d !== void 0 ? _d : 0)) ? "red" : "".concat(theme.palette.primary.main)),
|
|
45
|
-
}, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex justify-between", children: [(0, jsx_runtime_1.jsx)(Text_1.default, { component: "p", sx: {
|
|
46
|
-
color: theme.palette.text.blackContrast,
|
|
47
|
-
fontWeight: theme.typography.fontWeight600,
|
|
48
|
-
}, children: "From" }), (0, jsx_runtime_1.jsxs)(Text_1.default, { component: "p", sx: {
|
|
49
|
-
color: theme.palette.text.accent,
|
|
50
|
-
fontSize: theme.typography.fontSize12,
|
|
51
|
-
fontWeight: theme.typography.fontWeight400,
|
|
52
|
-
}, children: ["Balance:", " ", (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: {
|
|
53
|
-
color: theme.palette.text.blackContrast,
|
|
54
|
-
fontWeight: theme.typography.fontWeight500,
|
|
55
|
-
fontSize: theme.typography.fontSize12,
|
|
56
|
-
}, children: [(0, getStandardNumber_1.default)(Number(displayToken === null || displayToken === void 0 ? void 0 : displayToken.balance)), " ", displayToken === null || displayToken === void 0 ? void 0 : displayToken.full_name] })] })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex justify-between mt-5 mb-4", children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex items-center gap-1 cursor-pointer", onClick: function () { return selectTokenForm.setTrue(); }, children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: displayToken === null || displayToken === void 0 ? void 0 : displayToken.link, width: 20, height: 20, className: "rounded-full" }), (0, jsx_runtime_1.jsx)(Text_1.default, { component: "p", sx: {
|
|
57
|
-
color: theme.palette.text.blackContrast,
|
|
58
|
-
fontWeight: theme.typography.fontWeight600,
|
|
59
|
-
}, children: (displayToken === null || displayToken === void 0 ? void 0 : displayToken.name) || (displayToken === null || displayToken === void 0 ? void 0 : displayToken.full_name) }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 10, height: 10 }, children: SvgPath_1.IC_ARROW_BLACK_DROP })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { className: "w-full flex justify-end items-end", children: (0, jsx_runtime_1.jsx)(material_1.InputBase, { type: "number", value: number === undefined || number === null ? "" : (0, getStandardNumber_1.default)(number), onChange: onChange, classes: {
|
|
60
|
-
input: "text-end text-contrast max-w-fit bg-transparent border-none outline-none text-16 leading-140 font-bold placeholder:text-accent-1",
|
|
61
|
-
}, sx: {
|
|
62
|
-
"input::placeholder": {
|
|
63
|
-
fontSize: "13px",
|
|
64
|
-
},
|
|
65
|
-
}, placeholder: "Min ".concat(displayToken === null || displayToken === void 0 ? void 0 : displayToken.min_value, " - Max ").concat(displayToken === null || displayToken === void 0 ? void 0 : displayToken.max_value, " ").concat(displayToken === null || displayToken === void 0 ? void 0 : displayToken.full_name) }) })] }), (number && number > ((_e = displayToken === null || displayToken === void 0 ? void 0 : displayToken.max_value) !== null && _e !== void 0 ? _e : 0)) ||
|
|
66
|
-
(number && number < ((_f = displayToken === null || displayToken === void 0 ? void 0 : displayToken.min_value) !== null && _f !== void 0 ? _f : 0)) ||
|
|
67
|
-
(number && number > ((_g = Number(displayToken === null || displayToken === void 0 ? void 0 : displayToken.balance)) !== null && _g !== void 0 ? _g : 0)) ? ((0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex items-center gap-1", children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("alert"), width: 14, height: 14 }), (0, jsx_runtime_1.jsx)(Text_1.default, { className: "text-red-500 font-normal text-12", children: "Insufficient balance" })] }), (0, jsx_runtime_1.jsx)(Button_1.default, { sx: {
|
|
68
|
-
textTransform: "capitalize",
|
|
69
|
-
backgroundColor: theme.palette.background.tertiary,
|
|
70
|
-
borderRadius: theme.mixins.customRadius.r8,
|
|
71
|
-
color: theme.palette.text.primary,
|
|
72
|
-
height: theme.typography.fontSize24,
|
|
73
|
-
padding: theme.mixins.customPadding.p12,
|
|
74
|
-
}, onClick: handleClickGetMaxValue, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
75
|
-
color: theme.palette.primary.main,
|
|
76
|
-
fontWeight: theme.typography.fontWeight600,
|
|
77
|
-
fontSize: theme.typography.fontSize12,
|
|
78
|
-
}, children: "Max" }) })] })) : ((0, jsx_runtime_1.jsx)(material_1.Box, { className: "flex justify-end", children: (0, jsx_runtime_1.jsx)(Button_1.default, { sx: {
|
|
79
|
-
textTransform: "capitalize",
|
|
80
|
-
backgroundColor: theme.palette.background.tertiary,
|
|
81
|
-
borderRadius: theme.mixins.customRadius.r8,
|
|
82
|
-
color: theme.palette.text.primary,
|
|
83
|
-
height: theme.typography.fontSize24,
|
|
84
|
-
padding: theme.mixins.customPadding.p12,
|
|
85
|
-
}, onClick: handleClickGetMaxValue, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
86
|
-
color: theme.palette.primary.main,
|
|
87
|
-
fontWeight: theme.typography.fontWeight600,
|
|
88
|
-
fontSize: theme.typography.fontSize12,
|
|
89
|
-
}, children: "Max" }) }) }))] }));
|
|
90
|
-
};
|
|
91
|
-
exports.default = CardForm;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Output, SupportedToken } from "../../../services/axios/get-swap-tokens-list-service/type";
|
|
2
|
-
interface Props {
|
|
3
|
-
className?: string;
|
|
4
|
-
token?: SupportedToken;
|
|
5
|
-
selectedOutputToken?: Output;
|
|
6
|
-
value?: number;
|
|
7
|
-
onClick?: () => void;
|
|
8
|
-
}
|
|
9
|
-
declare const CardTo: ({ selectedOutputToken, token, value }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export default CardTo;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
var material_1 = require("@mui/material");
|
|
8
|
-
var Icon_1 = __importDefault(require("../Icon"));
|
|
9
|
-
var providers_1 = require("../../../providers");
|
|
10
|
-
var useBoolean_1 = require("../../../hooks/useBoolean");
|
|
11
|
-
var Text_1 = __importDefault(require("../Text"));
|
|
12
|
-
var roundToTwoSignificantDecimals_1 = __importDefault(require("../../../utils/roundToTwoSignificantDecimals"));
|
|
13
|
-
var SvgPath_1 = require("../SvgPath");
|
|
14
|
-
var CardTo = function (_a) {
|
|
15
|
-
var selectedOutputToken = _a.selectedOutputToken, token = _a.token, value = _a.value;
|
|
16
|
-
var selectTokenTo = (0, useBoolean_1.useBoolean)("selectTokenTo");
|
|
17
|
-
var cardFromUSDRate = Number(token === null || token === void 0 ? void 0 : token.usd_rate);
|
|
18
|
-
var cardToUSDRate = Number(selectedOutputToken === null || selectedOutputToken === void 0 ? void 0 : selectedOutputToken.usd_rate);
|
|
19
|
-
var totalAmount = (cardFromUSDRate * (value !== undefined ? value : 0)) / cardToUSDRate;
|
|
20
|
-
var theme = (0, providers_1.useTheme)();
|
|
21
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
22
|
-
padding: theme.mixins.customPadding.p12,
|
|
23
|
-
backgroundColor: theme.palette.background.tertiary,
|
|
24
|
-
borderRadius: theme.mixins.customRadius.r12,
|
|
25
|
-
}, children: [(0, jsx_runtime_1.jsx)(material_1.Box, { className: "flex justify-between", children: (0, jsx_runtime_1.jsx)(Text_1.default, { component: "p", sx: {
|
|
26
|
-
color: theme.palette.text.blackContrast,
|
|
27
|
-
fontWeight: theme.typography.fontWeight600,
|
|
28
|
-
}, children: "To" }) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex justify-between mt-5 mb-4", children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex items-center gap-1 cursor-pointer", onClick: function () { return selectTokenTo.setTrue(); }, children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: selectedOutputToken === null || selectedOutputToken === void 0 ? void 0 : selectedOutputToken.link, width: 20, height: 20, className: "rounded-full" }), (0, jsx_runtime_1.jsx)(Text_1.default, { component: "p", sx: {
|
|
29
|
-
color: theme.palette.text.blackContrast,
|
|
30
|
-
fontWeight: theme.typography.fontWeight600,
|
|
31
|
-
}, children: (selectedOutputToken === null || selectedOutputToken === void 0 ? void 0 : selectedOutputToken.name) || (selectedOutputToken === null || selectedOutputToken === void 0 ? void 0 : selectedOutputToken.full_name) }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 10, height: 10 }, children: SvgPath_1.IC_ARROW_BLACK_DROP })] }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
32
|
-
color: theme.palette.text.blackContrast,
|
|
33
|
-
fontWeight: theme.typography.fontWeight600,
|
|
34
|
-
fontSize: theme.typography.fontSize16,
|
|
35
|
-
}, children: (0, roundToTwoSignificantDecimals_1.default)(totalAmount) || ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
36
|
-
color: theme.palette.text.accent,
|
|
37
|
-
}, children: "--" })) })] })] }));
|
|
38
|
-
};
|
|
39
|
-
exports.default = CardTo;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { DrawerComponentProps, DrawerComponentRef } from "../DrawerComponent";
|
|
2
|
-
import { TransactionSlug } from "../../../services/axios/get-activities-service/type";
|
|
3
|
-
export interface ConfirmLayoutProps extends DrawerComponentProps {
|
|
4
|
-
action: TransactionSlug;
|
|
5
|
-
}
|
|
6
|
-
declare const ConfirmLayout: import("react").ForwardRefExoticComponent<Omit<ConfirmLayoutProps, "ref"> & import("react").RefAttributes<DrawerComponentRef>>;
|
|
7
|
-
export default ConfirmLayout;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use client";
|
|
3
|
-
var __assign = (this && this.__assign) || function () {
|
|
4
|
-
__assign = Object.assign || function(t) {
|
|
5
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
-
s = arguments[i];
|
|
7
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
8
|
-
t[p] = s[p];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
return __assign.apply(this, arguments);
|
|
13
|
-
};
|
|
14
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
15
|
-
var t = {};
|
|
16
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
17
|
-
t[p] = s[p];
|
|
18
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
19
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
20
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
21
|
-
t[p[i]] = s[p[i]];
|
|
22
|
-
}
|
|
23
|
-
return t;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
30
|
-
var Text_1 = __importDefault(require("../Text"));
|
|
31
|
-
var material_1 = require("@mui/material");
|
|
32
|
-
var ThemeProvider_1 = require("../../../providers/ThemeProvider");
|
|
33
|
-
var Icon_1 = __importDefault(require("../Icon"));
|
|
34
|
-
var getIcon_1 = __importDefault(require("../../../utils/getIcon"));
|
|
35
|
-
var ModalLayout_1 = __importDefault(require("../ModalLayout"));
|
|
36
|
-
var DrawerComponent_1 = __importDefault(require("../DrawerComponent"));
|
|
37
|
-
var react_1 = require("react");
|
|
38
|
-
var ConfirmLayout = (0, react_1.forwardRef)(function (props, ref) {
|
|
39
|
-
var children = props.children, rest = __rest(props, ["children"]);
|
|
40
|
-
var theme = (0, ThemeProvider_1.useTheme)();
|
|
41
|
-
var confirmByPasscodeDrawerRef = (0, react_1.useRef)(null);
|
|
42
|
-
var handleOnClose = function () {
|
|
43
|
-
var _a;
|
|
44
|
-
(_a = confirmByPasscodeDrawerRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
45
|
-
};
|
|
46
|
-
(0, react_1.useImperativeHandle)(ref, function () { return ({
|
|
47
|
-
open: function () {
|
|
48
|
-
var _a;
|
|
49
|
-
(_a = confirmByPasscodeDrawerRef.current) === null || _a === void 0 ? void 0 : _a.open();
|
|
50
|
-
},
|
|
51
|
-
close: function () {
|
|
52
|
-
var _a;
|
|
53
|
-
(_a = confirmByPasscodeDrawerRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
54
|
-
},
|
|
55
|
-
lockStatus: function () {
|
|
56
|
-
var _a;
|
|
57
|
-
(_a = confirmByPasscodeDrawerRef.current) === null || _a === void 0 ? void 0 : _a.lockStatus();
|
|
58
|
-
},
|
|
59
|
-
unlockStatus: function () {
|
|
60
|
-
var _a;
|
|
61
|
-
(_a = confirmByPasscodeDrawerRef.current) === null || _a === void 0 ? void 0 : _a.unlockStatus();
|
|
62
|
-
},
|
|
63
|
-
}); });
|
|
64
|
-
return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, __assign({ ref: confirmByPasscodeDrawerRef }, rest, { children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { onClose: handleOnClose, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { alignItems: "center", gap: theme.mixins.gaps.g16 }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { alignItems: "center", gap: theme.mixins.gaps.g12 }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { width: 64, sx: {}, src: (0, getIcon_1.default)("wallet_logo") }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.sessionDescription), children: "Confirm action" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.sessionTitle), { textTransform: "capitalize" }), children: props.action })] }), children] }) }) })));
|
|
65
|
-
});
|
|
66
|
-
ConfirmLayout.displayName = "ConfirmLayout";
|
|
67
|
-
exports.default = ConfirmLayout;
|