@ape.swap/bonds-sdk 1.0.126 → 1.0.128
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.
|
@@ -67,7 +67,7 @@ var BondSingle = function (_a) {
|
|
|
67
67
|
};
|
|
68
68
|
return (_jsxs(ThemeUIProvider, __assign({ theme: defaultTheme }, { children: [_jsxs("div", { children: ["Bond Single Page", _jsx("p", { children: billAddress })] }), isActive && account && (_jsx("p", { children: account })), _jsx(Flex, __assign({ className: "container page-container" }, { children: bondData.map(function (bond) {
|
|
69
69
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
70
|
-
return (_jsxs(_Fragment, { children: [_jsxs(Flex, __assign({ className: "container blocks-container" }, { children: [_jsxs(Flex, __assign({ className: "block-container discount ".concat(getDiscountColor(bond === null || bond === void 0 ? void 0 : bond.discount)) }, { children: [_jsxs(Flex, __assign({ className: "block-container header" }, { children: ["Discount", _jsx(Flex, __assign({ className: "block-container icon" }, { children: _jsx(Svg, { icon: "questionFill", width: "15px" }) }))] })), "".concat((_a = bond === null || bond === void 0 ? void 0 : bond.discount) === null || _a === void 0 ? void 0 : _a.toFixed(2), "%")] })), _jsxs(Flex, __assign({ className: "block-container arr" }, { children: [_jsxs(Flex, __assign({ className: "block-container header" }, { children: ["ARR", _jsx(Flex, __assign({ className: "block-container icon" }, { children: _jsx(Svg, { icon: "questionFill", width: "15px" }) }))] })), "".concat(((((_b = bond === null || bond === void 0 ? void 0 : bond.discount) !== null && _b !== void 0 ? _b : 0) * 365) / vestingTime((_c = bond === null || bond === void 0 ? void 0 : bond.vestingTerm) !== null && _c !== void 0 ? _c : 0).days).toFixed(2), "%")] })), _jsxs(Flex, __assign({ className: "block-container term" }, { children: [_jsxs(Flex, __assign({ className: "block-container header" }, { children: ["Terms", _jsx(Flex, __assign({ className: "block-container icon" }, { children: _jsx(Svg, { icon: "questionFill", width: "15px" }) }))] })), vestingTime((_d = bond === null || bond === void 0 ? void 0 : bond.vestingTerm) !== null && _d !== void 0 ? _d : 0).days ? "".concat(vestingTime((_e = bond === null || bond === void 0 ? void 0 : bond.vestingTerm) !== null && _e !== void 0 ? _e : 0).days, " D") : '-'] })), _jsxs(Flex, __assign({ className: "block-container maxbuy" }, { children: [_jsxs(Flex, __assign({ className: "block-container header" }, { children: ["Max Buy", _jsx(Flex, __assign({ className: "block-container icon" }, { children: _jsx(Svg, { icon: "questionFill", width: "15px" }) }))] })), (_f = parseFloat(maxBuy(bond).toFixed(0))) === null || _f === void 0 ? void 0 : _f.toLocaleString('en-US')] }))] })), _jsxs(Flex, __assign({ className: "container bondinfo-container" }, { children: [_jsxs(Flex, __assign({ className: "bondinfo-container title-container" }, { children: [_jsx(Flex, __assign({ className: "title-container bond" }, { children: bond === null || bond === void 0 ? void 0 : bond.showcaseTokenName })), _jsxs(Flex, __assign({ className: "title-container price-container" }, { children: [_jsxs(Flex, __assign({ className: "price-container price" }, { children: ["$", earnTokenPrice(bond)] })), _jsxs(Flex, __assign({ className: "price-container discounted" }, { children: ["$", discountEarnTokenPrice(bond)] }))] }))] })), _jsx(Flex, __assign({ className: "bondinfo-container description-container" }, { children: bond === null || bond === void 0 ? void 0 : bond.shortDescription })), _jsxs(Flex, __assign({ className: "bondinfo-container text-container" }, { children: [_jsxs(Flex, __assign({ className: "text-container row" }, { children: [_jsx("div", { children: "You spend:" }), _jsxs("div", { children: ["0 ", bond === null || bond === void 0 ? void 0 : bond.principalTokenName, " = $ 0"] })] })), _jsxs(Flex, __assign({ className: "text-container row" }, { children: [_jsxs("div", { children: ["Premium: ", _jsx(Svg, { icon: "questionFill", width: "15px" })] }), _jsx("div", { children: "$ 0" })] })), _jsxs(Flex, __assign({ className: "text-container row" }, { children: [_jsxs("div", { children: ["You get (over ", vestingTime((_g = bond === null || bond === void 0 ? void 0 : bond.vestingTerm) !== null && _g !== void 0 ? _g : 0).days, " days):"] }), _jsxs("div", { children: ["0 ", bond === null || bond === void 0 ? void 0 : bond.showcaseTokenName, " = $ 0"] })] }))] })), _jsxs(Flex, __assign({ className: "bondinfo-container input-container" }, { children: [_jsx(Flex, __assign({ className: "input-container input" }, { children: _jsx(Input, { type: "number", className: "number-input", placeholder: "0.0", value: inputValue, onChange: handleInputChange }) })), _jsx(Flex, __assign({ className: "input-container token" }, { children: bond === null || bond === void 0 ? void 0 : bond.principalTokenName }))] })), _jsxs(Flex, __assign({ className: "bondinfo-container button-container" }, { children: [_jsx(Flex, __assign({ className: "button-container get" }, { children: _jsxs(Button, { children: ["Get ", bond === null || bond === void 0 ? void 0 : bond.principalTokenName] }) })), _jsx(Flex, __assign({ className: "button-container buy" }, { children: _jsxs(Button, { children: ["Buy ", bond === null || bond === void 0 ? void 0 : bond.showcaseTokenName] }) }))] }))] }))] }));
|
|
70
|
+
return (_jsxs(_Fragment, { children: [_jsxs(Flex, __assign({ className: "container blocks-container" }, { children: [_jsxs(Flex, __assign({ className: "block-container discount ".concat(getDiscountColor(bond === null || bond === void 0 ? void 0 : bond.discount)) }, { children: [_jsxs(Flex, __assign({ className: "block-container header" }, { children: ["Discount", _jsx(Flex, __assign({ className: "block-container icon" }, { children: _jsx(Svg, { icon: "questionFill", width: "15px" }) }))] })), "".concat((_a = bond === null || bond === void 0 ? void 0 : bond.discount) === null || _a === void 0 ? void 0 : _a.toFixed(2), "%")] })), _jsxs(Flex, __assign({ className: "block-container arr" }, { children: [_jsxs(Flex, __assign({ className: "block-container header" }, { children: ["ARR", _jsx(Flex, __assign({ className: "block-container icon" }, { children: _jsx(Svg, { icon: "questionFill", width: "15px" }) }))] })), "".concat(((((_b = bond === null || bond === void 0 ? void 0 : bond.discount) !== null && _b !== void 0 ? _b : 0) * 365) / vestingTime((_c = bond === null || bond === void 0 ? void 0 : bond.vestingTerm) !== null && _c !== void 0 ? _c : 0).days).toFixed(2), "%")] })), _jsxs(Flex, __assign({ className: "block-container term" }, { children: [_jsxs(Flex, __assign({ className: "block-container header" }, { children: ["Terms", _jsx(Flex, __assign({ className: "block-container icon" }, { children: _jsx(Svg, { icon: "questionFill", width: "15px" }) }))] })), vestingTime((_d = bond === null || bond === void 0 ? void 0 : bond.vestingTerm) !== null && _d !== void 0 ? _d : 0).days ? "".concat(vestingTime((_e = bond === null || bond === void 0 ? void 0 : bond.vestingTerm) !== null && _e !== void 0 ? _e : 0).days, " D") : '-'] })), _jsxs(Flex, __assign({ className: "block-container maxbuy" }, { children: [_jsxs(Flex, __assign({ className: "block-container header" }, { children: ["Max Buy", _jsx(Flex, __assign({ className: "block-container icon" }, { children: _jsx(Svg, { icon: "questionFill", width: "15px" }) }))] })), (_f = parseFloat(maxBuy(bond).toFixed(0))) === null || _f === void 0 ? void 0 : _f.toLocaleString('en-US')] }))] })), _jsxs(Flex, __assign({ className: "container bondinfo-graph-container" }, { children: [_jsxs(Flex, __assign({ className: "container bondinfo-container" }, { children: [_jsxs(Flex, __assign({ className: "bondinfo-container title-container" }, { children: [_jsx(Flex, __assign({ className: "title-container bond" }, { children: bond === null || bond === void 0 ? void 0 : bond.showcaseTokenName })), _jsxs(Flex, __assign({ className: "title-container price-container" }, { children: [_jsxs(Flex, __assign({ className: "price-container price" }, { children: ["$", earnTokenPrice(bond)] })), _jsxs(Flex, __assign({ className: "price-container discounted" }, { children: ["$", discountEarnTokenPrice(bond)] }))] }))] })), _jsx(Flex, __assign({ className: "bondinfo-container description-container" }, { children: bond === null || bond === void 0 ? void 0 : bond.shortDescription })), _jsxs(Flex, __assign({ className: "bondinfo-container text-container" }, { children: [_jsxs(Flex, __assign({ className: "text-container row" }, { children: [_jsx("div", { children: "You spend:" }), _jsxs("div", { children: ["0 ", bond === null || bond === void 0 ? void 0 : bond.principalTokenName, " = $ 0"] })] })), _jsxs(Flex, __assign({ className: "text-container row" }, { children: [_jsxs("div", { children: ["Premium: ", _jsx(Svg, { icon: "questionFill", width: "15px" })] }), _jsx("div", { children: "$ 0" })] })), _jsxs(Flex, __assign({ className: "text-container row" }, { children: [_jsxs("div", { children: ["You get (over ", vestingTime((_g = bond === null || bond === void 0 ? void 0 : bond.vestingTerm) !== null && _g !== void 0 ? _g : 0).days, " days):"] }), _jsxs("div", { children: ["0 ", bond === null || bond === void 0 ? void 0 : bond.showcaseTokenName, " = $ 0"] })] }))] })), _jsxs(Flex, __assign({ className: "bondinfo-container input-container" }, { children: [_jsx(Flex, __assign({ className: "input-container input" }, { children: _jsx(Input, { type: "number", className: "number-input", placeholder: "0.0", value: inputValue, onChange: handleInputChange }) })), _jsx(Flex, __assign({ className: "input-container token" }, { children: bond === null || bond === void 0 ? void 0 : bond.principalTokenName }))] })), _jsxs(Flex, __assign({ className: "bondinfo-container button-container" }, { children: [_jsx(Flex, __assign({ className: "button-container get" }, { children: _jsxs(Button, { children: ["Get ", bond === null || bond === void 0 ? void 0 : bond.principalTokenName] }) })), _jsx(Flex, __assign({ className: "button-container buy" }, { children: _jsxs(Button, { children: ["Buy ", bond === null || bond === void 0 ? void 0 : bond.showcaseTokenName] }) }))] }))] })), _jsx(Flex, __assign({ className: "container graph-container" }, { children: _jsx("div", { children: "Graph" }) }))] }))] }));
|
|
71
71
|
}) }))] })));
|
|
72
72
|
};
|
|
73
73
|
export default BondSingle;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
width: 100%;
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
5
|
-
padding-left:
|
|
6
|
-
padding-right:
|
|
7
|
-
padding-bottom:
|
|
5
|
+
padding-left: 100px;
|
|
6
|
+
padding-right: 100px;
|
|
7
|
+
padding-bottom: 100px;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
.container.blocks-container {
|
|
@@ -18,33 +18,34 @@
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.block-container {
|
|
21
|
-
min-width: 0px;
|
|
22
21
|
display: flex;
|
|
23
22
|
flex-direction: column;
|
|
23
|
+
justify-content: center;
|
|
24
24
|
align-items: center;
|
|
25
25
|
background: var(--theme-ui-colors-white3);
|
|
26
26
|
font-weight: 900;
|
|
27
27
|
font-size: 16px;
|
|
28
28
|
border-radius: 10px;
|
|
29
29
|
height: 90%;
|
|
30
|
-
padding-top:
|
|
30
|
+
padding-top: 5px;
|
|
31
31
|
padding-bottom: 10px;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.block-
|
|
34
|
+
.block-container.header {
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: row;
|
|
35
37
|
color: white;
|
|
36
38
|
font-weight: bold;
|
|
37
39
|
font-size: 12px;
|
|
38
40
|
padding-bottom: 10px;
|
|
39
41
|
}
|
|
40
42
|
|
|
41
|
-
.block-
|
|
43
|
+
.block-container.icon {
|
|
42
44
|
padding-left: 5px;
|
|
43
45
|
align-items: start;
|
|
44
46
|
cursor: pointer;
|
|
45
47
|
}
|
|
46
48
|
|
|
47
|
-
|
|
48
49
|
.block-container.discount {
|
|
49
50
|
margin: 0px 10px 0px 0px;
|
|
50
51
|
width: 350px;
|
|
@@ -72,6 +73,26 @@
|
|
|
72
73
|
width: 350px;
|
|
73
74
|
}
|
|
74
75
|
|
|
76
|
+
.container.bondinfo-graph-container {
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-direction: row;
|
|
79
|
+
padding-top: 50px;
|
|
80
|
+
padding-bottom: 50px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.container.graph-container {
|
|
84
|
+
display: flex;
|
|
85
|
+
flex-direction: column;
|
|
86
|
+
align-items: center;
|
|
87
|
+
background: var(--theme-ui-colors-white3);
|
|
88
|
+
font-weight: 900;
|
|
89
|
+
font-size: 16px;
|
|
90
|
+
border-radius: 10px;
|
|
91
|
+
height: 100%;
|
|
92
|
+
padding: 10px;
|
|
93
|
+
min-width: 1500px;
|
|
94
|
+
}
|
|
95
|
+
|
|
75
96
|
.container.bondinfo-container {
|
|
76
97
|
display: flex;
|
|
77
98
|
flex-direction: column;
|
|
@@ -80,9 +101,8 @@
|
|
|
80
101
|
font-weight: 900;
|
|
81
102
|
font-size: 16px;
|
|
82
103
|
border-radius: 10px;
|
|
83
|
-
height:
|
|
84
|
-
padding
|
|
85
|
-
padding-bottom: 10px;
|
|
104
|
+
height: 100%;
|
|
105
|
+
padding: 10px;
|
|
86
106
|
}
|
|
87
107
|
|
|
88
108
|
.bondinfo-container.title-container {
|
|
@@ -99,19 +119,19 @@
|
|
|
99
119
|
display: flex;
|
|
100
120
|
}
|
|
101
121
|
|
|
102
|
-
.title-container.
|
|
122
|
+
.title-container.price-container {
|
|
103
123
|
display: flex;
|
|
104
124
|
flex-direction: column;
|
|
105
125
|
padding-left: 10px;
|
|
106
126
|
}
|
|
107
127
|
|
|
108
|
-
.
|
|
128
|
+
.price-container.price {
|
|
109
129
|
font-size: 14px;
|
|
110
130
|
color: var(--theme-ui-colors-gray);
|
|
111
131
|
text-decoration: line-through;
|
|
112
132
|
}
|
|
113
133
|
|
|
114
|
-
.
|
|
134
|
+
.price-container.discounted {
|
|
115
135
|
display: flex;
|
|
116
136
|
}
|
|
117
137
|
|