@ape.swap/bonds-sdk 1.0.125 → 1.0.126
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} +60 -46
- 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-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] }) }))] }))] }))] }));
|
|
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;
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
margin-top: 5px;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
.
|
|
20
|
+
.block-container {
|
|
21
21
|
min-width: 0px;
|
|
22
22
|
display: flex;
|
|
23
23
|
flex-direction: column;
|
|
@@ -31,44 +31,6 @@
|
|
|
31
31
|
padding-bottom: 10px;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.modal-container.title-container {
|
|
35
|
-
font-weight: bold;
|
|
36
|
-
font-size: 1.5rem;
|
|
37
|
-
display: flex;
|
|
38
|
-
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
34
|
.block-header.header {
|
|
73
35
|
color: white;
|
|
74
36
|
font-weight: bold;
|
|
@@ -82,7 +44,8 @@
|
|
|
82
44
|
cursor: pointer;
|
|
83
45
|
}
|
|
84
46
|
|
|
85
|
-
|
|
47
|
+
|
|
48
|
+
.block-container.discount {
|
|
86
49
|
margin: 0px 10px 0px 0px;
|
|
87
50
|
width: 350px;
|
|
88
51
|
}
|
|
@@ -95,21 +58,72 @@
|
|
|
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-container {
|
|
76
|
+
display: flex;
|
|
77
|
+
flex-direction: column;
|
|
78
|
+
align-items: center;
|
|
79
|
+
background: var(--theme-ui-colors-white3);
|
|
80
|
+
font-weight: 900;
|
|
81
|
+
font-size: 16px;
|
|
82
|
+
border-radius: 10px;
|
|
83
|
+
height: 90%;
|
|
84
|
+
padding-top: 10px;
|
|
85
|
+
padding-bottom: 10px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.bondinfo-container.title-container {
|
|
89
|
+
font-weight: bold;
|
|
90
|
+
font-size: 1.5rem;
|
|
91
|
+
display: flex;
|
|
92
|
+
flex-direction: row;
|
|
93
|
+
align-items: center;
|
|
94
|
+
padding-top: 5px;
|
|
95
|
+
padding-bottom: 5px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.title-container.bond {
|
|
99
|
+
display: flex;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.title-container.bond-price {
|
|
103
|
+
display: flex;
|
|
104
|
+
flex-direction: column;
|
|
105
|
+
padding-left: 10px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.bond-price.price {
|
|
109
|
+
font-size: 14px;
|
|
110
|
+
color: var(--theme-ui-colors-gray);
|
|
111
|
+
text-decoration: line-through;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.bond-price.discounted {
|
|
115
|
+
display: flex;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.bondinfo-container.description-container {
|
|
119
|
+
display: flex;
|
|
120
|
+
align-items: start;
|
|
121
|
+
padding-top: 10px;
|
|
122
|
+
padding-bottom: 10px;
|
|
123
|
+
font-weight: normal;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.bondinfo-container.text-container {
|
|
113
127
|
display: flex;
|
|
114
128
|
flex-direction: column;
|
|
115
129
|
justify-content: center;
|
|
@@ -132,7 +146,7 @@
|
|
|
132
146
|
color: #DF4141;
|
|
133
147
|
}
|
|
134
148
|
|
|
135
|
-
.
|
|
149
|
+
.bondinfo-container.input-container {
|
|
136
150
|
display: flex;
|
|
137
151
|
flex-direction: row;
|
|
138
152
|
background: var(--theme-ui-colors-white3);
|
|
@@ -167,7 +181,7 @@
|
|
|
167
181
|
cursor: unset;
|
|
168
182
|
}
|
|
169
183
|
|
|
170
|
-
.
|
|
184
|
+
.bondinfo-container.button-container {
|
|
171
185
|
width: 100%;
|
|
172
186
|
padding-top: 10px;
|
|
173
187
|
display: flex;
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|