@goodaofi/bonds-sdk 3.0.154 → 3.0.155
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/main.js +10 -5
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -99899,10 +99899,10 @@ const ProgressBar = ({ saleInfo }) => {
|
|
|
99899
99899
|
const baseAmount = 100 + previousStagesBilled;
|
|
99900
99900
|
const hardCap = useMemo(() => { var _a; return ((_a = stage === null || stage === void 0 ? void 0 : stage.hardCapSats) !== null && _a !== void 0 ? _a : 0) / 100000000 + baseAmount; }, [stage, baseAmount]);
|
|
99901
99901
|
const billed = useMemo(() => { var _a; return ((_a = stage === null || stage === void 0 ? void 0 : stage.totalBilledSats) !== null && _a !== void 0 ? _a : 0) / 100000000 + baseAmount; }, [stage, baseAmount]);
|
|
99902
|
-
const isTimeProgress =
|
|
99902
|
+
const isTimeProgress = true;
|
|
99903
99903
|
const [timeLeft, setTimeLeft] = useState('');
|
|
99904
99904
|
const [timeProgress, setTimeProgress] = useState(0);
|
|
99905
|
-
const value = useMemo(() => (
|
|
99905
|
+
const value = useMemo(() => (timeProgress ), [isTimeProgress, timeProgress, billed, hardCap]);
|
|
99906
99906
|
const stageNumber = useMemo(() => { var _a; return (_a = stage === null || stage === void 0 ? void 0 : stage.stageNumber) !== null && _a !== void 0 ? _a : 1; }, [stage]);
|
|
99907
99907
|
const contractsByChain = (_c = (_b = saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.stages) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.contractsByChain;
|
|
99908
99908
|
const saleContracts = contractsByChain === null || contractsByChain === void 0 ? void 0 : contractsByChain[main.ChainId.BASE];
|
|
@@ -99911,7 +99911,7 @@ const ProgressBar = ({ saleInfo }) => {
|
|
|
99911
99911
|
const btcPriceData = useCurrencyPrice(saleData === null || saleData === void 0 ? void 0 : saleData.principalToken, main.ChainId.BASE);
|
|
99912
99912
|
const btcPrice = (_d = btcPriceData === null || btcPriceData === void 0 ? void 0 : btcPriceData.price) !== null && _d !== void 0 ? _d : 0;
|
|
99913
99913
|
const totalBilledBTC = ((saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.totalBilled) ? (saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.totalBilled) / 100000000 : 0) + 100;
|
|
99914
|
-
(totalBilledBTC * btcPrice).toLocaleString('en-US', {
|
|
99914
|
+
const totalBilledUSD = (totalBilledBTC * btcPrice).toLocaleString('en-US', {
|
|
99915
99915
|
style: 'currency',
|
|
99916
99916
|
currency: 'USD',
|
|
99917
99917
|
maximumFractionDigits: 0,
|
|
@@ -99971,13 +99971,18 @@ const ProgressBar = ({ saleInfo }) => {
|
|
|
99971
99971
|
})
|
|
99972
99972
|
: 'N/A';
|
|
99973
99973
|
}, [saleInfo]);
|
|
99974
|
-
return (jsxs(Fragment$1, { children: [jsxs(Flex$1, { sx: { alignItems: 'end', justifyContent: 'space-between', flexDirection: 'row', mt: '1rem' }, children: [jsxs(Flex$1, { sx: { flexDirection: 'column', width: '250px', alignItems: 'start' }, children: [
|
|
99974
|
+
return (jsxs(Fragment$1, { children: [jsxs(Flex$1, { sx: { alignItems: 'end', justifyContent: 'space-between', flexDirection: 'row', mt: '1rem' }, children: [jsxs(Flex$1, { sx: { flexDirection: 'column', width: '250px', alignItems: 'start' }, children: [(jsxs(Fragment$1, { children: [jsx$2(Text, { sx: {
|
|
99975
|
+
fontSize: '14px',
|
|
99976
|
+
fontWeight: '700',
|
|
99977
|
+
color: 'var(--theme-ui-colors-textDisabledButton)',
|
|
99978
|
+
mb: '0.2rem',
|
|
99979
|
+
}, children: "Total Raised" }), jsxs(Flex$1, { sx: { flexDirection: 'row', alignItems: 'center' }, children: [jsx$2(Text, { sx: { fontSize: '22px', fontWeight: '700' }, children: `${totalBilledBTC.toFixed(0)} BTC` }), jsx$2(Text, { sx: { fontSize: '14px', fontWeight: '400', ml: '10px' }, children: `(${totalBilledUSD})` })] })] })), (jsxs(Fragment$1, { children: [jsx$2(Text, { sx: {
|
|
99975
99980
|
fontSize: '14px',
|
|
99976
99981
|
fontWeight: '700',
|
|
99977
99982
|
color: 'var(--theme-ui-colors-textDisabledButton)',
|
|
99978
99983
|
mb: '0.2rem',
|
|
99979
99984
|
mt: '1rem',
|
|
99980
|
-
}, children: '
|
|
99985
|
+
}, children: 'Stage ' + stageNumber + ' Progress' }), jsx$2(Text, { sx: { fontSize: '22px', fontWeight: '700' }, children: `${timeLeft}` })] })) ] }), jsx$2(Text, { sx: {
|
|
99981
99986
|
fontSize: '12px',
|
|
99982
99987
|
fontWeight: '400',
|
|
99983
99988
|
textAlign: 'right',
|