@ape.swap/bonds-sdk 4.5.0-test.9 → 4.5.2
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/components/TokenInfoAndName/index.d.ts +3 -3
- package/dist/components/TokenSelectorPanel/index.d.ts +3 -2
- package/dist/components/uikit-sdk/Tag/ListTag.d.ts +3 -3
- package/dist/main.js +119 -124
- package/dist/state/tiers/useTierPoints.d.ts +1 -1
- package/dist/styles.css +5 -4
- package/dist/utils/campaignStyles.d.ts +14 -6
- package/dist/views/Bonds/components/BondRows/BondRow.d.ts +2 -2
- package/package.json +2 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { MarketingCampaign } from '@ape.swap/apeswap-lists';
|
|
3
3
|
export declare const NETWORK_COLORS: Partial<Record<number, string>>;
|
|
4
|
-
declare const TokenInfoAndName: ({ tokenSymbol, chain, tag, vestEnds, isHotBond,
|
|
4
|
+
declare const TokenInfoAndName: ({ tokenSymbol, chain, tag, vestEnds, isHotBond, marketingCampaign, }: {
|
|
5
5
|
tokenSymbol?: string;
|
|
6
6
|
chain?: number;
|
|
7
7
|
tag?: string;
|
|
8
8
|
vestEnds?: string;
|
|
9
9
|
isHotBond?: boolean;
|
|
10
|
-
|
|
10
|
+
marketingCampaign?: MarketingCampaign;
|
|
11
11
|
}) => React.JSX.Element;
|
|
12
12
|
export default TokenInfoAndName;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ChainId, Token } from '@ape.swap/apeswap-lists';
|
|
3
|
-
declare const TokenSelectorPanel: ({ typedValue, setTypedValue, selectedToken, bondChainId, handleValueBtn, handleCurrencySelect, enableZap, tokenBalance, selectedTokenPrice, bondPrincipalToken, inputDisabled, }: {
|
|
2
|
+
import { ChainId, MarketingCampaign, Token } from '@ape.swap/apeswap-lists';
|
|
3
|
+
declare const TokenSelectorPanel: ({ typedValue, setTypedValue, selectedToken, bondChainId, handleValueBtn, handleCurrencySelect, enableZap, tokenBalance, selectedTokenPrice, bondPrincipalToken, inputDisabled, marketingCampaign, }: {
|
|
4
4
|
typedValue: string;
|
|
5
5
|
setTypedValue: (value: React.SetStateAction<string>) => void;
|
|
6
6
|
selectedToken?: "NATIVE" | Token;
|
|
@@ -12,5 +12,6 @@ declare const TokenSelectorPanel: ({ typedValue, setTypedValue, selectedToken, b
|
|
|
12
12
|
selectedTokenPrice?: number;
|
|
13
13
|
bondPrincipalToken?: Token;
|
|
14
14
|
inputDisabled?: boolean;
|
|
15
|
+
marketingCampaign?: MarketingCampaign;
|
|
15
16
|
}) => React.JSX.Element;
|
|
16
17
|
export default TokenSelectorPanel;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
declare const ListTag: ({ text,
|
|
2
|
+
import { MarketingCampaign } from '@ape.swap/apeswap-lists';
|
|
3
|
+
declare const ListTag: ({ text, marketingCampaign }: {
|
|
4
4
|
text?: string;
|
|
5
|
-
|
|
5
|
+
marketingCampaign?: MarketingCampaign;
|
|
6
6
|
}) => React.JSX.Element;
|
|
7
7
|
export default ListTag;
|
package/dist/main.js
CHANGED
|
@@ -19975,6 +19975,7 @@ function requireTypes$1 () {
|
|
|
19975
19975
|
exports$1.defaultDexFactories =
|
|
19976
19976
|
exports$1.dexFactories =
|
|
19977
19977
|
exports$1.VaultVersion =
|
|
19978
|
+
exports$1.MarketingCampaign =
|
|
19978
19979
|
exports$1.LaunchBondTiers =
|
|
19979
19980
|
exports$1.MigrationVestingTerms =
|
|
19980
19981
|
exports$1.defaultBillArtCollection =
|
|
@@ -20219,6 +20220,9 @@ function requireTypes$1 () {
|
|
|
20219
20220
|
LaunchBondTiers[(LaunchBondTiers['Legend'] = 4)] = 'Legend';
|
|
20220
20221
|
LaunchBondTiers[(LaunchBondTiers['Mythical'] = 5)] = 'Mythical';
|
|
20221
20222
|
})((exports$1.LaunchBondTiers || (exports$1.LaunchBondTiers = {})));
|
|
20223
|
+
(function (MarketingCampaign) {
|
|
20224
|
+
MarketingCampaign['Christmas2025'] = 'Christmas2025';
|
|
20225
|
+
})((exports$1.MarketingCampaign || (exports$1.MarketingCampaign = {})));
|
|
20222
20226
|
(function (VaultVersion) {
|
|
20223
20227
|
VaultVersion['V1'] = 'V1';
|
|
20224
20228
|
VaultVersion['V2'] = 'V2';
|
|
@@ -63127,7 +63131,6 @@ const QUERY_KEYS = {
|
|
|
63127
63131
|
BOND_API_STATS: 'ApeBond-SDK-bondApiStats',
|
|
63128
63132
|
SDK_CONFIG: 'ApeBond-SDK-sdkConfig',
|
|
63129
63133
|
BOND_RECOMMENDATIONS: 'ApeBond-SDK-bondRecommendations',
|
|
63130
|
-
USER_STATS: 'ApeBond-SDK-userStats',
|
|
63131
63134
|
BONDS_DATA: 'ApeBond-SDK-bondsData',
|
|
63132
63135
|
BONDS_LIST: 'ApeBond-SDK-bondsList',
|
|
63133
63136
|
BONDS_LIST_PRE_TGE: 'ApeBond-SDK-bondsListPreTGE',
|
|
@@ -63243,6 +63246,8 @@ const TIERS_NAMES = {
|
|
|
63243
63246
|
[main.LaunchBondTiers.Mythical]: 'Mythical',
|
|
63244
63247
|
};
|
|
63245
63248
|
const getUserTier = (weight) => {
|
|
63249
|
+
if (!weight)
|
|
63250
|
+
return null;
|
|
63246
63251
|
const weightBG = new BigNumber$1(weight);
|
|
63247
63252
|
const silver = new BigNumber$1(TIERS_WEIGHT[main.LaunchBondTiers.Silver]);
|
|
63248
63253
|
const gold = new BigNumber$1(TIERS_WEIGHT[main.LaunchBondTiers.Gold]);
|
|
@@ -64833,7 +64838,8 @@ const fetchUserOwnedBills = (chainId, account, bonds, tokenPrices, priceApiUrl)
|
|
|
64833
64838
|
payoutClaimed: (_p = billData[billPos][0]) === null || _p === void 0 ? void 0 : _p.payoutClaimed.toString(),
|
|
64834
64839
|
billNftAddress: (_q = bond.billNnftAddress[bond.chainId]) !== null && _q !== void 0 ? _q : '',
|
|
64835
64840
|
vesting: (_r = billData[billPos][0]) === null || _r === void 0 ? void 0 : _r.vesting.toString(),
|
|
64836
|
-
|
|
64841
|
+
// TODO: sync this with solana so that both implementation have the same logic
|
|
64842
|
+
lastBlockTimestamp: (_s = billData[billPos][0]) === null || _s === void 0 ? void 0 : _s.vestingStartTimestamp.toString(),
|
|
64837
64843
|
truePricePaid: (_t = billData[billPos][0]) === null || _t === void 0 ? void 0 : _t.truePricePaid.toString(),
|
|
64838
64844
|
pendingRewards: billData[billPos + 1][0].toString(),
|
|
64839
64845
|
bond,
|
|
@@ -67645,6 +67651,55 @@ const AddFavToken = ({ tokenSymbol, hotBond }) => {
|
|
|
67645
67651
|
}, children: jsx$2(AnimatePresence, { mode: "wait", children: jsx$2(motion.div, { initial: false, animate: { opacity: 1, scale: 1.0 }, exit: { opacity: 0, scale: 0.8 }, transition: { duration: 0.2 }, style: { display: 'flex' }, children: isFavToken ? (jsx$2(Svg, { icon: "StarFilled", width: 22, height: 22, color: '#DE62F3' })) : (jsx$2(Svg, { icon: hotBond ? 'FirePink' : 'Star', width: hotBond ? 25 : 20, height: hotBond ? 25 : 20, color: '#73728E' })) }, isFavToken ? 'StarFilled' : 'Star') }) }));
|
|
67646
67652
|
};
|
|
67647
67653
|
|
|
67654
|
+
// Styles of the tag component.
|
|
67655
|
+
const MCTagStyles = {
|
|
67656
|
+
[main.MarketingCampaign.Christmas2025]: {
|
|
67657
|
+
background: '#DF4141',
|
|
67658
|
+
color: '#fff',
|
|
67659
|
+
},
|
|
67660
|
+
};
|
|
67661
|
+
// Styles of the buy bond modal.
|
|
67662
|
+
const MCBuyComponentStyles = {
|
|
67663
|
+
[main.MarketingCampaign.Christmas2025]: {
|
|
67664
|
+
backgroundImage: 'url(https://ape.bond/images/mc/christmas-buy.png)',
|
|
67665
|
+
backgroundSize: 'cover',
|
|
67666
|
+
opacity: 1,
|
|
67667
|
+
},
|
|
67668
|
+
};
|
|
67669
|
+
const MCBondRowStyles = {
|
|
67670
|
+
[main.MarketingCampaign.Christmas2025]: {
|
|
67671
|
+
backgroundImage: 'url(https://ape.bond/images/mc/christmas-row.png)',
|
|
67672
|
+
backgroundSize: 'cover',
|
|
67673
|
+
opacity: 1,
|
|
67674
|
+
},
|
|
67675
|
+
};
|
|
67676
|
+
const MCColorMapping = {
|
|
67677
|
+
white3: {
|
|
67678
|
+
[main.MarketingCampaign.Christmas2025]: '#348C9E33 !important',
|
|
67679
|
+
},
|
|
67680
|
+
white4: {
|
|
67681
|
+
[main.MarketingCampaign.Christmas2025]: '#348C9E33 !important',
|
|
67682
|
+
},
|
|
67683
|
+
};
|
|
67684
|
+
// Styles of the token image displayed in the buy bond modal.
|
|
67685
|
+
const MCTokenIconStyles = {
|
|
67686
|
+
[main.MarketingCampaign.Christmas2025]: {
|
|
67687
|
+
position: 'absolute',
|
|
67688
|
+
top: '-25px',
|
|
67689
|
+
left: '18%',
|
|
67690
|
+
width: '100%',
|
|
67691
|
+
height: '50px',
|
|
67692
|
+
zIndex: 10,
|
|
67693
|
+
backgroundImage: 'url(https://ape.bond/images/mc/christmas-hat.png)',
|
|
67694
|
+
backgroundRepeat: 'no-repeat',
|
|
67695
|
+
backgroundSize: 'contain',
|
|
67696
|
+
backgroundPosition: 'center',
|
|
67697
|
+
},
|
|
67698
|
+
};
|
|
67699
|
+
const MCTagNameMapping = {
|
|
67700
|
+
[main.MarketingCampaign.Christmas2025]: 'Christmas Sale',
|
|
67701
|
+
};
|
|
67702
|
+
|
|
67648
67703
|
const NETWORK_COLORS = {
|
|
67649
67704
|
[main.ChainId.BSC]: '#F3BA2F4d',
|
|
67650
67705
|
[main.ChainId.MAINNET]: '#627eea4d',
|
|
@@ -67667,7 +67722,7 @@ const NETWORK_COLORS = {
|
|
|
67667
67722
|
[main.ChainId.UNICHAIN]: '#f50db44d',
|
|
67668
67723
|
[main.ChainId.MEGAETH_TESTNET]: '#DFD9D94d',
|
|
67669
67724
|
};
|
|
67670
|
-
const TokenInfoAndName = ({ tokenSymbol, chain, tag, vestEnds, isHotBond,
|
|
67725
|
+
const TokenInfoAndName = ({ tokenSymbol, chain, tag, vestEnds, isHotBond, marketingCampaign, }) => {
|
|
67671
67726
|
return (jsxs(Flex, { className: "tokeninfoname container", children: [jsx$2(Flex, { sx: {
|
|
67672
67727
|
width: '125px',
|
|
67673
67728
|
height: '100%',
|
|
@@ -67681,13 +67736,13 @@ const TokenInfoAndName = ({ tokenSymbol, chain, tag, vestEnds, isHotBond, billAr
|
|
|
67681
67736
|
} }), jsx$2(Flex, { className: "tokeninfoname chain", children: jsx$2(Svg, { width: 20, height: 20, icon: chain ? NETWORK_ICONS[chain] : 'question' }) }), jsxs(Flex, { className: "tokeninfoname tokencontainer", sx: {
|
|
67682
67737
|
marginTop: vestEnds ? ['10px', '10px', '10px', '0px'] : 0,
|
|
67683
67738
|
maxWidth: ['175px', '175px', '140px', '190px', '190px'],
|
|
67684
|
-
}, children: [jsx$2(TokenImage, { symbol: tokenSymbol === 'AIX' && chain === main.ChainId.SOL ? 'SOLAIX' : tokenSymbol, size: 33 }), jsxs(Flex, { className: "tokeninfoname tokentext", children: [jsx$2(Flex, { sx: { justifyContent: 'space-between', width: '100%', alignItems: 'center' }, children: jsx$2(Text, { sx: { fontSize: ['12px', '12px', '14px', '16px'] }, children: tokenSymbol }) }), vestEnds && (jsx$2(Flex, { sx: { fontSize: '12px', fontWeight: 400, opacity: 0.6, lineHeight: '14px' }, children: vestEnds }))] }), jsx$2(Flex, { className: "tokeninfofav", sx: {
|
|
67739
|
+
}, children: [jsxs(Flex, { sx: { position: 'relative', minWidth: '33px' }, children: [jsx$2(Flex, { sx: MCTokenIconStyles[marketingCampaign] }), jsx$2(TokenImage, { symbol: tokenSymbol === 'AIX' && chain === main.ChainId.SOL ? 'SOLAIX' : tokenSymbol, size: 33 })] }), jsxs(Flex, { className: "tokeninfoname tokentext", children: [jsx$2(Flex, { sx: { justifyContent: 'space-between', width: '100%', alignItems: 'center' }, children: jsx$2(Text, { sx: { fontSize: ['12px', '12px', '14px', '16px'] }, children: tokenSymbol }) }), vestEnds && (jsx$2(Flex, { sx: { fontSize: '12px', fontWeight: 400, opacity: 0.6, lineHeight: '14px' }, children: vestEnds }))] }), jsx$2(Flex, { className: "tokeninfofav", sx: {
|
|
67685
67740
|
minWidth: '25px',
|
|
67686
67741
|
p: '5px',
|
|
67687
67742
|
}, children: jsx$2(AddFavToken, { tokenSymbol: tokenSymbol, hotBond: !vestEnds && isHotBond }) })] }), jsx$2(Flex, { sx: {
|
|
67688
67743
|
justifyContent: isHotBond ? 'center' : 'flex-start',
|
|
67689
67744
|
alignItems: 'center',
|
|
67690
|
-
}, children: jsx$2(Flex, { sx: { display: isHotBond ? 'flex' : ['none', 'none', 'none', 'none', 'flex'] }, children: tag && jsx$2(ListTag, { text:
|
|
67745
|
+
}, children: jsx$2(Flex, { sx: { display: isHotBond ? 'flex' : ['none', 'none', 'none', 'none', 'flex'] }, children: (tag || marketingCampaign) && (jsx$2(ListTag, { text: MCTagNameMapping[marketingCampaign] || tag, marketingCampaign: marketingCampaign })) }) })] }));
|
|
67691
67746
|
};
|
|
67692
67747
|
|
|
67693
67748
|
//TODO: remove this shit
|
|
@@ -77090,7 +77145,7 @@ const TokenSelectorModal = ({ bondPrincipalToken, handleCurrencySelect, chainId,
|
|
|
77090
77145
|
}) })] }) }) }));
|
|
77091
77146
|
};
|
|
77092
77147
|
|
|
77093
|
-
const TokenSelectorPanel = ({ typedValue, setTypedValue, selectedToken, bondChainId, handleValueBtn, handleCurrencySelect, enableZap, tokenBalance, selectedTokenPrice, bondPrincipalToken, inputDisabled = false, }) => {
|
|
77148
|
+
const TokenSelectorPanel = ({ typedValue, setTypedValue, selectedToken, bondChainId, handleValueBtn, handleCurrencySelect, enableZap, tokenBalance, selectedTokenPrice, bondPrincipalToken, inputDisabled = false, marketingCampaign, }) => {
|
|
77094
77149
|
var _a, _b;
|
|
77095
77150
|
const { address: account } = useEVMAccount();
|
|
77096
77151
|
const { publicKey: solanaAccount } = useSOLAccount();
|
|
@@ -77101,7 +77156,7 @@ const TokenSelectorPanel = ({ typedValue, setTypedValue, selectedToken, bondChai
|
|
|
77101
77156
|
setTypedValue(event.target.value);
|
|
77102
77157
|
};
|
|
77103
77158
|
const [onTokenSelectorModal] = useModal(jsx$2(TokenSelectorModal, { bondPrincipalToken: bondPrincipalToken, handleCurrencySelect: handleCurrencySelect, chainId: bondChainId }), true, false, `tokenSelectorOnLiquidityModal${(_b = bondPrincipalToken === null || bondPrincipalToken === void 0 ? void 0 : bondPrincipalToken.address) === null || _b === void 0 ? void 0 : _b[bondChainId]}-${bondPrincipalToken === null || bondPrincipalToken === void 0 ? void 0 : bondPrincipalToken.symbol}`);
|
|
77104
|
-
return (jsxs(Flex$1, { className: "token-selector-panel", sx: { borderRadius: 'normal',
|
|
77159
|
+
return (jsxs(Flex$1, { className: "token-selector-panel", sx: { borderRadius: 'normal', background: MCColorMapping.white3[marketingCampaign] }, children: [jsxs(Flex$1, { className: "input-container inputrow", children: [jsx$2(Flex$1, { className: "input-container input", children: jsx$2(Input$1, { placeholder: "0.0", value: typedValue, pattern: "^[0-9]*[.,]?[0-9]*$", onChange: handleInputChange, onInput: (v) => {
|
|
77105
77160
|
if (v.currentTarget.value.includes(',')) {
|
|
77106
77161
|
v.currentTarget.value = v.currentTarget.value.replace(/,/g, '.');
|
|
77107
77162
|
}
|
|
@@ -77115,7 +77170,11 @@ const TokenSelectorPanel = ({ typedValue, setTypedValue, selectedToken, bondChai
|
|
|
77115
77170
|
!!v.currentTarget.value && isNumber$1(v.currentTarget.value) && parseFloat(v.currentTarget.value) >= 0
|
|
77116
77171
|
? v.currentTarget.value
|
|
77117
77172
|
: v.currentTarget.value.slice(0, v.currentTarget.value.length - 1);
|
|
77118
|
-
}, disabled: inputDisabled }) }), jsxs(Flex$1, { className: "input-container token", onClick: () => (enableZap ? onTokenSelectorModal() : null), sx: {
|
|
77173
|
+
}, disabled: inputDisabled }) }), jsxs(Flex$1, { className: "input-container token", onClick: () => (enableZap ? onTokenSelectorModal() : null), sx: {
|
|
77174
|
+
cursor: enableZap ? 'pointer' : 'default',
|
|
77175
|
+
borderRadius: 'normal',
|
|
77176
|
+
background: MCColorMapping.white4[marketingCampaign],
|
|
77177
|
+
}, children: [jsxs(Flex$1, { sx: { alignItems: 'center', gap: '10px' }, children: [jsx$2(Flex$1, { className: "input-container bondicon", children: lodashExports.isArray(splited) ? (jsx$2(TokenImage, { symbol: splited[0], symbol2: splited[1], size: 28, chain: bondChainId })) : (jsx$2(TokenImage, { symbol: getSymbol(selectedToken, bondChainId), size: 28, chain: bondChainId })) }), jsx$2(Flex$1, { className: "title-container tokenname", children: getSymbol(selectedToken, bondChainId) })] }), enableZap && (jsx$2(Flex$1, { sx: { mr: '8px' }, children: jsx$2(Svg, { icon: "caret" }) }))] })] }), jsxs(Flex$1, { className: "input-container balancerow", children: [jsx$2(Flex$1, { sx: { opacity: 0.6 }, children: selectedTokenPrice && typedValue
|
|
77119
77178
|
? `$${formatUSDNumber((selectedTokenPrice * parseFloat(typedValue)).toFixed(2))}`
|
|
77120
77179
|
: '' }), jsxs(Flex$1, { children: [showBalance && jsxs(Flex$1, { className: "balancerow text", children: ["Balance: ", tokenBalanceString] }), jsx$2(Flex$1, { className: "balancerow max", children: showBalance && tokenBalance && tokenBalance !== '0' && handleValueBtn && (jsx$2(Fragment$1, { children: jsx$2(Button, { className: "max-button", onClick: () => { var _a; return handleValueBtn((_a = new BigNumber$1(tokenBalance !== null && tokenBalance !== void 0 ? tokenBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, children: "Max" }) })) })] })] })] }));
|
|
77121
77180
|
};
|
|
@@ -78718,70 +78777,13 @@ const BondModalMinTierHeader = ({ minTier }) => {
|
|
|
78718
78777
|
.filter((tier) => tier !== 'No Tier')
|
|
78719
78778
|
.map((tier, index) => {
|
|
78720
78779
|
if (index + 1 >= minTier) {
|
|
78721
|
-
console.log(index);
|
|
78722
|
-
console.log(tier);
|
|
78723
78780
|
return (jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { sx: { justifyContent: 'center' }, children: tier }), width: "100px", placement: "bottomLeft", transformTip: "translate(1%, -5%)", children: jsx$2("img", { src: `https://ape.bond/images/launch/${tier.toLowerCase()}.png`, alt: "minTier", style: { width: '25px', height: '25px', marginLeft: '3px', zIndex: 1 } }, `tier-logo-${index}`) }, tier));
|
|
78724
78781
|
}
|
|
78725
78782
|
}) })) }));
|
|
78726
78783
|
};
|
|
78727
78784
|
|
|
78728
|
-
// Styles of the row in the bonds list. In other words "/bonds" page.
|
|
78729
|
-
const bondRowCampaignStyles = {
|
|
78730
|
-
[main.BillArtCollection.HotBondingSummer_Collection1]: {
|
|
78731
|
-
backgroundImage: 'url(https://www.ape.bond/images/hotSummerCampaign/fire.png)',
|
|
78732
|
-
backgroundSize: 'cover',
|
|
78733
|
-
},
|
|
78734
|
-
};
|
|
78735
|
-
// Styles of the tag component.
|
|
78736
|
-
const tagCampaignStyles = {
|
|
78737
|
-
[main.BillArtCollection.HotBondingSummer_Collection1]: {
|
|
78738
|
-
background: '#FF5A00',
|
|
78739
|
-
color: '#fff',
|
|
78740
|
-
},
|
|
78741
|
-
};
|
|
78742
|
-
const tagIconCampaignStyles = {
|
|
78743
|
-
[main.BillArtCollection.HotBondingSummer_Collection1]: {
|
|
78744
|
-
display: 'flex',
|
|
78745
|
-
position: 'absolute',
|
|
78746
|
-
right: '-40px',
|
|
78747
|
-
zIndex: 1,
|
|
78748
|
-
backgroundImage: 'url(https://www.ape.bond/images/hotSummerCampaign/fireTag.png)',
|
|
78749
|
-
backgroundSize: 'contain',
|
|
78750
|
-
backgroundRepeat: 'no-repeat',
|
|
78751
|
-
backgroundPosition: 'center',
|
|
78752
|
-
width: '50px',
|
|
78753
|
-
height: '35px',
|
|
78754
|
-
marginRight: '4px',
|
|
78755
|
-
top: '50%',
|
|
78756
|
-
transform: 'translateY(-50%)',
|
|
78757
|
-
},
|
|
78758
|
-
};
|
|
78759
|
-
// Styles of the buy bond modal.
|
|
78760
|
-
const buyComponentStyles = {
|
|
78761
|
-
[main.BillArtCollection.HotBondingSummer_Collection1]: {
|
|
78762
|
-
backgroundImage: 'url(https://www.ape.bond/images/hotSummerCampaign/buyBond.png)',
|
|
78763
|
-
backgroundSize: 'cover',
|
|
78764
|
-
},
|
|
78765
|
-
};
|
|
78766
|
-
// Styles of the token image displayed in the buy bond modal.
|
|
78767
|
-
const tokenImageIconStyles = {
|
|
78768
|
-
[main.BillArtCollection.HotBondingSummer_Collection1]: {
|
|
78769
|
-
display: 'flex',
|
|
78770
|
-
top: '12px',
|
|
78771
|
-
left: '50%',
|
|
78772
|
-
transform: 'translate(-50%, -50%)',
|
|
78773
|
-
width: '55px',
|
|
78774
|
-
height: '90px',
|
|
78775
|
-
zIndex: 1,
|
|
78776
|
-
backgroundImage: 'url(https://www.ape.bond/images/hotSummerCampaign/littleFire.png)',
|
|
78777
|
-
backgroundRepeat: 'no-repeat',
|
|
78778
|
-
backgroundSize: 'contain',
|
|
78779
|
-
backgroundPosition: 'center',
|
|
78780
|
-
},
|
|
78781
|
-
};
|
|
78782
|
-
|
|
78783
78785
|
const BondModalHeader = ({ bondData, onDismiss, showProjectInfoButton, }) => {
|
|
78784
|
-
var _a, _b, _c
|
|
78786
|
+
var _a, _b, _c;
|
|
78785
78787
|
const isMobile = useIsMobile();
|
|
78786
78788
|
const SDKConfig = useSDKConfig();
|
|
78787
78789
|
const [onOpenSlippageModal] = useModal(jsx$2(SlippageModal, { chainId: bondData.chainId }));
|
|
@@ -78811,13 +78813,13 @@ const BondModalHeader = ({ bondData, onDismiss, showProjectInfoButton, }) => {
|
|
|
78811
78813
|
height: '30px',
|
|
78812
78814
|
mb: ['10px', '10px', '10px', '0px'],
|
|
78813
78815
|
justifyContent: ['space-between', 'space-between', 'space-between', 'flex-end'],
|
|
78814
|
-
}, children: [jsx$2(Flex, { sx: { display: ['flex', 'flex', 'flex', 'none'] }, children: jsx$2(BondModalMinTierHeader, { minTier: minTier }) }), jsx$2(Flex, { sx: { cursor: 'pointer' }, children: onDismiss ? (jsxs(Fragment$1, { children: [showProjectInfoButton && jsx$2(ExpandedViewButton, { handleNavigation: handleProjectViewNavigation }), jsx$2(Flex, { sx: { mx: '25px' }, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: isMobile ? '16px' : '20px' }) }), jsx$2(Flex, { onClick: handleClose, children: jsx$2(Svg, { icon: "close", color: "text", width: isMobile ? '12px' : '18px' }) })] })) : (jsx$2(Flex, { sx: { py: '3px', mt: '10px' }, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: isMobile ? '16px' : '20px' }) })) })] }), jsxs(Flex, { sx: { width: '100%' }, children: [jsxs(Flex, { className: "title-container bondicon", children: [jsx$2(Flex, { sx:
|
|
78816
|
+
}, children: [jsx$2(Flex, { sx: { display: ['flex', 'flex', 'flex', 'none'] }, children: jsx$2(BondModalMinTierHeader, { minTier: minTier }) }), jsx$2(Flex, { sx: { cursor: 'pointer' }, children: onDismiss ? (jsxs(Fragment$1, { children: [showProjectInfoButton && jsx$2(ExpandedViewButton, { handleNavigation: handleProjectViewNavigation }), jsx$2(Flex, { sx: { mx: '25px' }, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: isMobile ? '16px' : '20px' }) }), jsx$2(Flex, { onClick: handleClose, children: jsx$2(Svg, { icon: "close", color: "text", width: isMobile ? '12px' : '18px' }) })] })) : (jsx$2(Flex, { sx: { py: '3px', mt: '10px' }, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: isMobile ? '16px' : '20px' }) })) })] }), jsxs(Flex, { sx: { width: '100%' }, children: [jsxs(Flex, { className: "title-container bondicon", children: [jsx$2(Flex, { sx: MCTokenIconStyles[bondData.marketingCampaign] }), jsx$2(TokenImage, { symbol: (_b = bondData.showcaseTokenName) !== null && _b !== void 0 ? _b : bondData.earnToken.symbol, size: 50, chain: bondData.chainId })] }), jsxs(Flex, { sx: {
|
|
78815
78817
|
display: 'flex',
|
|
78816
78818
|
flexDirection: 'column',
|
|
78817
78819
|
pl: ['10px', '10px', '10px', '20px'],
|
|
78818
78820
|
fontSize: '24px',
|
|
78819
78821
|
fontWeight: 700,
|
|
78820
|
-
}, children: [bondData === null || bondData === void 0 ? void 0 : bondData.showcaseTokenName, jsx$2(ListTag, { text: (
|
|
78822
|
+
}, children: [bondData === null || bondData === void 0 ? void 0 : bondData.showcaseTokenName, jsx$2(ListTag, { text: (_c = bondData === null || bondData === void 0 ? void 0 : bondData.tags) === null || _c === void 0 ? void 0 : _c[0] })] }), jsxs(Flex, { className: "title-container price-container", sx: { flexDirection: 'column', pl: ['10px', '10px', '10px', '20px'] }, children: [jsxs(Flex, { className: "price-container price", sx: { fontSize: ['12px', '12px', '12px', '14px'] }, children: ["$", earnTokenPrice(bondData)] }), SDKConfig.useTiers && bondData.billVersion === main.BillVersion.V4 ? (jsxs(Flex, { sx: {
|
|
78821
78823
|
p: '3px 6px',
|
|
78822
78824
|
border: '1px solid #9960C5',
|
|
78823
78825
|
borderRadius: 'normal',
|
|
@@ -78946,6 +78948,7 @@ const BondCards = ({ bondData }) => {
|
|
|
78946
78948
|
borderBottomRightRadius: 'normal',
|
|
78947
78949
|
borderBottomLeftRadius: 'normal',
|
|
78948
78950
|
},
|
|
78951
|
+
background: MCColorMapping.white3[bondData.marketingCampaign],
|
|
78949
78952
|
}, children: [jsxs(Flex, { className: "bond-card-title", children: [SDKConfig.namingPreference, jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: TooltipText.Discount }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2("div", { className: "bond-card-tooltip", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsx$2(BonusComponent, { trueBondPrices: SDKConfig.namingPreference !== 'Discount' ? bondData.trueBondPrices : undefined, minTier: bondData.minTier, tooltipPosition: isMobile ? 'bottomRight' : 'bottomLeft', bonus: SDKConfig.namingPreference === 'Discount' ? `${(_a = bondData === null || bondData === void 0 ? void 0 : bondData.discountWithFee) === null || _a === void 0 ? void 0 : _a.toFixed(2)}%` : undefined })] }), jsxs("div", { className: "bond-card-block", sx: {
|
|
78950
78953
|
borderRadius: ['0px', '0px', '0px', 'normal'],
|
|
78951
78954
|
'&:first-of-type': {
|
|
@@ -78956,6 +78959,7 @@ const BondCards = ({ bondData }) => {
|
|
|
78956
78959
|
borderBottomRightRadius: 'normal',
|
|
78957
78960
|
borderBottomLeftRadius: 'normal',
|
|
78958
78961
|
},
|
|
78962
|
+
background: MCColorMapping.white3[bondData.marketingCampaign],
|
|
78959
78963
|
}, children: [jsxs("div", { className: "bond-card-title", children: ["Terms", jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: TooltipText.Terms }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2("div", { className: "bond-card-tooltip", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsxs("div", { className: "bond-card-content", children: [getVestingTermsString(bondData), bondData.vestingCliff && (jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: getVestingTermsTooltipString(bondData) }), width: "180px", placement: "bottomRight", transformTip: "translate(13%, 0%)", children: jsx$2(Flex, { sx: { opacity: 0.6, ml: '6px' }, children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }))] })] }), jsxs("div", { className: "bond-card-block", sx: {
|
|
78960
78964
|
borderRadius: ['0px', '0px', '0px', 'normal'],
|
|
78961
78965
|
'&:first-of-type': {
|
|
@@ -78966,6 +78970,7 @@ const BondCards = ({ bondData }) => {
|
|
|
78966
78970
|
borderBottomRightRadius: 'normal',
|
|
78967
78971
|
borderBottomLeftRadius: 'normal',
|
|
78968
78972
|
},
|
|
78973
|
+
background: MCColorMapping.white3[bondData.marketingCampaign],
|
|
78969
78974
|
}, children: [jsxs("div", { className: "bond-card-title", children: ["Max Buy", jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: TooltipText.MaxBuy((_b = bondData === null || bondData === void 0 ? void 0 : bondData.earnToken) === null || _b === void 0 ? void 0 : _b.symbol) }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2("div", { className: "bond-card-tooltip", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsxs(Flex, { className: "bond-card-content", sx: { alignItems: 'center' }, children: [jsx$2("div", { style: { paddingRight: '3px' }, children: jsx$2(TokenImage, { symbol: (_c = bondData.showcaseTokenName) !== null && _c !== void 0 ? _c : bondData.earnToken.symbol, size: 22, chain: bondData.chainId }) }), formatNumberSI(maxBuy(bondData, SDKConfig.showLowValueBonds).toFixed(0), 2)] })] }), jsxs("div", { className: "bond-card-block", sx: {
|
|
78970
78975
|
borderRadius: ['0px', '0px', '0px', 'normal'],
|
|
78971
78976
|
'&:first-of-type': {
|
|
@@ -78976,6 +78981,7 @@ const BondCards = ({ bondData }) => {
|
|
|
78976
78981
|
borderBottomRightRadius: 'normal',
|
|
78977
78982
|
borderBottomLeftRadius: 'normal',
|
|
78978
78983
|
},
|
|
78984
|
+
background: MCColorMapping.white3[bondData.marketingCampaign],
|
|
78979
78985
|
}, children: [jsxs(Flex, { className: "bond-card-title", children: ["Tokens Remaining", jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: TooltipText.TokensRemaining }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2("div", { className: "bond-card-tooltip", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsx$2(ProgressBarWrapper$1, { title: '', value: jsx$2(ProgressBar, { value: remainingPercentage(bondData) }), style: {
|
|
78980
78986
|
width: '127px',
|
|
78981
78987
|
height: '25px',
|
|
@@ -79158,7 +79164,7 @@ const GetUpToComponent = ({ bond, depositAmount }) => {
|
|
|
79158
79164
|
zIndex: 0,
|
|
79159
79165
|
background: '#9960C5',
|
|
79160
79166
|
opacity: 0.2,
|
|
79161
|
-
} }), jsxs(Flex, { sx: { alignItems: 'center', display: ['ruby', 'ruby', 'ruby', 'flex'] }, children: [jsx$2("img", { src: `https://ape.bond/images/launch/
|
|
79167
|
+
} }), jsxs(Flex, { sx: { alignItems: 'center', display: ['ruby', 'ruby', 'ruby', 'flex'] }, children: [jsx$2("img", { src: `https://ape.bond/images/launch/mythical.png`, alt: "minTier", style: { width: '21px', height: '21px', marginRight: '3px', zIndex: 1 } }), "Get up to", jsx$2(Flex, { sx: { color: 'success', mx: '3px', fontWeight: 700 }, children: `+${(_a = trueBondPrice === null || trueBondPrice === void 0 ? void 0 : trueBondPrice.boost) !== null && _a !== void 0 ? _a : 0}%` }), "Boost By locking ABOND"] }), !!depositAmount && parseFloat(depositAmount) !== 0 && (jsxs(Flex, { sx: { color: 'success', fontWeight: 700, minWidth: '65px', justifyContent: 'flex-end' }, children: ["$ ", formatUSDNumber(boostAmount.toString()), jsx$2(Flex, { sx: { ml: '4px' }, children: jsx$2(Svg, { icon: "caret", direction: isOpen ? 'up' : 'down' }) })] }))] }), jsx$2(AnimatePresence, { children: isOpen && (jsx$2(motion.div, { initial: { height: 0 }, animate: { height: 'fit-content' }, transition: { opacity: { duration: 0.2 } }, exit: { height: 0 }, sx: { overflow: 'hidden', width: '100%', marginTop: '5px' }, children: jsx$2(BonusTable, { trueBondPrices: bond === null || bond === void 0 ? void 0 : bond.trueBondPrices, minTier: bond.minTier, hideTitle: true }) })) })] })));
|
|
79162
79168
|
};
|
|
79163
79169
|
|
|
79164
79170
|
const StepBubble = ({ number, title, currentStep, hideBar, loading, }) => {
|
|
@@ -79338,7 +79344,9 @@ const TransactionModal = ({ onDismiss, txChain, approvalState, approveCallback,
|
|
|
79338
79344
|
}, [buyTxHash, txReceipt, isSuccess]);
|
|
79339
79345
|
const currentStep = showSwitchChainFlow ? (hasToSwitchChain ? 1 : hasToApprove ? 2 : 3) : hasToApprove ? 1 : 2;
|
|
79340
79346
|
const splited = typeof inputToken !== 'string' ? (_d = inputToken === null || inputToken === void 0 ? void 0 : inputToken.symbol) === null || _d === void 0 ? void 0 : _d.split('-') : undefined;
|
|
79341
|
-
const trueBondPrice = findHighestTrueBondPrice(
|
|
79347
|
+
const trueBondPrice = findHighestTrueBondPrice(
|
|
79348
|
+
// @ts-ignore
|
|
79349
|
+
(_e = TIERS_WEIGHT[getUserTier(userPoints)]) !== null && _e !== void 0 ? _e : '0', bondData === null || bondData === void 0 ? void 0 : bondData.trueBondPrices);
|
|
79342
79350
|
return (jsxs(Modal, { children: [jsx$2(ModalHeader, { onDismiss: onDismiss, hideDivider: true }), jsxs(Flex, { sx: { flexDirection: 'column', width: '100%' }, children: [jsxs(Flex, { sx: { width: '100%', alignItems: 'center', p: '10px' }, children: [showSwitchChainFlow && (jsx$2(StepBubble, { number: 1, title: 'Switch Chain', currentStep: currentStep, loading: loadingSwitchChain })), jsx$2(StepBubble, { number: showSwitchChainFlow ? 2 : 1, title: 'Approve', currentStep: currentStep, loading: approveLoading || approvalState === ApprovalState.PENDING }), jsx$2(StepBubble, { number: showSwitchChainFlow ? 3 : 2, title: 'Buy', currentStep: currentStep, loading: loadingTx || verifyingTx, hideBar: true })] }), jsx$2(Flex, { sx: { width: '100%', mt: '40px', justifyContent: 'center' }, children: jsx$2(LoadingSpinner, { isLoading: loadingSwitchChain ||
|
|
79343
79351
|
approveLoading ||
|
|
79344
79352
|
loadingTx ||
|
|
@@ -79389,7 +79397,7 @@ const TransactionModal = ({ onDismiss, txChain, approvalState, approveCallback,
|
|
|
79389
79397
|
};
|
|
79390
79398
|
|
|
79391
79399
|
const BuyComponent = ({ onDismiss, bondAddress, bondChain, handlePurchasedBond, isProjectView, }) => {
|
|
79392
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
79400
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
79393
79401
|
// Hooks
|
|
79394
79402
|
const SDKConfig = useSDKConfig();
|
|
79395
79403
|
const userChainId = useChainId();
|
|
@@ -79646,7 +79654,7 @@ const BuyComponent = ({ onDismiss, bondAddress, bondChain, handlePurchasedBond,
|
|
|
79646
79654
|
}
|
|
79647
79655
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
79648
79656
|
}, [rateChanged]);
|
|
79649
|
-
return bondData ? (jsx$2(Flex, { className: "modal-content", sx: Object.assign({},
|
|
79657
|
+
return bondData ? (jsx$2(Flex, { className: "modal-content", sx: Object.assign({}, MCBuyComponentStyles[bondData === null || bondData === void 0 ? void 0 : bondData.marketingCampaign]), children: jsxs(Flex, { className: "modaltable-container", children: [jsx$2(BondModalHeader, { bondData: bondData, onDismiss: onDismiss, showProjectInfoButton: (SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.referenceId) === 'apebond' }), jsx$2(ProjectDescription, { description: bondData.shortDescription, isProjectView: true }), jsx$2(Flex, { sx: { width: '100%', display: isProjectView ? ['flex', 'flex', 'flex', 'none'] : 'flex' }, children: jsx$2(BondCards, { bondData: bondData }) }), jsx$2(Estimations, { depositAmount: depositAmount, bondData: bondData, youSpendString: youSpendString, isZap: isZap, fetchingZapQuote: fetchingZapQuote, zapError: zapError }), jsx$2(TokenSelectorPanel, { typedValue: inputValue, setTypedValue: setInputValue, selectedToken: inputToken, handleValueBtn: () => { var _a; return setInputValue((_a = new BigNumber$1(inputCurrencyBalance !== null && inputCurrencyBalance !== void 0 ? inputCurrencyBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, handleCurrencySelect: handleCurrencySelect, bondChainId: bondData === null || bondData === void 0 ? void 0 : bondData.chainId, enableZap: zapEnabled, bondPrincipalToken: bondData === null || bondData === void 0 ? void 0 : bondData.lpToken, tokenBalance: inputCurrencyBalance, selectedTokenPrice: inputTokenPrice, inputDisabled: isUserRestricted, marketingCampaign: bondData === null || bondData === void 0 ? void 0 : bondData.marketingCampaign }), SDKConfig.useTiers && jsx$2(GetUpToComponent, { bond: bondData, depositAmount: depositAmount }), (bondData === null || bondData === void 0 ? void 0 : bondData.warningCard) && (jsx$2(Flex, { sx: {
|
|
79650
79658
|
width: '100%',
|
|
79651
79659
|
background: '#DE62F366',
|
|
79652
79660
|
// justifyContent: 'center',
|
|
@@ -80610,7 +80618,7 @@ const ConnectSolanaWallet = ({ navBarFlag }) => {
|
|
|
80610
80618
|
};
|
|
80611
80619
|
|
|
80612
80620
|
const BuyComponentSolana = ({ onDismiss, bondAddress, bondChain, isProjectView, setBillId, }) => {
|
|
80613
|
-
var _a, _b, _c, _d, _e, _f
|
|
80621
|
+
var _a, _b, _c, _d, _e, _f;
|
|
80614
80622
|
const SDKConfig = useSDKConfig();
|
|
80615
80623
|
// Hooks
|
|
80616
80624
|
const { publicKey: accountSolana, signTransaction } = useSOLAccount();
|
|
@@ -81104,7 +81112,7 @@ const BuyComponentSolana = ({ onDismiss, bondAddress, bondChain, isProjectView,
|
|
|
81104
81112
|
}
|
|
81105
81113
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
81106
81114
|
}, [inputCurrencyBalance, zapListFetched]);
|
|
81107
|
-
return bondData ? (jsx$2(Flex, { className: "modal-content", sx: Object.assign({},
|
|
81115
|
+
return bondData ? (jsx$2(Flex, { className: "modal-content", sx: Object.assign({}, MCBuyComponentStyles[bondData === null || bondData === void 0 ? void 0 : bondData.marketingCampaign]), children: jsxs(Flex, { className: "modaltable-container", children: [jsx$2(BondModalHeader, { bondData: bondData, onDismiss: onDismiss }), jsx$2(ProjectDescription, { description: bondData.shortDescription, isProjectView: true }), jsx$2(Flex, { sx: { width: '100%', display: isProjectView ? ['flex', 'flex', 'flex', 'none'] : 'flex' }, children: jsx$2(BondCards, { bondData: bondData }) }), jsx$2(Estimations, { depositAmount: depositAmount, bondData: bondData, youSpendString: youSpendString, isZap: isZap, fetchingZapQuote: fetchingZapQuote, zapError: zapError }), jsx$2(TokenSelectorPanel, { typedValue: inputValue, setTypedValue: setInputValue, selectedToken: inputToken, handleValueBtn: () => { var _a; return setInputValue((_a = new BigNumber$1(inputCurrencyBalance !== null && inputCurrencyBalance !== void 0 ? inputCurrencyBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, handleCurrencySelect: handleCurrencySelect, bondChainId: bondData === null || bondData === void 0 ? void 0 : bondData.chainId, enableZap: true, bondPrincipalToken: bondData === null || bondData === void 0 ? void 0 : bondData.lpToken, tokenBalance: inputCurrencyBalance !== null && inputCurrencyBalance !== void 0 ? inputCurrencyBalance : undefined, selectedTokenPrice: inputTokenPrice }), (bondData === null || bondData === void 0 ? void 0 : bondData.warningCard) && (jsx$2(Flex, { sx: {
|
|
81108
81116
|
width: '100%',
|
|
81109
81117
|
background: '#DE62F366',
|
|
81110
81118
|
justifyContent: 'center',
|
|
@@ -81114,7 +81122,7 @@ const BuyComponentSolana = ({ onDismiss, bondAddress, bondChain, isProjectView,
|
|
|
81114
81122
|
}, children: jsxs(Text, { sx: { fontSize: '12px', fontWeight: 400, display: 'flex', alignItems: 'center', gap: '10px' }, children: [jsx$2(SafeHTMLComponent, { html: bondData === null || bondData === void 0 ? void 0 : bondData.warningCard }), (bondData === null || bondData === void 0 ? void 0 : bondData.chainId) === main.ChainId.SONIC && (bondData === null || bondData === void 0 ? void 0 : bondData.earnToken.symbol.toLowerCase()) === 'moon' && (jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Text, { sx: { textTransform: 'none' }, children: "Open the 'cog' icon menu in the top right and set the Slippage Tolerance to 5% or more." }), width: "315px", placement: "topRight", transformTip: "translate(9%, -10%)", children: jsx$2(Svg, { icon: "questionCircle", width: 14, color: "textDisabledButton" }) }))] }) })), jsx$2(Flex, { className: "modaltable-container button-container", children: jsx$2(Flex, { className: "button-container buy", children: !accountSolana ? (jsx$2(ConnectSolanaWallet, {})) : (jsxs(Flex, { sx: { width: '100%', gap: '10px', flexDirection: ['column', 'column', 'column', 'row'] }, children: [jsxs(Button, { variant: "secondary", onClick: () => {
|
|
81115
81123
|
var _a, _b;
|
|
81116
81124
|
return window.open(`https://jumper.exchange/?fromChain=1151111081099710&fromToken=11111111111111111111111111111111&toChain=1151111081099710&toToken=${(_b = (_a = bondData === null || bondData === void 0 ? void 0 : bondData.lpToken) === null || _a === void 0 ? void 0 : _a.address) === null || _b === void 0 ? void 0 : _b[bondData === null || bondData === void 0 ? void 0 : bondData.chainId]}`, '_blank', 'noopener noreferrer');
|
|
81117
|
-
}, sx: { width: ['100%', '100%', '100%', '35%'] }, children: ["get ", (
|
|
81125
|
+
}, sx: { width: ['100%', '100%', '100%', '35%'] }, children: ["get ", (_f = bondData === null || bondData === void 0 ? void 0 : bondData.lpToken) === null || _f === void 0 ? void 0 : _f.symbol] }), jsx$2(Button, { className: "action-button", load: load, disabled: load ||
|
|
81118
81126
|
(bondData === null || bondData === void 0 ? void 0 : bondData.soldOut) ||
|
|
81119
81127
|
!accountSolana ||
|
|
81120
81128
|
!inputValue ||
|
|
@@ -81703,7 +81711,7 @@ const BonusContainer = ({ trueBondPrices, minTier, bonus, airdropTooltip, toolti
|
|
|
81703
81711
|
return (jsx$2("div", { className: `discount-column`, children: jsx$2(BonusComponent, { trueBondPrices: trueBondPrices, minTier: minTier, bonus: bonus, airdropTooltip: airdropTooltip, tooltipPosition: isMobile ? tooltipPosition : 'bottomLeft' }) }));
|
|
81704
81712
|
};
|
|
81705
81713
|
|
|
81706
|
-
const BondRow = ({ bondAddress, bondChain,
|
|
81714
|
+
const BondRow = ({ bondAddress, bondChain, marketingCampaign, payoutToken, billType, tag, bondSoldOut, trueBondPrices, minTier, bonus, airdropTooltip, vestingTermString, vestingCliffString, percentageAvailable, remainingTokensString, projectURL, twitterURL, auditURL, shortDescription, soldoutBondsCount, isOpen, }) => {
|
|
81707
81715
|
var _a, _b, _c;
|
|
81708
81716
|
const SDKConfig = useSDKConfig();
|
|
81709
81717
|
const locationPath = window.location.pathname.replace('/', '');
|
|
@@ -81733,7 +81741,7 @@ const BondRow = ({ bondAddress, bondChain, billArtCollection, payoutToken, billT
|
|
|
81733
81741
|
});
|
|
81734
81742
|
};
|
|
81735
81743
|
return (jsxs("div", { className: "bond-row" // Insert special campaign styles here
|
|
81736
|
-
, onClick: handleOpenModal, sx: Object.assign(Object.assign({ borderRadius: 'normal' },
|
|
81744
|
+
, onClick: handleOpenModal, sx: Object.assign(Object.assign({ borderRadius: 'normal' }, MCBondRowStyles[marketingCampaign]), { cursor: !bondSoldOut || (soldoutBondsCount && !isOpen) ? 'pointer' : 'default' }), children: [jsx$2("div", { className: "token-info-container", sx: { width: ['40%', '40%', '40%', '30%'] }, children: jsx$2(TokenInfoAndName, { tokenSymbol: payoutToken === null || payoutToken === void 0 ? void 0 : payoutToken.symbol, chain: bondChain, tag: tag, marketingCampaign: marketingCampaign }) }), SDKConfig.useCardsView && shortDescription && (jsx$2("div", { className: "short-description", children: jsx$2(SafeHTMLComponent, { html: shortDescription }) })), jsxs("div", { className: "bond-info-columns", sx: { width: ['60%', '60%', '60%', '70%'] }, children: [!SDKConfig.useCardsView && jsx$2(Flex, { sx: { display: ['none', 'none', 'none', 'flex'], width: '125px' } }), jsx$2(BonusContainer, { trueBondPrices: trueBondPrices, minTier: minTier, bonus: bonus, airdropTooltip: airdropTooltip }), jsxs("div", { className: "terms-column", children: [vestingTermString, vestingCliffString && (jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: vestingCliffString }), width: "180px", placement: "bottomRight", transformTip: "translate(13%, 0%)", children: jsx$2(Flex, { sx: { opacity: 0.6, ml: '6px' }, children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }))] }), jsx$2("div", { className: "tokens-remaining-column", children: bondSoldOut ? ('-') : (jsx$2(ProgressBarWrapper$1, { title: '', value: jsx$2(ProgressBar, { value: percentageAvailable }), style: {
|
|
81737
81745
|
width: '127px',
|
|
81738
81746
|
height: '25px',
|
|
81739
81747
|
flexDirection: 'column',
|
|
@@ -81742,46 +81750,33 @@ const BondRow = ({ bondAddress, bondChain, billArtCollection, payoutToken, billT
|
|
|
81742
81750
|
}, showTooltip: true, toolTip: remainingTokensString })) }), jsx$2("div", { className: "tooltip-column", children: soldoutBondsCount ? (jsxs(Flex, { sx: { gap: '5px', fontSize: '13px', fontWeight: 500, opacity: 0.5 }, children: ["(", soldoutBondsCount, ")", jsx$2(Svg, { icon: "caret", direction: isOpen ? 'up' : 'down', width: "8px" })] })) : (jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(BondInfoTooltip, { earnTokenContract: (_b = (_a = payoutToken === null || payoutToken === void 0 ? void 0 : payoutToken.address) === null || _a === void 0 ? void 0 : _a[bondChain]) !== null && _b !== void 0 ? _b : '', earnTokenSymbol: (_c = payoutToken === null || payoutToken === void 0 ? void 0 : payoutToken.symbol) !== null && _c !== void 0 ? _c : '', bondContract: bondAddress !== null && bondAddress !== void 0 ? bondAddress : '', projectLink: projectURL, twitter: twitterURL, audit: auditURL, chain: bondChain, isSoldOut: bondSoldOut, billType: billType }), width: "205px", placement: "bottomRight", transformTip: "translate(7%, -2%)", children: jsx$2(Flex, { className: "more-icon", sx: { opacity: 0.8 }, children: jsx$2(Svg, { icon: "more", width: "25px" }) }) })) })] })] }, `${bondAddress}-${bondChain}`));
|
|
81743
81751
|
};
|
|
81744
81752
|
|
|
81745
|
-
|
|
81746
|
-
if (!account)
|
|
81747
|
-
return null;
|
|
81748
|
-
const { data } = yield axios.get(`https://dashboard-api.ape.bond/collector/userSalesInfo/purchased/${account}`);
|
|
81749
|
-
return data;
|
|
81750
|
-
});
|
|
81751
|
-
function useUserApiStats() {
|
|
81752
|
-
const { address: account } = useEVMAccount();
|
|
81753
|
-
return useQuery({
|
|
81754
|
-
queryKey: [`${QUERY_KEYS.USER_STATS}-${account}`],
|
|
81755
|
-
queryFn: () => getUserApiStats(account),
|
|
81756
|
-
staleTime: Infinity,
|
|
81757
|
-
refetchOnWindowFocus: false,
|
|
81758
|
-
refetchOnMount: false,
|
|
81759
|
-
retry: 1,
|
|
81760
|
-
});
|
|
81761
|
-
}
|
|
81762
|
-
|
|
81753
|
+
// import useUserApiStats from '../../../../state/bondApiStats/useUserApiStats'
|
|
81763
81754
|
const BuyAgainRow = () => {
|
|
81764
81755
|
var _a, _b, _c;
|
|
81765
|
-
const { data: userData } = useUserApiStats()
|
|
81756
|
+
// const { data: userData } = useUserApiStats()
|
|
81766
81757
|
const { data: bills } = useBondsData();
|
|
81767
81758
|
const SDKConfig = useSDKConfig();
|
|
81768
81759
|
const chains = SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.chains;
|
|
81769
|
-
const bond = useMemo(() => {
|
|
81770
|
-
|
|
81771
|
-
|
|
81772
|
-
|
|
81773
|
-
|
|
81774
|
-
|
|
81775
|
-
|
|
81776
|
-
|
|
81777
|
-
|
|
81778
|
-
|
|
81779
|
-
|
|
81780
|
-
|
|
81781
|
-
|
|
81782
|
-
|
|
81783
|
-
|
|
81784
|
-
|
|
81760
|
+
// const bond = useMemo(() => {
|
|
81761
|
+
// if (userData && userData?.Sales.length > 0) {
|
|
81762
|
+
// const sortedPurchases = userData?.Sales.sort((a, b) => b.dollarValue - a.dollarValue)
|
|
81763
|
+
// const activeBills = bills?.filter(
|
|
81764
|
+
// (bill) => !isBondSoldOut(bill, SDKConfig.showLowValueBonds) && chains?.includes(bill.chainId),
|
|
81765
|
+
// )
|
|
81766
|
+
// const highestActivePurchase = sortedPurchases?.find((purchase) =>
|
|
81767
|
+
// activeBills?.find((bill) => {
|
|
81768
|
+
// if (purchase.contractAddress.toLowerCase() === bill?.contractAddress?.[bill.chainId]?.toLowerCase())
|
|
81769
|
+
// return true
|
|
81770
|
+
// }),
|
|
81771
|
+
// )
|
|
81772
|
+
// return activeBills?.find(
|
|
81773
|
+
// (bill) =>
|
|
81774
|
+
// bill?.contractAddress?.[bill.chainId]?.toLowerCase() ===
|
|
81775
|
+
// highestActivePurchase?.contractAddress?.toLowerCase(),
|
|
81776
|
+
// )
|
|
81777
|
+
// }
|
|
81778
|
+
// }, [SDKConfig.showLowValueBonds, bills, chains, userData])
|
|
81779
|
+
const bond = useMemo(() => bills === null || bills === void 0 ? void 0 : bills.find((bill) => bill.earnToken.symbol === 'pmUSD' && !bill.soldOut && chains.includes(bill.chainId)), [bills, chains]);
|
|
81785
81780
|
const bondAddress = (_a = bond === null || bond === void 0 ? void 0 : bond.contractAddress) === null || _a === void 0 ? void 0 : _a[bond.chainId];
|
|
81786
81781
|
const remainingTokensFormat = (bond) => {
|
|
81787
81782
|
const tokensRemaining = 'tokensRemaining' in bond ? bond.tokensRemaining : '0';
|
|
@@ -81816,7 +81811,7 @@ const BuyAgainRow = () => {
|
|
|
81816
81811
|
pl: '26px',
|
|
81817
81812
|
color: 'primaryBright',
|
|
81818
81813
|
height: '91px',
|
|
81819
|
-
}, children: "
|
|
81814
|
+
}, children: "BOND SPOTLIGHT" }) }), jsx$2(Flex, { onClick: () => {
|
|
81820
81815
|
track({
|
|
81821
81816
|
event: 'buyAgainClick',
|
|
81822
81817
|
chain: bond.chainId,
|
|
@@ -87212,7 +87207,7 @@ const ActiveBondRows = ({ chain, bonds, hideTitles, showHotBonds }) => {
|
|
|
87212
87207
|
marginTop: '0px',
|
|
87213
87208
|
}, className: "bonds-card-container", children: [[main.ChainId.SOL, main.ChainId.MONAD].includes(chain) && !hideTitles && jsx$2(ChainBanner, { chainId: chain }), bonds === null || bonds === void 0 ? void 0 : bonds.map((bondFromMap, index) => {
|
|
87214
87209
|
// PRE TGE ROWS
|
|
87215
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x
|
|
87210
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
87216
87211
|
if (bondFromMap.billType === 'fcfs') {
|
|
87217
87212
|
const bond = bondFromMap;
|
|
87218
87213
|
const totalPrincipalBilled = Math.round(getBalanceNumber(new BigNumber$1((_a = bond === null || bond === void 0 ? void 0 : bond.totalPrincipalBilled) !== null && _a !== void 0 ? _a : '0'), (_c = (_b = bond === null || bond === void 0 ? void 0 : bond.lpToken) === null || _b === void 0 ? void 0 : _b.decimals) === null || _c === void 0 ? void 0 : _c[bond === null || bond === void 0 ? void 0 : bond.chainId])) / ((_d = bond.initPrice) !== null && _d !== void 0 ? _d : 0);
|
|
@@ -87228,40 +87223,40 @@ const ActiveBondRows = ({ chain, bonds, hideTitles, showHotBonds }) => {
|
|
|
87228
87223
|
const now = new Date().getTime();
|
|
87229
87224
|
const saleFinishTime = ((_r = bond === null || bond === void 0 ? void 0 : bond.finishTime) !== null && _r !== void 0 ? _r : 0) * 1000;
|
|
87230
87225
|
const saleHasFinished = now > saleFinishTime || bond.finalized;
|
|
87231
|
-
return (jsx$2(BondRow, { bondAddress: (_s = bond.contractAddress) === null || _s === void 0 ? void 0 : _s[bond.chainId], bondChain: bond.chainId,
|
|
87226
|
+
return (jsx$2(BondRow, { bondAddress: (_s = bond.contractAddress) === null || _s === void 0 ? void 0 : _s[bond.chainId], bondChain: bond.chainId, marketingCampaign: bond.marketingCampaign, payoutToken: bond.earnToken, billType: bond.billType, tag: (_t = bond.tags) === null || _t === void 0 ? void 0 : _t[0], bonus: saleHasFinished ? undefined : `${bonus}%`, airdropTooltip: bond.airdropTooltip, percentageAvailable: percentageAvailable, remainingTokensString: saleHasFinished
|
|
87232
87227
|
? `0 ${earnToken} ($0) `
|
|
87233
87228
|
: `${formatNumberSI(tokensRemaining, 0)} ${earnToken} ($${formatNumberSI(tokensRemainingUSD, 2)})`, vestingTermString: saleHasFinished
|
|
87234
87229
|
? '-'
|
|
87235
87230
|
: initialRelease === 100
|
|
87236
87231
|
? `0 D`
|
|
87237
|
-
: `${getTimePeriods((
|
|
87232
|
+
: `${getTimePeriods((_u = bond.vestingTerm) !== null && _u !== void 0 ? _u : 0).months} Mo`, projectURL: bond.projectLink, twitterURL: bond.twitter, auditURL: bond.audit, bondSoldOut: saleHasFinished, shortDescription: bond.shortDescription }, `${bond.contractAddress}-${bond.chainId}-${index}`));
|
|
87238
87233
|
}
|
|
87239
87234
|
else {
|
|
87240
87235
|
// POST TGE BONDS AKA NORMAL BONDS
|
|
87241
87236
|
const bond = bondFromMap;
|
|
87242
|
-
const bondAddress = (
|
|
87237
|
+
const bondAddress = (_v = bond === null || bond === void 0 ? void 0 : bond.contractAddress) === null || _v === void 0 ? void 0 : _v[bond === null || bond === void 0 ? void 0 : bond.chainId];
|
|
87243
87238
|
const remainingTokensString = getRemainingTokensString(bond);
|
|
87244
|
-
return (jsx$2(BondRow, { bondAddress: bondAddress, bondChain: bond.chainId,
|
|
87239
|
+
return (jsx$2(BondRow, { bondAddress: bondAddress, bondChain: bond.chainId, marketingCampaign: bond.marketingCampaign, payoutToken: bond.earnToken, billType: bond.billType, tag: (_w = bond.tags) === null || _w === void 0 ? void 0 : _w[0], trueBondPrices: namingPreference === 'Bonus' ? bond.trueBondPrices : undefined, minTier: bond === null || bond === void 0 ? void 0 : bond.minTier, vestingTermString: getVestingTermsString(bond), vestingCliffString: getVestingTermsTooltipString(bond), percentageAvailable: remainingPercentage(bond), remainingTokensString: remainingTokensString, projectURL: bond.projectLink, twitterURL: bond.twitter, auditURL: bond.audit, bonus: namingPreference === 'Discount' ? `${(_x = bond === null || bond === void 0 ? void 0 : bond.discountWithFee) === null || _x === void 0 ? void 0 : _x.toFixed(2)}%` : undefined, shortDescription: bond.shortDescription }, `${bondAddress}-${bond.chainId}-${index}`));
|
|
87245
87240
|
}
|
|
87246
87241
|
}), showHotBonds && (jsx$2(SwiperProvider, { children: jsx$2(HotBondCards, {}) }))] }, key))] }) }, key));
|
|
87247
87242
|
};
|
|
87248
87243
|
|
|
87249
87244
|
const SoldOutRows = ({ bonds }) => {
|
|
87250
|
-
var _a, _b
|
|
87245
|
+
var _a, _b;
|
|
87251
87246
|
const bond = bonds[0];
|
|
87252
87247
|
const [isOpen, setIsOpen] = useState(false);
|
|
87253
|
-
return (jsxs(AnimatePresence, { initial: false, children: [jsx$2(Flex, { sx: { cursor: 'pointer' }, onClick: () => setIsOpen(!isOpen), children: jsx$2(BondRow, { bondAddress: (_a = bond.contractAddress) === null || _a === void 0 ? void 0 : _a[bond.chainId],
|
|
87248
|
+
return (jsxs(AnimatePresence, { initial: false, children: [jsx$2(Flex, { sx: { cursor: 'pointer' }, onClick: () => setIsOpen(!isOpen), children: jsx$2(BondRow, { bondAddress: (_a = bond.contractAddress) === null || _a === void 0 ? void 0 : _a[bond.chainId], marketingCampaign: bond.marketingCampaign, bondChain: bond.chainId, payoutToken: bond.earnToken, billType: bond.billType, tag: (_b = bond.tags) === null || _b === void 0 ? void 0 : _b[0], bondSoldOut: true, percentageAvailable: 100, remainingTokensString: `${formatNumberSI(0, 0)} ${bond.earnToken.symbol} ($${formatNumberSI(0, 2)})`, vestingTermString: "-", projectURL: bond.projectLink, twitterURL: bond.twitter, auditURL: bond.audit, shortDescription: bond.shortDescription, soldoutBondsCount: bonds.length > 1 ? bonds.length : undefined, isOpen: isOpen }, `${bond.contractAddress[bond.chainId]}-${bond.chainId}`) }), bonds.length > 1 &&
|
|
87254
87249
|
isOpen &&
|
|
87255
87250
|
bonds
|
|
87256
87251
|
.sort((a, b) => { var _a, _b, _c, _d; return ((_b = (_a = b === null || b === void 0 ? void 0 : b.initTime) === null || _a === void 0 ? void 0 : _a[b.chainId]) !== null && _b !== void 0 ? _b : 0) - ((_d = (_c = a === null || a === void 0 ? void 0 : a.initTime) === null || _c === void 0 ? void 0 : _c[a.chainId]) !== null && _d !== void 0 ? _d : 0); })
|
|
87257
87252
|
.map((bond) => {
|
|
87258
|
-
var _a, _b
|
|
87253
|
+
var _a, _b;
|
|
87259
87254
|
return (jsx$2(motion.div, { initial: { height: 0, overflow: 'hidden' }, animate: { height: 'fit-content', overflow: 'hidden', transitionEnd: { overflow: 'visible' } }, exit: { height: 0, overflow: 'hidden' }, sx: {
|
|
87260
87255
|
position: 'relative',
|
|
87261
87256
|
overflow: 'hidden',
|
|
87262
87257
|
width: '100%',
|
|
87263
87258
|
marginTop: '0px',
|
|
87264
|
-
}, className: "bonds-card-container", children: jsxs(Flex, { sx: { cursor: 'pointer' }, onClick: () => setIsOpen(!isOpen), children: [jsx$2(Flex, { sx: { alignItems: 'center', pb: '10px' }, children: jsx$2(Svg, { icon: "turnArrow", direction: 'up' }) }), jsx$2(BondRow, { bondAddress: (_a = bond.contractAddress) === null || _a === void 0 ? void 0 : _a[bond.chainId],
|
|
87259
|
+
}, className: "bonds-card-container", children: jsxs(Flex, { sx: { cursor: 'pointer' }, onClick: () => setIsOpen(!isOpen), children: [jsx$2(Flex, { sx: { alignItems: 'center', pb: '10px' }, children: jsx$2(Svg, { icon: "turnArrow", direction: 'up' }) }), jsx$2(BondRow, { bondAddress: (_a = bond.contractAddress) === null || _a === void 0 ? void 0 : _a[bond.chainId], marketingCampaign: bond.marketingCampaign, bondChain: bond.chainId, payoutToken: bond.earnToken, billType: bond.billType, tag: (_b = bond.tags) === null || _b === void 0 ? void 0 : _b[0], bondSoldOut: true, percentageAvailable: 100, remainingTokensString: `${formatNumberSI(0, 0)} ${bond.earnToken.symbol} ($${formatNumberSI(0, 2)})`, vestingTermString: "-", projectURL: bond.projectLink, twitterURL: bond.twitter, auditURL: bond.audit, shortDescription: bond.shortDescription })] }) }, `${bond.contractAddress[bond.chainId]}-${bond.chainId}`));
|
|
87265
87260
|
})] }));
|
|
87266
87261
|
};
|
|
87267
87262
|
|
|
@@ -87637,8 +87632,8 @@ const SelectItem = (_a) => {
|
|
|
87637
87632
|
}, children: jsx$2(Flex, { sx: style, children: children }) })));
|
|
87638
87633
|
};
|
|
87639
87634
|
|
|
87640
|
-
const ListTag = ({ text = '',
|
|
87641
|
-
return (
|
|
87635
|
+
const ListTag = ({ text = '', marketingCampaign }) => {
|
|
87636
|
+
return (jsx$2(Flex, { sx: { position: 'relative' }, children: jsx$2(Flex, { sx: Object.assign({ background: '#3C6AB530', color: '#3b78d3', fontSize: '10px', fontWeight: 600, lineHeight: '15px', p: '2px 6px', borderRadius: '5px', width: 'fit-content', zIndex: 2 }, MCTagStyles[marketingCampaign]), children: text.toUpperCase() }) }));
|
|
87642
87637
|
};
|
|
87643
87638
|
|
|
87644
87639
|
const Context = createContext$1({
|
|
@@ -21,6 +21,6 @@ export declare const TIERS_NAMES: {
|
|
|
21
21
|
4: string;
|
|
22
22
|
5: string;
|
|
23
23
|
};
|
|
24
|
-
export declare const getUserTier: (weight
|
|
24
|
+
export declare const getUserTier: (weight?: string | null) => LaunchBondTiers | null;
|
|
25
25
|
export declare const fetchUserPoints: (account?: string, useTiers?: boolean, apiUrl?: string) => Promise<string | null>;
|
|
26
26
|
export default function useTierPoints(): import("@tanstack/react-query").UseQueryResult<string | null, Error>;
|
package/dist/styles.css
CHANGED
|
@@ -73,18 +73,20 @@
|
|
|
73
73
|
}
|
|
74
74
|
.bonds-cards .bond-card-block {
|
|
75
75
|
display: flex;
|
|
76
|
-
padding:
|
|
76
|
+
padding: 6px 12px;
|
|
77
77
|
background: var(--theme-ui-colors-white3);
|
|
78
78
|
width: 100%;
|
|
79
79
|
align-items: center;
|
|
80
80
|
justify-content: space-between;
|
|
81
|
-
|
|
81
|
+
border-bottom: 1px solid var(--theme-ui-colors-white2);
|
|
82
|
+
max-height: 32px;
|
|
82
83
|
}
|
|
83
84
|
@media screen and (min-width: 800px) {
|
|
84
85
|
.bonds-cards .bond-card-block {
|
|
85
86
|
width: 350px;
|
|
86
87
|
flex-direction: column;
|
|
87
88
|
padding: 12px;
|
|
89
|
+
max-height: none;
|
|
88
90
|
}
|
|
89
91
|
}
|
|
90
92
|
.bonds-cards .bond-card-block .bond-card-title {
|
|
@@ -379,12 +381,11 @@
|
|
|
379
381
|
flex-direction: row;
|
|
380
382
|
align-items: center;
|
|
381
383
|
justify-content: space-between;
|
|
382
|
-
opacity: 0.8;
|
|
383
384
|
padding-left: 6px;
|
|
384
385
|
}
|
|
385
386
|
|
|
386
387
|
.balancerow.text {
|
|
387
|
-
opacity: 0.
|
|
388
|
+
opacity: 0.6;
|
|
388
389
|
align-items: center;
|
|
389
390
|
font-size: 12px;
|
|
390
391
|
}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { ThemeUIStyleObject } from 'theme-ui';
|
|
2
|
-
import {
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
|
|
2
|
+
import { MarketingCampaign } from '@ape.swap/apeswap-lists';
|
|
3
|
+
export declare const MCTagStyles: Partial<Record<MarketingCampaign, ThemeUIStyleObject>>;
|
|
4
|
+
export declare const MCBuyComponentStyles: Partial<Record<MarketingCampaign, ThemeUIStyleObject>>;
|
|
5
|
+
export declare const MCBondRowStyles: Partial<Record<MarketingCampaign, ThemeUIStyleObject>>;
|
|
6
|
+
export declare const MCColorMapping: {
|
|
7
|
+
white3: {
|
|
8
|
+
Christmas2025: string;
|
|
9
|
+
};
|
|
10
|
+
white4: {
|
|
11
|
+
Christmas2025: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export declare const MCTokenIconStyles: Partial<Record<MarketingCampaign, ThemeUIStyleObject>>;
|
|
15
|
+
export declare const MCTagNameMapping: Partial<Record<MarketingCampaign, string>>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TrueBondPrices } from '../../../../types/bonds';
|
|
3
|
-
import {
|
|
3
|
+
import { ChainId, LaunchBondTiers, MarketingCampaign, Token } from '@ape.swap/apeswap-lists';
|
|
4
4
|
interface BondRowProps {
|
|
5
5
|
bondAddress: string;
|
|
6
6
|
bondChain: ChainId;
|
|
7
|
-
|
|
7
|
+
marketingCampaign?: MarketingCampaign;
|
|
8
8
|
payoutToken: Token;
|
|
9
9
|
billType: string;
|
|
10
10
|
tag?: string;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Ape Bond SDK",
|
|
4
4
|
"author": "Ape Bond",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "4.5.
|
|
6
|
+
"version": "4.5.2",
|
|
7
7
|
"module": "dist/main.js",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"types": "dist/main.d.ts",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
},
|
|
80
80
|
"dependencies": {
|
|
81
81
|
"@jup-ag/api": "6.0.45",
|
|
82
|
-
"@ape.swap/apeswap-lists": "4.5.
|
|
82
|
+
"@ape.swap/apeswap-lists": "4.5.1",
|
|
83
83
|
"@emotion/react": "11.14.0",
|
|
84
84
|
"bignumber.js": "^9.1.2",
|
|
85
85
|
"buffer": "^6.0.3",
|