@goodaofi/bonds-sdk 3.0.143 → 3.0.144
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 +25 -6
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -18877,13 +18877,22 @@ const STRAPI_URL = `https://strapi-api.ape.bond`;
|
|
|
18877
18877
|
const SOUL_ZAP_API = `https://zap-api.ape.bond/zap?batch=1`;
|
|
18878
18878
|
const APEBOND = `https://ape.bond`;
|
|
18879
18879
|
|
|
18880
|
+
const getLocalUrl = (token) => `/images/tokens/${token}.png`;
|
|
18881
|
+
const getExternalUrl = (token) => `${APEBOND}/tokenImages/${token === null || token === void 0 ? void 0 : token.toUpperCase()}.png`;
|
|
18882
|
+
const TokenImg = ({ token, size, style }) => {
|
|
18883
|
+
const [src, setSrc] = useState(getLocalUrl(token));
|
|
18884
|
+
const handleError = () => {
|
|
18885
|
+
const localUrl = getLocalUrl(token);
|
|
18886
|
+
if (src === localUrl) {
|
|
18887
|
+
setSrc(getExternalUrl(token));
|
|
18888
|
+
}
|
|
18889
|
+
};
|
|
18890
|
+
return jsx$2("img", { src: src, alt: `tokenImgFor:${token}`, width: size, height: size, style: style, onError: handleError });
|
|
18891
|
+
};
|
|
18880
18892
|
const TokenImage = ({ symbol, symbol2, size, chain, }) => {
|
|
18881
18893
|
var _a, _b;
|
|
18882
|
-
const isLocal = (symbol === null || symbol === void 0 ? void 0 : symbol.toLowerCase()) === 'goo' || (symbol === null || symbol === void 0 ? void 0 : symbol.toLowerCase()) === 'sgoo' || (symbol === null || symbol === void 0 ? void 0 : symbol.toLowerCase()) === 'enzobtc';
|
|
18883
18894
|
const token1 = symbol === 'USDC.e' ? 'USDC' : symbol;
|
|
18884
18895
|
const token2 = symbol2 === 'USDC.e' ? 'USDC' : symbol2;
|
|
18885
|
-
const token1Url = isLocal ? `/images/tokens/${token1}.png` : `${APEBOND}/tokenImages/${token1 === null || token1 === void 0 ? void 0 : token1.toUpperCase()}.png`;
|
|
18886
|
-
const token2Url = isLocal ? `/images/tokens/${token2}.png` : `${APEBOND}/tokenImages/${token2 === null || token2 === void 0 ? void 0 : token2.toUpperCase()}.png`;
|
|
18887
18896
|
return token2 ? (jsxs(Flex, { sx: {
|
|
18888
18897
|
minWidth: size * 1.5 - 2,
|
|
18889
18898
|
height: size - 2,
|
|
@@ -18891,7 +18900,7 @@ const TokenImage = ({ symbol, symbol2, size, chain, }) => {
|
|
|
18891
18900
|
alignItems: 'center',
|
|
18892
18901
|
borderRadius: '55px',
|
|
18893
18902
|
position: 'relative',
|
|
18894
|
-
}, children: [jsx$2(
|
|
18903
|
+
}, children: [jsx$2(TokenImg, { token: token1, size: size, style: { position: 'absolute', zIndex: 4001, left: 0 } }), jsx$2(TokenImg, { token: token2, size: size, style: { position: 'absolute', zIndex: 4000, left: '33%' } }), chain && (jsx$2(Flex, { sx: {
|
|
18895
18904
|
zIndex: 4002,
|
|
18896
18905
|
position: 'absolute',
|
|
18897
18906
|
top: '-2px',
|
|
@@ -18905,7 +18914,7 @@ const TokenImage = ({ symbol, symbol2, size, chain, }) => {
|
|
|
18905
18914
|
alignItems: 'center',
|
|
18906
18915
|
borderRadius: '55px',
|
|
18907
18916
|
position: 'relative',
|
|
18908
|
-
}, children: [jsx$2(
|
|
18917
|
+
}, children: [jsx$2(TokenImg, { token: token1, size: size }), chain && (jsx$2(Flex, { sx: {
|
|
18909
18918
|
zIndex: 5,
|
|
18910
18919
|
position: 'absolute',
|
|
18911
18920
|
top: '-2px',
|
|
@@ -64197,6 +64206,16 @@ const PRIVATE_PARTNERS_BTC_TOKENS = {
|
|
|
64197
64206
|
},
|
|
64198
64207
|
active: true,
|
|
64199
64208
|
},
|
|
64209
|
+
{
|
|
64210
|
+
symbol: 'oBTC',
|
|
64211
|
+
address: {
|
|
64212
|
+
[types.ChainId.BASE]: '0xe3C0FF176eF92FC225096C6d1788cCB818808b35',
|
|
64213
|
+
},
|
|
64214
|
+
decimals: {
|
|
64215
|
+
[types.ChainId.BASE]: 8,
|
|
64216
|
+
},
|
|
64217
|
+
active: true,
|
|
64218
|
+
},
|
|
64200
64219
|
],
|
|
64201
64220
|
};
|
|
64202
64221
|
const FAKE_BTC_TOKENS = {
|
|
@@ -95081,7 +95100,7 @@ const GooSale = () => {
|
|
|
95081
95100
|
: ((_f = saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.nextStage) === null || _f === void 0 ? void 0 : _f.stageNumber) === 5
|
|
95082
95101
|
? 'TGE '
|
|
95083
95102
|
: 'Stage ' + ((_g = saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.nextStage) === null || _g === void 0 ? void 0 : _g.stageNumber) + ' ', "starts in:"] }), jsx$2(Svg, { icon: "comingSoon", width: "350" }), !(((_h = saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.nextStage) === null || _h === void 0 ? void 0 : _h.stageNumber) === 4 || ((_j = saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.nextStage) === null || _j === void 0 ? void 0 : _j.stageNumber) === 5) ? (jsxs(Fragment$1, { children: [jsxs(Flex, { sx: { flexDirection: 'column', alignItems: 'center' }, children: [jsxs(Flex, { sx: { flexDirection: 'row', alignItems: 'center', mt: '30px' }, children: [address && (jsxs(Flex, { sx: { mr: '1rem', p: '10px', borderRadius: 'normal', background: 'white3', alignItems: 'center' }, children: [jsx$2(Flex, { sx: { mr: '10px' }, children: jsx$2(Svg, { icon: "wallet" }) }), jsxs(Text, { sx: { fontSize: '14px', fontWeight: 400 }, children: [address === null || address === void 0 ? void 0 : address.slice(0, 4), "...", address === null || address === void 0 ? void 0 : address.slice((address === null || address === void 0 ? void 0 : address.length) - 4, address === null || address === void 0 ? void 0 : address.length)] })] })), jsx$2(Flex, { sx: { fontSize: '18px', fontWeight: 500 }, children: "Are You Eligible?" })] }), !address ? (jsx$2(Flex, { sx: { my: '20px', width: '100%' }, children: jsx$2(ConnectButton, {}) })) : (whitelisted === null ||
|
|
95084
|
-
(whitelisted === undefined && !cbBTCBalanceChecked && (jsx$2(Button, { sx: { m: '20px', width: '100%' }, onClick: handleCheckEligibility, children: "CHECK ELIGIBILITY" }))))] }), whitelisted !== null && whitelisted !== undefined && (jsxs(Flex, { sx: { flexDirection: 'row', alignItems: 'center', mt: '20px' }, children: [jsxs(Text, { sx: { fontSize: '12px', fontWeight: 400 }, children: ["You are whitelisted for Stage ", whitelisted, " and beyond!"] }), jsxs(Text, { color: "primaryButton", sx: { fontSize: '12px', fontWeight: 400, pl: '1rem' }, children: ["Tier ", whitelisted, " Access"] })] })), whitelisted === null && (jsxs(Flex, { sx: { flexDirection: 'column', alignItems: 'center', gap: '10px' }, children: [cbBTCBalanceChecked && (jsx$2(Flex, { sx: { flexDirection: 'column', alignItems: 'center', gap: '10px', mt: '10px' }, children: isCbBTCBalanceLoading ? (jsx$2(Text, { sx: { fontSize: '12px', fontWeight: 400 }, children: "Checking BTC balance across all chains..." })) : cbBTCBalance ? (jsxs(Fragment$1, { children: [cbBTCBalance.isEligible ? (addToWhitelistSuccess ? (jsx$2(Text, { color: "primaryButton", sx: { fontSize: '12px', fontWeight: 700 }, children: "\u2713 Successfully added to whitelist! Please refresh to see your tier." })) : addToWhitelistError ? (jsx$2(Text, { sx: { fontSize: '12px', fontWeight: 400, color: 'error' }, children: "Failed to add to whitelist. Please try again." })) : (jsx$2(Fragment$1, { children: jsx$2(Flex, { sx: { flexDirection: 'row', alignItems: 'center' }, children: jsxs(Text, { sx: { fontSize: '12px', fontWeight: 400 }, children: ["You ", jsx$2("span", { sx: { fontWeight: 700 }, children: "ARE" }), " eligible for the sale"] }) }) }))) : (jsxs(Flex, { sx: { flexDirection: 'column', alignItems: 'center', gap: '10px' }, children: [jsxs(Text, { sx: { fontSize: '12px', fontWeight: 400 }, children: ["You are ", jsx$2("span", { sx: { fontWeight: 700 }, children: "NOT" }), " eligible for the sale"] }), jsx$2(Text, { sx: { fontSize: '12px', fontWeight: 400, color: 'error' }, children: "You need at least 0.001 BTC to be
|
|
95103
|
+
(whitelisted === undefined && !cbBTCBalanceChecked && (jsx$2(Button, { sx: { m: '20px', width: '100%' }, onClick: handleCheckEligibility, children: "CHECK ELIGIBILITY" }))))] }), whitelisted !== null && whitelisted !== undefined && (jsxs(Flex, { sx: { flexDirection: 'row', alignItems: 'center', mt: '20px' }, children: [jsxs(Text, { sx: { fontSize: '12px', fontWeight: 400 }, children: ["You are whitelisted for Stage ", whitelisted, " and beyond!"] }), jsxs(Text, { color: "primaryButton", sx: { fontSize: '12px', fontWeight: 400, pl: '1rem' }, children: ["Tier ", whitelisted, " Access"] })] })), whitelisted === null && (jsxs(Flex, { sx: { flexDirection: 'column', alignItems: 'center', gap: '10px' }, children: [cbBTCBalanceChecked && (jsx$2(Flex, { sx: { flexDirection: 'column', alignItems: 'center', gap: '10px', mt: '10px' }, children: isCbBTCBalanceLoading ? (jsx$2(Text, { sx: { fontSize: '12px', fontWeight: 400 }, children: "Checking BTC balance across all chains..." })) : cbBTCBalance ? (jsxs(Fragment$1, { children: [cbBTCBalance.isEligible ? (addToWhitelistSuccess ? (jsx$2(Text, { color: "primaryButton", sx: { fontSize: '12px', fontWeight: 700 }, children: "\u2713 Successfully added to whitelist! Please refresh to see your tier." })) : addToWhitelistError ? (jsx$2(Text, { sx: { fontSize: '12px', fontWeight: 400, color: 'error' }, children: "Failed to add to whitelist. Please try again." })) : (jsx$2(Fragment$1, { children: jsx$2(Flex, { sx: { flexDirection: 'row', alignItems: 'center' }, children: jsxs(Text, { sx: { fontSize: '12px', fontWeight: 400 }, children: ["You ", jsx$2("span", { sx: { fontWeight: 700 }, children: "ARE" }), " eligible for the sale"] }) }) }))) : (jsxs(Flex, { sx: { flexDirection: 'column', alignItems: 'center', gap: '10px' }, children: [jsxs(Text, { sx: { fontSize: '12px', fontWeight: 400 }, children: ["You are ", jsx$2("span", { sx: { fontWeight: 700 }, children: "NOT" }), " eligible for the sale"] }), jsx$2(Text, { sx: { fontSize: '12px', fontWeight: 400, color: 'error' }, children: "You need at least 0.001 BTC to be whitelisted" })] })), jsxs(Text, { sx: { fontSize: '12px', fontWeight: 400 }, children: ["Total BTC Balance: ", cbBTCBalance.balance] }), cbBTCBalance.chainsWithBalance && cbBTCBalance.chainsWithBalance.length > 0 && (jsx$2(Flex, { sx: { flexDirection: 'column', gap: '5px', mt: '5px' }, children: cbBTCBalance.chainsWithBalance.map((chain) => (jsxs(Flex, { sx: { flexDirection: 'row', alignItems: 'center', gap: '10px' }, children: [jsx$2(TokenImage, { symbol: chain.symbol, size: 25, chain: chain.chainId }), jsxs(Text, { sx: { fontSize: '10px', fontWeight: 400, opacity: 0.7 }, children: [chain.balance, " ", chain.symbol] })] }, chain.chainId))) })), cbBTCBalance.isEligible && (jsx$2(Button, { sx: { width: '100%' }, onClick: () => addToWhitelist(), disabled: isAddingToWhitelist, children: isAddingToWhitelist ? 'ADDING TO WHITELIST...' : 'ADD ME TO WHITELIST' }))] })) : (jsx$2(Text, { sx: { fontSize: '12px', fontWeight: 400 }, children: "Unable to fetch BTC balance. Please try again." })) })), jsxs(Link, { href: "https://gmoney.site/whitelist", target: "_blank", color: "primaryButton", sx: { fontSize: '12px', fontWeight: 400, mt: '10px', mb: '20px' }, children: ["Go to whitelist campaign ", '>'] })] }))] })) : (jsx$2(Fragment$1, {}))] })), jsxs(Flex, { sx: { width: '100%', alignItems: 'center', px: '12%', py: '4rem' }, children: [jsx$2(StepBubble, { number: 1, title: 'STAGE 1', currentStep: currentStageNumber, loading: false }), jsx$2(StepBubble, { number: 2, title: 'STAGE 2', currentStep: currentStageNumber, loading: false }), jsx$2(StepBubble, { number: 3, title: 'STAGE 3', currentStep: currentStageNumber, loading: false }), jsx$2(StepBubble, { number: 5, title: 'TGE', currentStep: currentStageNumber, loading: false, hideBar: true })] }), jsx$2(Divider, { sx: { width: '100%', height: '2px', backgroundColor: 'white2' } }), jsx$2(ProgressBar, { saleInfo: saleInfo }), !(saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.isInBreakPeriod) && !currentStageSoldOut && (jsxs(Fragment$1, { children: [jsx$2(BondsMenu, { setChainFilterOption: handleChainFilterChange, chainFilterOption: chainFilterOption, handleToogle: handleToogle }), activeView === BondsViewOptions.BONDSMARKET && filteredContractsByChain && !isLoadingSaleInfo ? (jsx$2(BondRowsByChain, { contractsByChain: filteredContractsByChain })) : activeView === BondsViewOptions.YOURBONDS && !isLoadingSaleInfo ? (jsx$2(YourGoo, {})) : (jsx$2(Fragment$1, {}))] }))] }));
|
|
95085
95104
|
};
|
|
95086
95105
|
|
|
95087
95106
|
const GooSaleWithProviders = (props) => {
|