@ape.swap/bonds-sdk 1.0.125 → 1.0.127
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/BondModal/BondModal.d.ts +1 -1
- package/dist/components/BondModal/BondModal.js +1 -1
- package/dist/components/BondSingle/BondSingle.d.ts +1 -1
- package/dist/components/BondSingle/BondSingle.js +3 -3
- package/dist/components/Bonds/Bonds.d.ts +1 -1
- package/dist/components/Bonds/Bonds.js +1 -1
- package/dist/scss/{bondsingle.scss → BondSingle.scss} +74 -50
- package/package.json +1 -1
- /package/dist/scss/{bondmodal.scss → BondModal.scss} +0 -0
- /package/dist/scss/{bonds.scss → Bonds.scss} +0 -0
|
@@ -15,7 +15,7 @@ import React, { useEffect, useState } from 'react';
|
|
|
15
15
|
import { Flex, ThemeUIProvider, Input } from 'theme-ui';
|
|
16
16
|
import { useWeb3React } from '@web3-react/core';
|
|
17
17
|
import { defaultTheme } from '../../theme';
|
|
18
|
-
import '../../scss/
|
|
18
|
+
import '../../scss/BondModal.scss';
|
|
19
19
|
import getTimePeriods from '../../utils/getTimePeriods';
|
|
20
20
|
import { Button } from '../uikit/Button';
|
|
21
21
|
import Svg from '../uikit/Svg';
|
|
@@ -15,7 +15,7 @@ import { useEffect, useState } from 'react';
|
|
|
15
15
|
import { Flex, ThemeUIProvider, Input } from 'theme-ui';
|
|
16
16
|
import { useWeb3React } from '@web3-react/core';
|
|
17
17
|
import { defaultTheme } from '../../theme';
|
|
18
|
-
import '../../scss/
|
|
18
|
+
import '../../scss/BondSingle.scss';
|
|
19
19
|
import getTimePeriods from '../../utils/getTimePeriods';
|
|
20
20
|
import { Button } from '../uikit/Button';
|
|
21
21
|
import Svg from '../uikit/Svg';
|
|
@@ -66,8 +66,8 @@ var BondSingle = function (_a) {
|
|
|
66
66
|
setInputValue(event.target.value);
|
|
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
|
-
var _a, _b, _c, _d, _e, _f;
|
|
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: "
|
|
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-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;
|
|
@@ -56,7 +56,7 @@ import { useSearchParams, useNavigate } from 'react-router-dom';
|
|
|
56
56
|
import getTimePeriods from '../../utils/getTimePeriods';
|
|
57
57
|
import { defaultTheme } from '../../theme';
|
|
58
58
|
import Svg from '../uikit/Svg';
|
|
59
|
-
import '../../scss/
|
|
59
|
+
import '../../scss/Bonds.scss';
|
|
60
60
|
var Bonds = function (_a) {
|
|
61
61
|
var connectionString = _a.connectionString;
|
|
62
62
|
var _b = useWeb3React(), account = _b.account, isActive = _b.isActive;
|
|
@@ -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 {
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
margin-top: 5px;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
.
|
|
21
|
-
min-width: 0px;
|
|
20
|
+
.block-container {
|
|
22
21
|
display: flex;
|
|
23
22
|
flex-direction: column;
|
|
24
23
|
align-items: center;
|
|
@@ -31,58 +30,22 @@
|
|
|
31
30
|
padding-bottom: 10px;
|
|
32
31
|
}
|
|
33
32
|
|
|
34
|
-
.
|
|
35
|
-
font-weight: bold;
|
|
36
|
-
font-size: 1.5rem;
|
|
33
|
+
.block-container.header {
|
|
37
34
|
display: flex;
|
|
38
35
|
flex-direction: row;
|
|
39
|
-
align-items: center;
|
|
40
|
-
padding-top: 5px;
|
|
41
|
-
padding-bottom: 5px;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.title-container.bond {
|
|
45
|
-
display: flex;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.title-container.bond-price {
|
|
49
|
-
display: flex;
|
|
50
|
-
flex-direction: column;
|
|
51
|
-
padding-left: 10px;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.bond-price.price {
|
|
55
|
-
font-size: 14px;
|
|
56
|
-
color: var(--theme-ui-colors-gray);
|
|
57
|
-
text-decoration: line-through;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.bond-price.discounted {
|
|
61
|
-
display: flex;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.modal-container.description-container {
|
|
65
|
-
display: flex;
|
|
66
|
-
align-items: start;
|
|
67
|
-
padding-top: 10px;
|
|
68
|
-
padding-bottom: 10px;
|
|
69
|
-
font-weight: normal;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.block-header.header {
|
|
73
36
|
color: white;
|
|
74
37
|
font-weight: bold;
|
|
75
38
|
font-size: 12px;
|
|
76
39
|
padding-bottom: 10px;
|
|
77
40
|
}
|
|
78
41
|
|
|
79
|
-
.block-
|
|
42
|
+
.block-container.icon {
|
|
80
43
|
padding-left: 5px;
|
|
81
44
|
align-items: start;
|
|
82
45
|
cursor: pointer;
|
|
83
46
|
}
|
|
84
47
|
|
|
85
|
-
.
|
|
48
|
+
.block-container.discount {
|
|
86
49
|
margin: 0px 10px 0px 0px;
|
|
87
50
|
width: 350px;
|
|
88
51
|
}
|
|
@@ -95,21 +58,82 @@
|
|
|
95
58
|
color: #DF4141;
|
|
96
59
|
}
|
|
97
60
|
|
|
98
|
-
.
|
|
61
|
+
.block-container.arr {
|
|
99
62
|
margin: 0px 10px 0px 0px;
|
|
100
63
|
width: 350px;
|
|
101
64
|
}
|
|
102
65
|
|
|
103
|
-
.
|
|
66
|
+
.block-container.term {
|
|
104
67
|
margin: 0px 10px 0px 0px;
|
|
105
68
|
width: 350px;
|
|
106
69
|
}
|
|
107
70
|
|
|
108
|
-
.
|
|
71
|
+
.block-container.maxbuy {
|
|
109
72
|
width: 350px;
|
|
110
73
|
}
|
|
111
74
|
|
|
112
|
-
.
|
|
75
|
+
.container.bondinfo-graph-container {
|
|
76
|
+
display: flex;
|
|
77
|
+
flex-direction: row;
|
|
78
|
+
padding: 50px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.container.graph-container {
|
|
82
|
+
display: flex;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.container.bondinfo-container {
|
|
86
|
+
display: flex;
|
|
87
|
+
flex-direction: column;
|
|
88
|
+
align-items: center;
|
|
89
|
+
background: var(--theme-ui-colors-white3);
|
|
90
|
+
font-weight: 900;
|
|
91
|
+
font-size: 16px;
|
|
92
|
+
border-radius: 10px;
|
|
93
|
+
height: 100%;
|
|
94
|
+
padding-top: 10px;
|
|
95
|
+
padding-bottom: 10px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.bondinfo-container.title-container {
|
|
99
|
+
font-weight: bold;
|
|
100
|
+
font-size: 1.5rem;
|
|
101
|
+
display: flex;
|
|
102
|
+
flex-direction: row;
|
|
103
|
+
align-items: center;
|
|
104
|
+
padding-top: 5px;
|
|
105
|
+
padding-bottom: 5px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.title-container.bond {
|
|
109
|
+
display: flex;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.title-container.price-container {
|
|
113
|
+
display: flex;
|
|
114
|
+
flex-direction: column;
|
|
115
|
+
padding-left: 10px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.price-container.price {
|
|
119
|
+
font-size: 14px;
|
|
120
|
+
color: var(--theme-ui-colors-gray);
|
|
121
|
+
text-decoration: line-through;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.price-container.discounted {
|
|
125
|
+
display: flex;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.bondinfo-container.description-container {
|
|
129
|
+
display: flex;
|
|
130
|
+
align-items: start;
|
|
131
|
+
padding-top: 10px;
|
|
132
|
+
padding-bottom: 10px;
|
|
133
|
+
font-weight: normal;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.bondinfo-container.text-container {
|
|
113
137
|
display: flex;
|
|
114
138
|
flex-direction: column;
|
|
115
139
|
justify-content: center;
|
|
@@ -132,7 +156,7 @@
|
|
|
132
156
|
color: #DF4141;
|
|
133
157
|
}
|
|
134
158
|
|
|
135
|
-
.
|
|
159
|
+
.bondinfo-container.input-container {
|
|
136
160
|
display: flex;
|
|
137
161
|
flex-direction: row;
|
|
138
162
|
background: var(--theme-ui-colors-white3);
|
|
@@ -167,7 +191,7 @@
|
|
|
167
191
|
cursor: unset;
|
|
168
192
|
}
|
|
169
193
|
|
|
170
|
-
.
|
|
194
|
+
.bondinfo-container.button-container {
|
|
171
195
|
width: 100%;
|
|
172
196
|
padding-top: 10px;
|
|
173
197
|
display: flex;
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|