@ape.swap/bonds-sdk 1.0.401 → 1.0.403
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.
|
@@ -237,21 +237,24 @@ var YourBonds = function (_a) {
|
|
|
237
237
|
setIsModalOpen(true);
|
|
238
238
|
navigate("/YourBonds/?bondAddress=".concat(bill.address, "&bondChain=").concat(bill.bond.chainId), { replace: true });
|
|
239
239
|
};
|
|
240
|
-
return (_jsxs(ThemeUIProvider, __assign({ theme: defaultTheme }, { children: [isActive && account && _jsx("p", { children: account }), isActive && account && _jsx("button", __assign({ onClick: handleApprove }, { children: "Approve USDT" })), _jsxs(Flex, __assign({ className: "container table-container" }, { children: [_jsxs(Flex, __assign({ className: "container header-container" }, { children: [_jsx(Flex, __assign({ className: "column column-tokens" }, { children: _jsx(Flex, { className: "column column-tokeninfoname" }) })), _jsxs(Flex, __assign({ className: "column column-bondinfo" }, { children: [_jsxs(Flex, __assign({ className: "column
|
|
240
|
+
return (_jsxs(ThemeUIProvider, __assign({ theme: defaultTheme }, { children: [isActive && account && _jsx("p", { children: account }), isActive && account && _jsx("button", __assign({ onClick: handleApprove }, { children: "Approve USDT" })), _jsxs(Flex, __assign({ className: "container table-container" }, { children: [_jsxs(Flex, __assign({ className: "container header-container" }, { children: [_jsx(Flex, __assign({ className: "column column-tokens" }, { children: _jsx(Flex, { className: "column column-tokeninfoname" }) })), _jsxs(Flex, __assign({ className: "column column-bondinfo" }, { children: [_jsxs(Flex, __assign({ className: "column header-claimable" }, { children: [_jsx(Text, __assign({ sx: { opacity: '0.6', fontSize: '12px' } }, { children: "Claimable" })), _jsx(Flex, __assign({ className: "column header-icon", sx: { opacity: '0.6' }, onClick: function () { return handleSort('claimable'); } }, { children: _jsx(Svg, { icon: "sort", width: "12px" }) }))] })), _jsxs(Flex, __assign({ className: "column header-pending" }, { children: [_jsx(Text, __assign({ sx: { opacity: '0.6', fontSize: '12px' } }, { children: "Pending" })), _jsx(Flex, __assign({ className: "column header-icon", sx: { opacity: '0.6' }, onClick: function () { return handleSort('pending'); } }, { children: _jsx(Svg, { icon: "sort", width: "12px" }) }))] })), _jsxs(Flex, __assign({ className: "column header-terms" }, { children: [_jsx(Text, __assign({ sx: { opacity: '0.6', fontSize: '12px' } }, { children: "Terms" })), _jsx(Flex, __assign({ className: "column header-icon", sx: { opacity: '0.6' }, onClick: function () { return handleSort('terms'); } }, { children: _jsx(Svg, { icon: "sort", width: "12px" }) }))] })), _jsx(Flex, __assign({ className: "column header-claimall" }, { children: _jsx(Button, __assign({ disabled: !account, sx: {
|
|
241
|
+
height: ['36px', '36px', '36px', '26px'],
|
|
242
|
+
lineHeight: '12px',
|
|
243
|
+
fontSize: '14px',
|
|
244
|
+
fontWeight: 600,
|
|
245
|
+
width: '100%',
|
|
246
|
+
} }, { children: "CLAIM ALL" })) }))] }))] })), sortedBonds.map(function (bill) {
|
|
247
|
+
var _a, _b;
|
|
248
|
+
return (_jsxs(Flex, __assign({ className: "container bondrow-container", onClick: function () { return rowClick(bill); } }, { children: [_jsx(Flex, __assign({ className: "column column-tokens" }, { children: _jsx(Flex, __assign({ className: "column column-tokeninfoname" }, { children: _jsx(TokenInfoAndName, { bill: bill.bond, vestEnds: "Ends in ".concat(getPendingVesting(bill.lastBlockTimestamp, bill.vesting)) }) })) })), _jsxs(Flex, __assign({ className: "column column-bondinfo" }, { children: [_jsxs(Flex, __assign({ className: "column column-claimable" }, { children: [formatNumberSI(parseFloat(claimable(bill).toFixed(3)), 0), _jsx(Text, __assign({ sx: { opacity: '0.6', fontSize: '12px', paddingLeft: '5px' } }, { children: "($".concat((claimable(bill) * ((_a = parseFloat(earnTokenPrice(bill.bond))) !== null && _a !== void 0 ? _a : 0)).toFixed(2), ")") }))] })), _jsxs(Flex, __assign({ className: "column column-pending" }, { children: [formatNumberSI(parseFloat(totalPending(bill).toFixed(0)), 0), _jsx(Text, __assign({ sx: { opacity: '0.6', fontSize: '12px', paddingLeft: '5px' } }, { children: "($".concat((totalPending(bill) * ((_b = parseFloat(earnTokenPrice(bill.bond))) !== null && _b !== void 0 ? _b : 0)).toFixed(2), ")") }))] })), _jsx(Flex, __assign({ className: "column column-terms" }, { children: "".concat(vestingTimeRemaining(bill).days, "d, ").concat(vestingTimeRemaining(bill).hours, "h, ").concat(vestingTimeRemaining(bill).minutes, "m") })), _jsx(Flex, __assign({ className: "column column-claimall" }, { children: _jsx(Button, __assign({ disabled: !account, onClick: function (event) {
|
|
249
|
+
event.stopPropagation();
|
|
250
|
+
// Add your claim logic here
|
|
251
|
+
}, sx: {
|
|
241
252
|
height: ['36px', '36px', '36px', '26px'],
|
|
242
253
|
lineHeight: '12px',
|
|
243
254
|
fontSize: '14px',
|
|
244
255
|
fontWeight: 600,
|
|
245
256
|
width: '100%',
|
|
246
|
-
} }, { children: "Claim" })) }))
|
|
247
|
-
var _a, _b;
|
|
248
|
-
return (_jsxs(Flex, __assign({ className: "container bondrow-container", onClick: function () { return rowClick(bill); } }, { children: [_jsx(Flex, __assign({ className: "column column-tokens" }, { children: _jsx(Flex, __assign({ className: "column column-tokeninfoname" }, { children: _jsx(TokenInfoAndName, { bill: bill.bond, vestEnds: "Ends in ".concat(getPendingVesting(bill.lastBlockTimestamp, bill.vesting)) }) })) })), _jsxs(Flex, __assign({ className: "column column-bondinfo" }, { children: [_jsxs(Flex, __assign({ className: "column column-claimable" }, { children: [formatNumberSI(parseFloat(claimable(bill).toFixed(3)), 0), _jsx(Text, __assign({ sx: { opacity: '0.6', fontSize: '12px', paddingLeft: '5px' } }, { children: "($".concat((claimable(bill) * ((_a = parseFloat(earnTokenPrice(bill.bond))) !== null && _a !== void 0 ? _a : 0)).toFixed(2), ")") }))] })), _jsxs(Flex, __assign({ className: "column column-pending" }, { children: [formatNumberSI(parseFloat(totalPending(bill).toFixed(0)), 0), _jsx(Text, __assign({ sx: { opacity: '0.6', fontSize: '12px', paddingLeft: '5px' } }, { children: "($".concat((totalPending(bill) * ((_b = parseFloat(earnTokenPrice(bill.bond))) !== null && _b !== void 0 ? _b : 0)).toFixed(2), ")") }))] })), _jsx(Flex, __assign({ className: "column column-terms" }, { children: "".concat(vestingTimeRemaining(bill).days, "d, ").concat(vestingTimeRemaining(bill).hours, "h, ").concat(vestingTimeRemaining(bill).minutes, "m") })), _jsx(Flex, __assign({ className: "column column-claimall" }, { children: _jsx(Flex, __assign({ className: "column-claimall button" }, { children: _jsx(Button, __assign({ disabled: !account, sx: {
|
|
249
|
-
height: ['36px', '36px', '36px', '26px'],
|
|
250
|
-
lineHeight: '12px',
|
|
251
|
-
fontSize: '14px',
|
|
252
|
-
fontWeight: 600,
|
|
253
|
-
width: '100%',
|
|
254
|
-
} }, { children: "Claim" })) })) }))] }))] }), bill.bond.billAddress));
|
|
257
|
+
} }, { children: "Claim" })) }))] }))] }), bill.bond.billAddress));
|
|
255
258
|
})] }))] })));
|
|
256
259
|
};
|
|
257
260
|
export default YourBonds;
|
package/dist/scss/YourBonds.scss
CHANGED
|
@@ -11,15 +11,12 @@
|
|
|
11
11
|
|
|
12
12
|
.container.header-container {
|
|
13
13
|
display: flex;
|
|
14
|
-
|
|
15
|
-
align-items: center;
|
|
14
|
+
flex-direction: row;
|
|
16
15
|
width: 100%;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
font-size: 12px;
|
|
22
|
-
color: #78787D;
|
|
16
|
+
height: 70px;
|
|
17
|
+
justify-content: space-around;
|
|
18
|
+
margin-bottom: 5px;
|
|
19
|
+
border-radius: 10px;
|
|
23
20
|
}
|
|
24
21
|
|
|
25
22
|
.container.bondrow-container {
|
|
@@ -64,6 +61,35 @@
|
|
|
64
61
|
width: 60%;
|
|
65
62
|
}
|
|
66
63
|
|
|
64
|
+
.column.header-claimable {
|
|
65
|
+
flex-direction: row;
|
|
66
|
+
justify-content: center;
|
|
67
|
+
align-items: center;
|
|
68
|
+
width: 25%;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.column.header-pending {
|
|
72
|
+
flex-direction: row;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
align-items: center;
|
|
75
|
+
width: 25%;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.column.header-terms {
|
|
79
|
+
flex-direction: row;
|
|
80
|
+
justify-content: center;
|
|
81
|
+
align-items: center;
|
|
82
|
+
width: 25%;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.column.header-claimall {
|
|
86
|
+
flex-direction: column;
|
|
87
|
+
justify-content: center;
|
|
88
|
+
align-items: center;
|
|
89
|
+
width: 30%;
|
|
90
|
+
padding-right: 20px;
|
|
91
|
+
}
|
|
92
|
+
|
|
67
93
|
.column.column-claimable {
|
|
68
94
|
flex-direction: row;
|
|
69
95
|
justify-content: center;
|