@ape.swap/bonds-sdk 1.0.320 → 1.0.322
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.
|
@@ -56,8 +56,7 @@ import getTimePeriods from '../../utils/getTimePeriods';
|
|
|
56
56
|
import axios from 'axios';
|
|
57
57
|
import { BigNumber } from 'bignumber.js';
|
|
58
58
|
import { getFirstNonZeroDigits } from '../../utils/roundNumber';
|
|
59
|
-
import {
|
|
60
|
-
import { TooltipText } from '../../enum/tooltips';
|
|
59
|
+
import { Button, Svg, ListTag } from '../uikit-sdk';
|
|
61
60
|
import billAbi from '../../config/abi/bond.json';
|
|
62
61
|
import TokenImage from '../uikit-sdk/TokenImage';
|
|
63
62
|
import { getBalanceNumber } from '../../utils/getBalanceNumber';
|
|
@@ -233,11 +232,11 @@ var YourBondsModal = function (_a) {
|
|
|
233
232
|
return getFirstNonZeroDigits(parseFloat((_a = bond === null || bond === void 0 ? void 0 : bond.payoutTokenPrice) !== null && _a !== void 0 ? _a : '0'));
|
|
234
233
|
};
|
|
235
234
|
return (_jsx(ThemeUIProvider, __assign({ theme: defaultTheme }, { children: userOwnedBillsData.flat().map(function (data) {
|
|
236
|
-
var _a, _b, _c, _d, _e, _f
|
|
235
|
+
var _a, _b, _c, _d, _e, _f;
|
|
237
236
|
var userBill = data.userOwnedBills.find(function (bill) { return bill.bond.billAddress.toLowerCase() === (bondAddress === null || bondAddress === void 0 ? void 0 : bondAddress.toLowerCase()); });
|
|
238
237
|
console.log("USER BILL LOG");
|
|
239
238
|
console.log(userBill);
|
|
240
|
-
return userBill ? (_jsx(React.Fragment, { children: _jsx(Flex, __assign({ className: "modal modal-backdrop" }, { children: _jsxs(Flex, __assign({ className: "modal modal-content" }, { children: [isActive && account && (_jsxs("p", { children: ["Wallet Address: ", account] })), _jsx(Flex, __assign({ className: "modal modal-header" }, { children: _jsx(Flex, __assign({ className: "svg-close", onClick: onClose }, { children: _jsx(Svg, { icon: "close" }) })) })), _jsxs(Flex, __assign({ className: "modal-container table-container" }, { children: [_jsxs(Flex, __assign({ className: "modal-container title-container" }, { children: [_jsx(Flex, __assign({ className: "title-container bondicon" }, { children: _jsx(TokenImage, { symbol: (_a = userBill.bond.showcaseTokenName) !== null && _a !== void 0 ? _a : userBill.bond.payoutTokenName, size: 50 }) })), _jsx(Flex, __assign({ className: "title-container bondname" }, { children: (_b = userBill.bond) === null || _b === void 0 ? void 0 : _b.showcaseTokenName })),
|
|
239
|
+
return userBill ? (_jsx(React.Fragment, { children: _jsx(Flex, __assign({ className: "modal modal-backdrop" }, { children: _jsxs(Flex, __assign({ className: "modal modal-content" }, { children: [isActive && account && (_jsxs("p", { children: ["Wallet Address: ", account] })), _jsx(Flex, __assign({ className: "modal modal-header" }, { children: _jsx(Flex, __assign({ className: "svg-close", onClick: onClose }, { children: _jsx(Svg, { icon: "close" }) })) })), _jsxs(Flex, __assign({ className: "modal-container table-container" }, { children: [_jsx(Flex, __assign({ className: "modal-container bondimage" }, { children: "IMAGE" })), _jsxs(Flex, __assign({ className: "modal-container bondinfo" }, { children: [_jsxs(Flex, __assign({ className: "modal-container title-container" }, { children: [_jsx(Flex, __assign({ className: "title-container bondicon" }, { children: _jsx(TokenImage, { symbol: (_a = userBill.bond.showcaseTokenName) !== null && _a !== void 0 ? _a : userBill.bond.payoutTokenName, size: 50 }) })), _jsx(Flex, __assign({ className: "title-container bondname" }, { children: (_b = userBill.bond) === null || _b === void 0 ? void 0 : _b.showcaseTokenName })), _jsx(Flex, __assign({ className: "title-container tokentags" }, { children: _jsx(ListTag, { text: (_d = (_c = userBill.bond) === null || _c === void 0 ? void 0 : _c.tags) === null || _d === void 0 ? void 0 : _d[0], variant: ((_f = (_e = userBill.bond) === null || _e === void 0 ? void 0 : _e.tags) === null || _f === void 0 ? void 0 : _f[0]) === 'Cex Fund' ? 'cex_fund' : 'liquidity' }) }))] })), _jsx(Flex, { className: "modal-container description-container" }), _jsxs(Flex, __assign({ className: "modal-container blocks-container" }, { children: [_jsx(Flex, __assign({ className: "modal-block column-discount" }, { children: _jsx(Flex, __assign({ className: "block-header header" }, { children: "Discount" })) })), _jsx(Flex, __assign({ className: "modal-block column-arr" }, { children: _jsx(Flex, __assign({ className: "block-header header" }, { children: "ARR" })) })), _jsx(Flex, __assign({ className: "modal-block column-term" }, { children: _jsx(Flex, __assign({ className: "block-header header" }, { children: "Terms" })) })), _jsx(Flex, __assign({ className: "modal-block column-maxbuy" }, { children: _jsx(Flex, __assign({ className: "block-header header" }, { children: "Max Buy" })) }))] })), _jsxs(Flex, __assign({ className: "modal-container button-container" }, { children: [_jsx(Flex, __assign({ className: "button-container get" }, { children: _jsx(Button, { children: "CLAIM" }) })), _jsx(Flex, __assign({ className: "button-container buy" }, { children: _jsx(Button, { children: "TRANSFER" }) }))] }))] }))] }))] })) })) }, userBill.bond.billAddress)) : null;
|
|
241
240
|
}) })));
|
|
242
241
|
};
|
|
243
242
|
export default YourBondsModal;
|
|
@@ -36,42 +36,6 @@
|
|
|
36
36
|
width: 12px;
|
|
37
37
|
cursor: pointer;
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
.project-info {
|
|
41
|
-
align-items: center;
|
|
42
|
-
box-sizing: border-box;
|
|
43
|
-
margin: 0px 10px 0px 0px;
|
|
44
|
-
min-width: 0px;
|
|
45
|
-
display: flex;
|
|
46
|
-
font-size: 12px;
|
|
47
|
-
font-weight: bold;
|
|
48
|
-
background: var(--theme-ui-colors-primaryButton);
|
|
49
|
-
padding-left: 10px;
|
|
50
|
-
padding-top: 2px;
|
|
51
|
-
padding-bottom: 2px;
|
|
52
|
-
border-radius: 10px;
|
|
53
|
-
align-items: center;
|
|
54
|
-
position: relative;
|
|
55
|
-
cursor: pointer;
|
|
56
|
-
|
|
57
|
-
.icon {
|
|
58
|
-
padding-left: 5px;
|
|
59
|
-
padding-right: 0px;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.new {
|
|
64
|
-
color: white;
|
|
65
|
-
display: flex;
|
|
66
|
-
background: rgba(223, 65, 65, 0.4);
|
|
67
|
-
border-radius: 6px;
|
|
68
|
-
padding: 1px 5px;
|
|
69
|
-
font-size: 12px;
|
|
70
|
-
font-weight: bold;
|
|
71
|
-
line-height: 17px;
|
|
72
|
-
margin-right: 10px;
|
|
73
|
-
cursor: pointer;
|
|
74
|
-
}
|
|
75
39
|
}
|
|
76
40
|
|
|
77
41
|
.modal-container.table-container {
|
|
@@ -179,14 +143,6 @@
|
|
|
179
143
|
width: 350px;
|
|
180
144
|
}
|
|
181
145
|
|
|
182
|
-
.discount-positive {
|
|
183
|
-
color: #38A611;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.discount-negative {
|
|
187
|
-
color: #DF4141;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
146
|
.modal-block.column-arr {
|
|
191
147
|
margin: 0px 10px 0px 0px;
|
|
192
148
|
width: 350px;
|
|
@@ -201,107 +157,6 @@
|
|
|
201
157
|
width: 350px;
|
|
202
158
|
}
|
|
203
159
|
|
|
204
|
-
.modal-container.text-container {
|
|
205
|
-
display: flex;
|
|
206
|
-
flex-direction: column;
|
|
207
|
-
justify-content: center;
|
|
208
|
-
font-size: 12px;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
.text-container.row {
|
|
212
|
-
padding-top: 2px;
|
|
213
|
-
padding-bottom: 2px;
|
|
214
|
-
display: flex;
|
|
215
|
-
flex-direction: row;
|
|
216
|
-
justify-content: space-between;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.row-container {
|
|
220
|
-
display: flex;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.row-container.spend {
|
|
224
|
-
display: flex;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.row-container.spend-val {
|
|
228
|
-
display: flex;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.row-container.premium {
|
|
232
|
-
display: flex;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
.row-container.premium-icon {
|
|
236
|
-
padding-left: 5px;
|
|
237
|
-
align-items: start;
|
|
238
|
-
cursor: pointer;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
.row-container.premium-val {
|
|
242
|
-
display: flex;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
.premium-positive {
|
|
246
|
-
color: #38A611;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
.premium-negative {
|
|
250
|
-
color: #DF4141;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
.row-container.get {
|
|
254
|
-
display: flex;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
.row-container.get-val {
|
|
258
|
-
display: flex;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
.modal-container.input-container {
|
|
262
|
-
display: flex;
|
|
263
|
-
flex-direction: row;
|
|
264
|
-
background: var(--theme-ui-colors-white3);
|
|
265
|
-
border-radius: 10px;
|
|
266
|
-
min-height: 100px;
|
|
267
|
-
margin-top: 10px;
|
|
268
|
-
margin-bottom: 0px;
|
|
269
|
-
padding: 10px;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
.input-container.input {
|
|
273
|
-
background: var(--theme-ui-colors-white3);
|
|
274
|
-
border-radius: 10px;
|
|
275
|
-
border: medium;
|
|
276
|
-
padding-right: 10px;
|
|
277
|
-
width: 80%;
|
|
278
|
-
height: 50px;
|
|
279
|
-
font-size: 22px;
|
|
280
|
-
|
|
281
|
-
Input {
|
|
282
|
-
border: none;
|
|
283
|
-
display: inline-block;
|
|
284
|
-
|
|
285
|
-
&:focus {
|
|
286
|
-
outline: none;
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
.input-container.token {
|
|
292
|
-
display: flex;
|
|
293
|
-
align-items: center;
|
|
294
|
-
font-size: 12px;
|
|
295
|
-
font-weight: bold;
|
|
296
|
-
background: var(--theme-ui-colors-white4);
|
|
297
|
-
border-radius: 10px;
|
|
298
|
-
position: relative;
|
|
299
|
-
width: 190px;
|
|
300
|
-
height: 40px;
|
|
301
|
-
padding: 5px 4px;
|
|
302
|
-
cursor: unset;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
160
|
.modal-container.button-container {
|
|
306
161
|
width: 100%;
|
|
307
162
|
padding-top: 10px;
|