@ape.swap/bonds-sdk 1.0.583 → 1.0.585
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.
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { BondsDataResponse } from '../../types/bonds';
|
|
3
2
|
declare const BondRowsByChain: ({ bonds, hotBonds, hideTitles, rowClick }: {
|
|
4
3
|
bonds: BondsDataResponse[];
|
|
5
4
|
hotBonds?: string[];
|
|
6
5
|
hideTitles: boolean;
|
|
7
6
|
rowClick: (bond: BondsDataResponse) => void;
|
|
8
|
-
}) =>
|
|
7
|
+
}) => import("react").JSX.Element;
|
|
9
8
|
export default BondRowsByChain;
|
|
@@ -5,7 +5,7 @@ import { Flex } from '../uikit-sdk';
|
|
|
5
5
|
import { MAINNET_CHAINS } from '../../config/constants/chains';
|
|
6
6
|
var BondRowsByChain = function (_a) {
|
|
7
7
|
var bonds = _a.bonds, hotBonds = _a.hotBonds, hideTitles = _a.hideTitles, rowClick = _a.rowClick;
|
|
8
|
-
return (_jsxs(Flex, { sx: { width: '100%', flexDirection: 'column', mt: '5px' }, children: [[ChainId.MAINNET].map(function (chain, index) {
|
|
8
|
+
return (_jsxs(Flex, { className: "container bondRowsByChain", sx: { width: '100%', flexDirection: 'column', mt: '5px' }, children: [[ChainId.MAINNET].map(function (chain, index) {
|
|
9
9
|
return (_jsx(BondRowsWithTitle, { chain: chain, bonds: bonds, hotBonds: hotBonds, hideTitles: hideTitles, rowClick: rowClick }, chain));
|
|
10
10
|
}), [ChainId.BSC].map(function (chain, index) {
|
|
11
11
|
return (_jsx(BondRowsWithTitle, { chain: chain, bonds: bonds, hotBonds: hotBonds, hideTitles: hideTitles, rowClick: rowClick }, chain));
|
|
@@ -9,7 +9,7 @@ var BondRowsWithTitle = function (_a) {
|
|
|
9
9
|
var billsFilteredByChain = bonds.filter(function (bill) { return bill.chainId === chain; });
|
|
10
10
|
var key = chain;
|
|
11
11
|
var _b = useState(true), isOpen = _b[0], setIsOpen = _b[1];
|
|
12
|
-
return (_jsx(Flex, { sx: { width: '100%', flexDirection: 'column' }, children: _jsxs(AnimatePresence, { initial: false, children: [_jsx(Flex, { onClick: function () { return setIsOpen(!isOpen); }, children: _jsx(ChainTitle, { chain: chain, pt: '5px', hideTitles: hideTitles, isOpen: isOpen }) }), billsFilteredByChain.length > 0 && isOpen && (_jsx(motion.div, { initial: { height: 0, overflow: 'hidden' }, animate: { height: 'fit-content', overflow: 'hidden', transitionEnd: { overflow: 'visible' } }, exit: { height: 0, overflow: 'hidden' }, sx: {
|
|
12
|
+
return (_jsx(Flex, { className: "container bondRowsWithTitle", sx: { width: '100%', flexDirection: 'column' }, children: _jsxs(AnimatePresence, { initial: false, children: [_jsx(Flex, { onClick: function () { return setIsOpen(!isOpen); }, children: _jsx(ChainTitle, { chain: chain, pt: '5px', hideTitles: hideTitles, isOpen: isOpen }) }), billsFilteredByChain.length > 0 && isOpen && (_jsx(motion.div, { initial: { height: 0, overflow: 'hidden' }, animate: { height: 'fit-content', overflow: 'hidden', transitionEnd: { overflow: 'visible' } }, exit: { height: 0, overflow: 'hidden' }, sx: {
|
|
13
13
|
position: 'relative',
|
|
14
14
|
overflow: 'hidden',
|
|
15
15
|
width: '100%',
|
|
@@ -100,11 +100,11 @@ var YourBonds = function (_a) {
|
|
|
100
100
|
var _c = useState(null), claimTx = _c[0], setClaimTx = _c[1];
|
|
101
101
|
var _d = useState(null), toastMessage = _d[0], setToastMessage = _d[1];
|
|
102
102
|
useEffect(function () {
|
|
103
|
-
if (
|
|
104
|
-
setToastMessage("Transaction complete: ".concat(
|
|
103
|
+
if (hash) {
|
|
104
|
+
setToastMessage("Transaction complete: ".concat(hash));
|
|
105
105
|
setTimeout(function () { return setToastMessage(null); }, 5000); // Hide toast after 5 seconds
|
|
106
106
|
}
|
|
107
|
-
}, [
|
|
107
|
+
}, [hash]);
|
|
108
108
|
// Fetch data
|
|
109
109
|
var _e = useState([]), bondData = _e[0], setBondData = _e[1];
|
|
110
110
|
var _f = useState([]), mappedUserBills = _f[0], setMappedUserBills = _f[1];
|