@ape.swap/bonds-sdk 3.0.106-test.1 → 3.1.0-test.1
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/ConnectButton/AppKitButton.d.ts +3 -0
- package/dist/components/PlaceholderMonkey/index.d.ts +2 -1
- package/dist/components/uikit-sdk/Svg/tokens/index.d.ts +0 -1
- package/dist/components/uikit-sdk/Svg/types.d.ts +0 -1
- package/dist/main.js +33 -34
- package/dist/state/useSDKConfig.d.ts +2 -2
- package/package.json +10 -9
- package/dist/components/uikit-sdk/Svg/tokens/MEGAETH.d.ts +0 -4
package/dist/main.js
CHANGED
|
@@ -3930,7 +3930,6 @@ var icons;
|
|
|
3930
3930
|
icons["BERA"] = "bera";
|
|
3931
3931
|
icons["KATANA"] = "katana";
|
|
3932
3932
|
icons["UNICHAIN"] = "unichain";
|
|
3933
|
-
icons["MEGAETH"] = "megaeth";
|
|
3934
3933
|
//Social media icons
|
|
3935
3934
|
icons["DISCORD"] = "discord";
|
|
3936
3935
|
icons["REDDIT"] = "reddit";
|
|
@@ -6797,10 +6796,6 @@ const UNICHAIN = ({ width }) => {
|
|
|
6797
6796
|
return (jsx$2("svg", { width: width || '30', height: width || '30', viewBox: "0 0 64 64", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsxs("g", { children: [jsx$2("title", { children: "Layer 1" }), jsx$2("rect", { id: "svg_1", fill: "#f50db4", height: "64", width: "64" }), jsx$2("path", { id: "svg_2", fill: "white", d: "m52.00002,31.61947c-10.8407,0 -19.6195,-8.7876 -19.6195,-19.61945l-0.761,0l0,19.61945l-19.61954,0l0,0.7611c10.84074,0 19.61954,8.7876 19.61954,19.6194l0.761,0l0,-19.6194l19.6195,0l0,-0.7611z" })] }) }));
|
|
6798
6797
|
};
|
|
6799
6798
|
|
|
6800
|
-
const MEGAETH = ({ width }) => {
|
|
6801
|
-
return (jsx$2("svg", { width: width || '30', height: width || '30', viewBox: "0 0 64 64", xmlns: "http://www.w3.org/2000/svg", fill: "none", children: jsxs("g", { children: [jsx$2("title", { children: "Layer 1" }), jsx$2("rect", { id: "svg_5", fill: "#ffffff", height: "64", width: "64" }), jsxs("g", { stroke: "null", id: "svg_5", children: [jsx$2("path", { stroke: "null", d: "m38.24969,49.75671c1.96553,0 3.55298,-1.58622 3.55298,-3.54292c0,-1.95669 -1.58744,-3.54298 -3.55298,-3.54298c-1.95035,0 -3.5378,1.58629 -3.5378,3.54298c0,1.95669 1.58744,3.54292 3.5378,3.54292z", fill: "#19191A", id: "svg_1" }), jsx$2("path", { stroke: "null", d: "m25.51759,49.8621c1.96547,0 3.53798,-1.58622 3.53798,-3.54298c0,-1.95669 -1.57251,-3.54292 -3.53798,-3.54292c-1.95035,0 -3.53786,1.58622 -3.53786,3.54292c0,1.95675 1.5875,3.54298 3.53786,3.54298z", fill: "#19191A", id: "svg_2" }), jsx$2("path", { stroke: "null", d: "m17.76006,12.84821l8.44063,0c1.5883,4.29684 5.73294,16.47116 6.03544,17.1495c0.07564,-0.33914 4.25045,-13.60646 5.43037,-17.0741l8.77336,0l0,30.26615c-1.0891,-0.60312 -2.17832,-1.20606 -3.35817,-1.88465c-0.81688,-0.41442 -1.57312,-0.86686 -2.40506,-1.20606c-0.07564,-5.87983 -0.15122,-11.722 -0.33274,-17.82796c-1.17986,3.50531 -5.24898,15.8681 -5.58178,16.2073l-5.43031,0c0,0 -5.27921,-15.00123 -5.53637,-15.67963c-0.07558,5.76677 -0.15122,11.53353 -0.34786,17.48882c-3.23706,1.65833 -5.15803,2.60066 -5.76305,2.82673l0,-30.26609l0.07552,0z", fill: "#19191A", id: "svg_3" }), jsx$2("path", { stroke: "null", d: "m32.00756,5.08833c14.80881,0 26.90999,12.06123 26.90999,26.91161c0,14.8505 -12.05583,26.9117 -26.90999,26.9117c-14.85416,0 -26.90996,-12.0612 -26.90996,-26.9117c0,-14.85038 12.0558,-26.91161 26.90996,-26.91161zm0,-5.08833c-17.68277,0 -32.00756,14.32277 -32.00756,31.99994c0,17.67723 14.32479,32.00006 32.00756,32.00006c17.66766,0 31.99244,-14.32283 31.99244,-32.00006c0,-17.67717 -14.32479,-31.99994 -31.99244,-31.99994z", fill: "#19191A", id: "svg_4" })] })] }) }));
|
|
6802
|
-
};
|
|
6803
|
-
|
|
6804
6799
|
const Icon$a = ({ width }) => {
|
|
6805
6800
|
return (jsxs("svg", { viewBox: "0 0 32 32", width: width || '128px', children: [jsx$2("path", { d: "M24 0H8C3.58172 0 0 3.58172 0 8V24C0 28.4183 3.58172 32 8 32H24C28.4183 32 32 28.4183 32 24V8C32 3.58172 28.4183 0 24 0Z", fill: "#1E2026" }), jsx$2("path", { d: "M16.2857 4L9.97035 7.6761L12.2922 9.03415L16.2857 6.7161L20.2792 9.03415L22.6011 7.6761L16.2857 4Z", fill: "#F0B90B" }), jsx$2("path", { d: "M20.2792 10.9541L22.6011 12.3122V15.0283L18.6075 17.3463V21.9824L16.2857 23.3405L13.9639 21.9824V17.3463L9.97035 15.0283V12.3122L12.2922 10.9541L16.2857 13.2722L20.2792 10.9541Z", fill: "#F0B90B" }), jsx$2("path", { d: "M22.6011 16.9483V19.6644L20.2792 21.0224V18.3063L22.6011 16.9483Z", fill: "#F0B90B" }), jsx$2("path", { d: "M20.2561 22.9424L24.2496 20.6244V15.9883L26.5714 14.6302V21.9824L20.2561 25.6585V22.9424Z", fill: "#F0B90B" }), jsx$2("path", { d: "M24.2496 11.3522L21.9278 9.99414L24.2496 8.63609L26.5714 9.99414V12.7102L24.2496 14.0683V11.3522Z", fill: "#F0B90B" }), jsx$2("path", { d: "M13.9639 26.642V23.9259L16.2857 25.2839L18.6075 23.9259V26.642L16.2857 28L13.9639 26.642Z", fill: "#F0B90B" }), jsx$2("path", { d: "M12.2922 21.0224L9.97035 19.6644V16.9483L12.2922 18.3063V21.0224Z", fill: "#F0B90B" }), jsx$2("path", { d: "M16.2857 11.3522L13.9639 9.99414L16.2857 8.63609L18.6075 9.99414L16.2857 11.3522Z", fill: "#F0B90B" }), jsx$2("path", { d: "M10.6437 9.99414L8.32183 11.3522V14.0683L6 12.7102V9.99414L8.32183 8.63609L10.6437 9.99414Z", fill: "#F0B90B" }), jsx$2("path", { d: "M6 14.6302L8.32183 15.9883V20.6244L12.3154 22.9424V25.6585L6 21.9824V14.6302Z", fill: "#F0B90B" })] }));
|
|
6806
6801
|
};
|
|
@@ -7217,8 +7212,6 @@ const Svg = (_a) => {
|
|
|
7217
7212
|
return jsx$2(KATANA, Object.assign({}, props, { getStyles: getStyles }));
|
|
7218
7213
|
case icons.UNICHAIN:
|
|
7219
7214
|
return jsx$2(UNICHAIN, Object.assign({}, props, { getStyles: getStyles }));
|
|
7220
|
-
case icons.MEGAETH:
|
|
7221
|
-
return jsx$2(MEGAETH, Object.assign({}, props, { getStyles: getStyles }));
|
|
7222
7215
|
default:
|
|
7223
7216
|
return null;
|
|
7224
7217
|
}
|
|
@@ -7277,7 +7270,7 @@ const Checkbox = (_a) => {
|
|
|
7277
7270
|
width: scaleSize,
|
|
7278
7271
|
height: scaleSize,
|
|
7279
7272
|
position: 'relative',
|
|
7280
|
-
}, children: [jsx$2("input", Object.assign({ type: "checkbox", sx: { variant: 'checkbox', background: background, borderColor: 'white4' } }, props)), jsx$2("svg", { width: svgScale
|
|
7273
|
+
}, children: [jsx$2("input", Object.assign({ type: "checkbox", sx: { variant: 'checkbox', background: background, borderColor: 'white4' } }, props)), jsx$2("svg", { width: svgScale, viewBox: "0 0 13 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsx$2("path", { d: "M11.8132 0.171594C11.522 -0.0616871 11.0766 -0.046135 10.8025 0.218251L4.25899 6.76569L1.17566 4.46397C0.93585 4.27735 0.576128 4.2618 0.319184 4.43287C-0.00627898 4.63505 -0.0747974 5.0394 0.147888 5.33489L3.35113 9.4873C3.43677 9.59617 3.55668 9.70503 3.67659 9.78279C4.27612 10.156 5.09835 10.0161 5.50946 9.47175L5.56085 9.40954L11.9159 1.01141C12.1215 0.747022 12.0701 0.389324 11.8132 0.171594Z", fill: "#FAFAFA" }) })] }));
|
|
7281
7274
|
};
|
|
7282
7275
|
|
|
7283
7276
|
var animation;
|
|
@@ -18849,7 +18842,6 @@ const MAINNET_CHAINS = [
|
|
|
18849
18842
|
types.ChainId.BERACHAIN,
|
|
18850
18843
|
types.ChainId.KATANA,
|
|
18851
18844
|
types.ChainId.UNICHAIN,
|
|
18852
|
-
types.ChainId.MEGAETH_TESTNET,
|
|
18853
18845
|
];
|
|
18854
18846
|
const TESTNET_CHAINS = [types.ChainId.MONAD_TESTNET];
|
|
18855
18847
|
// Network Icons
|
|
@@ -18874,7 +18866,6 @@ const NETWORK_ICONS = {
|
|
|
18874
18866
|
[types.ChainId.BERACHAIN]: icons.BERA,
|
|
18875
18867
|
[types.ChainId.KATANA]: icons.KATANA,
|
|
18876
18868
|
[types.ChainId.UNICHAIN]: icons.UNICHAIN,
|
|
18877
|
-
[types.ChainId.MEGAETH_TESTNET]: icons.MEGAETH,
|
|
18878
18869
|
};
|
|
18879
18870
|
// Network labels
|
|
18880
18871
|
const NETWORK_LABEL = {
|
|
@@ -18900,7 +18891,6 @@ const NETWORK_LABEL = {
|
|
|
18900
18891
|
[types.ChainId.BERACHAIN]: 'Berachain',
|
|
18901
18892
|
[types.ChainId.KATANA]: 'Katana',
|
|
18902
18893
|
[types.ChainId.UNICHAIN]: 'Unichain',
|
|
18903
|
-
[types.ChainId.MEGAETH_TESTNET]: 'Megaeth Testnet',
|
|
18904
18894
|
};
|
|
18905
18895
|
// Network block explorers
|
|
18906
18896
|
const BLOCK_EXPLORER = {
|
|
@@ -18926,7 +18916,6 @@ const BLOCK_EXPLORER = {
|
|
|
18926
18916
|
[types.ChainId.BERACHAIN]: 'https://berascan.com',
|
|
18927
18917
|
[types.ChainId.KATANA]: 'https://explorer.katanarpc.com',
|
|
18928
18918
|
[types.ChainId.UNICHAIN]: 'https://uniscan.xyz',
|
|
18929
|
-
[types.ChainId.MEGAETH_TESTNET]: 'https://megaexplorer.xyz',
|
|
18930
18919
|
};
|
|
18931
18920
|
|
|
18932
18921
|
const supportedByLIFI = [
|
|
@@ -19126,7 +19115,6 @@ const NETWORK_COLORS = {
|
|
|
19126
19115
|
[types.ChainId.BERACHAIN]: '#783e244d',
|
|
19127
19116
|
[types.ChainId.KATANA]: '#068be34d',
|
|
19128
19117
|
[types.ChainId.UNICHAIN]: '#f50db44d',
|
|
19129
|
-
[types.ChainId.MEGAETH_TESTNET]: '#DFD9D94d',
|
|
19130
19118
|
};
|
|
19131
19119
|
const TokenInfoAndName = ({ tokenSymbol, chain, tag, vestEnds, isHotBond, }) => {
|
|
19132
19120
|
return (jsxs(Flex, { className: "tokeninfoname container", children: [jsx$2(Flex, { sx: {
|
|
@@ -19152,7 +19140,7 @@ const TokenInfoAndName = ({ tokenSymbol, chain, tag, vestEnds, isHotBond, }) =>
|
|
|
19152
19140
|
};
|
|
19153
19141
|
|
|
19154
19142
|
/*
|
|
19155
|
-
* bignumber.js v9.3.
|
|
19143
|
+
* bignumber.js v9.3.1
|
|
19156
19144
|
* A JavaScript library for arbitrary-precision arithmetic.
|
|
19157
19145
|
* https://github.com/MikeMcl/bignumber.js
|
|
19158
19146
|
* Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
@@ -20420,7 +20408,7 @@ function clone$2(configObject) {
|
|
|
20420
20408
|
|
|
20421
20409
|
// Fixed-point notation.
|
|
20422
20410
|
} else {
|
|
20423
|
-
i -= ne;
|
|
20411
|
+
i -= ne + (id === 2 && e > ne);
|
|
20424
20412
|
str = toFixedPoint(str, e, '0');
|
|
20425
20413
|
|
|
20426
20414
|
// Append zeros?
|
|
@@ -22593,7 +22581,6 @@ const MULTICALL_V2 = {
|
|
|
22593
22581
|
[types.ChainId.BERACHAIN]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
22594
22582
|
[types.ChainId.KATANA]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
22595
22583
|
[types.ChainId.UNICHAIN]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
22596
|
-
[types.ChainId.MEGAETH_TESTNET]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
22597
22584
|
};
|
|
22598
22585
|
const SoulZapTokenManager = {
|
|
22599
22586
|
[types.ChainId.MAINNET]: '0x2F87f76336A560bbB0d18d357D10646bB96E8802',
|
|
@@ -58412,7 +58399,6 @@ const PUBLIC_RPC_URLS = {
|
|
|
58412
58399
|
[types.ChainId.BERACHAIN]: ['https://rpc.berachain.com'],
|
|
58413
58400
|
[types.ChainId.KATANA]: ['https://rpc-katana.t.conduit.xyz/NRcSLqEG4Hw55GzTSu6Sratq94kKtUGfH'],
|
|
58414
58401
|
[types.ChainId.UNICHAIN]: ['https://unichain.drpc.org'],
|
|
58415
|
-
[types.ChainId.MEGAETH_TESTNET]: ['https://carrot.megaeth.com/rpc'],
|
|
58416
58402
|
};
|
|
58417
58403
|
|
|
58418
58404
|
// This is the legacy multicall
|
|
@@ -58462,7 +58448,7 @@ const stagingUrls = {
|
|
|
58462
58448
|
};
|
|
58463
58449
|
const useSDKConfig = (config) => {
|
|
58464
58450
|
const urls = process.env.NODE_ENV === 'production' ? defaultUrls : stagingUrls;
|
|
58465
|
-
const initialData = Object.assign(Object.assign({ referenceId: '', chains: [], hotBondChains: [types.ChainId.BSC, types.ChainId.MATIC], useHotBonds: true,
|
|
58451
|
+
const initialData = Object.assign(Object.assign({ referenceId: '', chains: [], hotBondChains: [types.ChainId.BSC, types.ChainId.MATIC], useHotBonds: true, connector: 'default', useTiers: false, useTGEBonds: false, showLowValueBonds: false, bondPartner: undefined, namingPreference: 'Bonus' }, config), { urls: Object.assign(Object.assign({}, urls), config === null || config === void 0 ? void 0 : config.urls), highestCompatibleVersion: '2.1.3' });
|
|
58466
58452
|
const { data } = useQuery({
|
|
58467
58453
|
queryKey: [QUERY_KEYS.SDK_CONFIG],
|
|
58468
58454
|
queryFn: () => {
|
|
@@ -70690,21 +70676,24 @@ const RainbowKitButton = () => {
|
|
|
70690
70676
|
} }));
|
|
70691
70677
|
};
|
|
70692
70678
|
|
|
70679
|
+
const AppKitButton = () => {
|
|
70680
|
+
return (jsx$2(Flex, { sx: { width: '100%', justifyContent: 'center' }, children: jsx$2("appkit-connect-button", { label: "Connect Your Wallet" }) }));
|
|
70681
|
+
};
|
|
70682
|
+
|
|
70693
70683
|
const ConnectButton = () => {
|
|
70694
70684
|
const config = useSDKConfig();
|
|
70695
|
-
return (config === null || config === void 0 ? void 0 : config.
|
|
70685
|
+
return (config === null || config === void 0 ? void 0 : config.connector) === 'rainbowkit' ? (jsx$2(RainbowKitButton, {})) : (config === null || config === void 0 ? void 0 : config.connector) === 'appkit' ? (jsx$2(AppKitButton, {})) : (jsx$2(Button, { disabled: true, fullWidth: true, children: "Connect wallet" }));
|
|
70696
70686
|
};
|
|
70697
70687
|
|
|
70698
|
-
const PlaceholderMonkey = ({ text }) => {
|
|
70699
|
-
return (
|
|
70688
|
+
const PlaceholderMonkey = ({ text, loading }) => {
|
|
70689
|
+
return (jsx$2(Flex, { sx: {
|
|
70700
70690
|
width: '100%',
|
|
70701
70691
|
flexDirection: 'column',
|
|
70702
70692
|
py: '100px',
|
|
70703
70693
|
background: 'white2',
|
|
70704
|
-
alignItems: 'center',
|
|
70705
70694
|
borderRadius: 'normal',
|
|
70706
70695
|
mt: '15px',
|
|
70707
|
-
}, children: [jsx$2(Svg, { icon: "placeholderMonkey" }), jsx$2(Text, { sx: { fontWeight: 600, fontSize: '16px', mt: '15px', opacity: 0.6 }, children: text }), text === 'You are not connected.' && (jsx$2(Flex, { sx: { width: '150px', mt: '10px' }, children: jsx$2(ConnectButton, {}) }))] }));
|
|
70696
|
+
}, children: jsx$2(Flex, { sx: { height: '200px', flexDirection: 'column', alignItems: 'center', justifyContent: 'center' }, children: loading ? (jsx$2(Spinner, { size: 100 })) : (jsxs(Fragment$1, { children: [jsx$2(Svg, { icon: "placeholderMonkey" }), jsx$2(Text, { sx: { fontWeight: 600, fontSize: '16px', mt: '15px', opacity: 0.6 }, children: text }), text === 'You are not connected.' && (jsx$2(Flex, { sx: { width: '150px', mt: '10px' }, children: jsx$2(ConnectButton, {}) }))] })) }) }));
|
|
70708
70697
|
};
|
|
70709
70698
|
|
|
70710
70699
|
function useChainFilterOption() {
|
|
@@ -73868,7 +73857,15 @@ const useTopTags = (initialBondList) => {
|
|
|
73868
73857
|
return tagCount;
|
|
73869
73858
|
};
|
|
73870
73859
|
const activeBonds = bonds === null || bonds === void 0 ? void 0 : bonds.filter((bond) => !bond.soldOut && (chains === null || chains === void 0 ? void 0 : chains.includes(bond.chainId)));
|
|
73871
|
-
const
|
|
73860
|
+
const filteredBonds = activeBonds === null || activeBonds === void 0 ? void 0 : activeBonds.filter((bond) => {
|
|
73861
|
+
var _a, _b;
|
|
73862
|
+
if (SDKConfig.bondPartner) {
|
|
73863
|
+
return ((_a = bond === null || bond === void 0 ? void 0 : bond.bondPartner) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.bondPartner) === null || _b === void 0 ? void 0 : _b.toLowerCase());
|
|
73864
|
+
}
|
|
73865
|
+
else
|
|
73866
|
+
return true;
|
|
73867
|
+
});
|
|
73868
|
+
const countedTags = countTagsInBonds(filteredBonds);
|
|
73872
73869
|
const sortedTagsArray = Object.entries(countedTags).sort((a, b) => b[1] - a[1]);
|
|
73873
73870
|
return sortedTagsArray.slice(0, 2).map((tagCountArray) => tagCountArray[0]);
|
|
73874
73871
|
};
|
|
@@ -73877,7 +73874,7 @@ const isBondSoldOut = (bill, showLowValueBonds) => {
|
|
|
73877
73874
|
var _a;
|
|
73878
73875
|
if (bill.soldOut)
|
|
73879
73876
|
return true;
|
|
73880
|
-
if (bill.
|
|
73877
|
+
if (bill.hide)
|
|
73881
73878
|
return true;
|
|
73882
73879
|
const { tokensRemaining, payoutTokenPrice } = bill;
|
|
73883
73880
|
if (!tokensRemaining)
|
|
@@ -78258,7 +78255,7 @@ const useApproval = (amount, currency, spender, account, chainId) => {
|
|
|
78258
78255
|
return [approvalState !== null && approvalState !== void 0 ? approvalState : ApprovalState.NOT_APPROVED, handleApprove];
|
|
78259
78256
|
};
|
|
78260
78257
|
|
|
78261
|
-
const version$1 = '2.31.
|
|
78258
|
+
const version$1 = '2.31.7';
|
|
78262
78259
|
|
|
78263
78260
|
let errorConfig = {
|
|
78264
78261
|
getDocsUrl: ({ docsBaseUrl, docsPath = '', docsSlug, }) => docsPath
|
|
@@ -80522,7 +80519,8 @@ const Bonds = () => {
|
|
|
80522
80519
|
// Fetch data
|
|
80523
80520
|
useHotBonds();
|
|
80524
80521
|
const { favTokens } = useFavoriteTokens();
|
|
80525
|
-
const { data: bondData, refetch: refetchBondsData } = useBondsData();
|
|
80522
|
+
const { data: bondData, refetch: refetchBondsData, isFetching, isLoading } = useBondsData();
|
|
80523
|
+
const loadingBonds = isFetching || isLoading;
|
|
80526
80524
|
const { data: allBonds } = useBondsList();
|
|
80527
80525
|
const { data: allPreBonds } = usePreTGEList();
|
|
80528
80526
|
const { data: chainFilterOption, setChainFilterOption } = useChainFilterOption();
|
|
@@ -80585,12 +80583,12 @@ const Bonds = () => {
|
|
|
80585
80583
|
if (!(chainFilterOption === null || chainFilterOption === void 0 ? void 0 : chainFilterOption.includes('All Chains'))) {
|
|
80586
80584
|
billsToReturn = billsToReturn === null || billsToReturn === void 0 ? void 0 : billsToReturn.filter((bill) => { var _a; return chainFilterOption === null || chainFilterOption === void 0 ? void 0 : chainFilterOption.includes((_a = bill === null || bill === void 0 ? void 0 : bill.chainId) === null || _a === void 0 ? void 0 : _a.toString()); });
|
|
80587
80585
|
}
|
|
80588
|
-
|
|
80589
|
-
|
|
80590
|
-
|
|
80591
|
-
|
|
80592
|
-
|
|
80593
|
-
|
|
80586
|
+
if (filterOption !== 'SOLD OUT') {
|
|
80587
|
+
billsToReturn = billsToReturn === null || billsToReturn === void 0 ? void 0 : billsToReturn.filter((bond) => !isBondSoldOut(bond, SDKConfig.showLowValueBonds));
|
|
80588
|
+
}
|
|
80589
|
+
if (filterOption === 'SOLD OUT') {
|
|
80590
|
+
billsToReturn = billsToReturn === null || billsToReturn === void 0 ? void 0 : billsToReturn.filter((bond) => isBondSoldOut(bond, SDKConfig.showLowValueBonds));
|
|
80591
|
+
}
|
|
80594
80592
|
if (filterOption === 'FAVORITES') {
|
|
80595
80593
|
billsToReturn = billsToReturn === null || billsToReturn === void 0 ? void 0 : billsToReturn.filter((bill) => { var _a, _b; return favTokens.includes((_b = (_a = bill === null || bill === void 0 ? void 0 : bill.earnToken) === null || _a === void 0 ? void 0 : _a.symbol) === null || _b === void 0 ? void 0 : _b.toLowerCase()); });
|
|
80596
80594
|
}
|
|
@@ -80617,6 +80615,7 @@ const Bonds = () => {
|
|
|
80617
80615
|
const handleChangeFilterOption = useCallback((newOption) => {
|
|
80618
80616
|
setFilterOption(newOption);
|
|
80619
80617
|
}, []);
|
|
80618
|
+
console.log(billsToRender);
|
|
80620
80619
|
return (jsxs(Flex$1, { className: "bonds-container", children: [jsx$2(CheckUrl, {}), jsx$2(BondsMenu, { searchQuery: searchQuery, setSearchQuery: setSearchQuery, setChainFilterOption: setChainFilterOption, chainFilterOption: chainFilterOption !== null && chainFilterOption !== void 0 ? chainFilterOption : ['All Chains'], filterOptions: filterOptions, filterOption: filterOption, setFilterOption: handleChangeFilterOption, onSort: handleSortOptions }), SDKConfig.useHotBonds && !SDKConfig.bondPartner && jsx$2(BuyAgainRow, {}), (billsToRender === null || billsToRender === void 0 ? void 0 : billsToRender.length) > 0 ? (jsx$2(BondRowsByChain, { bonds: billsToRender, hideTitles: searchQuery !== '' })) : searchQuery ? (jsx$2(PlaceholderMonkey, { text: 'No results' })) : filterOption === 'FAVORITES' ? (jsxs(Flex$1, { sx: {
|
|
80621
80620
|
width: '100%',
|
|
80622
80621
|
height: '300px',
|
|
@@ -80626,7 +80625,7 @@ const Bonds = () => {
|
|
|
80626
80625
|
alignItems: 'center',
|
|
80627
80626
|
flexDirection: 'column',
|
|
80628
80627
|
mt: '10px',
|
|
80629
|
-
}, children: [jsx$2(Svg, { icon: "StarFilled", width: 75, height: 75 }), jsx$2(Flex$1, { sx: { mt: '10px' }, children: `You don't have any Favorite Bonds yet!` }), jsx$2(Flex$1, { sx: { fontSize: '12px', fontWeight: 400, color: 'textDisabledButton', mt: '10px' }, children: `Click on the 'star' or 'fire' icon to add Bonds to the list.` })] })) : (jsx$2(
|
|
80628
|
+
}, children: [jsx$2(Svg, { icon: "StarFilled", width: 75, height: 75 }), jsx$2(Flex$1, { sx: { mt: '10px' }, children: `You don't have any Favorite Bonds yet!` }), jsx$2(Flex$1, { sx: { fontSize: '12px', fontWeight: 400, color: 'textDisabledButton', mt: '10px' }, children: `Click on the 'star' or 'fire' icon to add Bonds to the list.` })] })) : (jsx$2(PlaceholderMonkey, { text: 'No available bonds at the moment.', loading: loadingBonds })), SDKConfig.useHotBonds && jsx$2(RecommendationCards$1, {}), jsx$2(Flex$1, { sx: { width: '100%', justifyContent: 'center', my: '15px' }, children: jsx$2("img", { src: "https://res.cloudinary.com/dswmrqgwy/image/upload/v1741643990/poweredbyapebondsdk_cxiouj.png", alt: "powered-by-apebond", style: { width: '200px', height: 'auto' } }) })] }));
|
|
80630
80629
|
};
|
|
80631
80630
|
|
|
80632
80631
|
var BondsViewOptions$1;
|
|
@@ -2,7 +2,7 @@ export interface SDKPropsDTO {
|
|
|
2
2
|
referenceId: string;
|
|
3
3
|
chains: number[];
|
|
4
4
|
hotBondChains?: number[];
|
|
5
|
-
|
|
5
|
+
connector?: 'rainbowkit' | 'appkit' | 'default';
|
|
6
6
|
useHotBonds?: boolean;
|
|
7
7
|
useTiers?: boolean;
|
|
8
8
|
useTGEBonds?: boolean;
|
|
@@ -17,7 +17,7 @@ export interface SDKProps {
|
|
|
17
17
|
referenceId: string;
|
|
18
18
|
chains: number[];
|
|
19
19
|
hotBondChains: number[];
|
|
20
|
-
|
|
20
|
+
connector?: 'rainbowkit' | 'appkit' | 'default';
|
|
21
21
|
useHotBonds: boolean;
|
|
22
22
|
useTiers: boolean;
|
|
23
23
|
useTGEBonds: boolean;
|
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": "3.0
|
|
6
|
+
"version": "3.1.0-test.1",
|
|
7
7
|
"module": "dist/main.js",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"types": "dist/main.d.ts",
|
|
@@ -30,28 +30,29 @@
|
|
|
30
30
|
]
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@rainbow-me/rainbowkit": "^2.
|
|
33
|
+
"@rainbow-me/rainbowkit": "^2.2.8",
|
|
34
34
|
"@tanstack/react-query": "5.x",
|
|
35
|
-
"axios": "1.7.2",
|
|
36
|
-
"react": "
|
|
37
|
-
"react-dom": "
|
|
38
|
-
"wagmi": "2.
|
|
35
|
+
"axios": ">=1.7.2",
|
|
36
|
+
"react": ">=17",
|
|
37
|
+
"react-dom": ">=17",
|
|
38
|
+
"wagmi": ">=2.14.16"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@tanstack/react-query": "5.81.5",
|
|
42
41
|
"@eslint/js": "^9.28.0",
|
|
43
42
|
"@rainbow-me/rainbowkit": "^2.1.6",
|
|
44
43
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
45
44
|
"@rollup/plugin-json": "^6.1.0",
|
|
46
45
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
47
46
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
47
|
+
"@tanstack/react-query": "5.81.5",
|
|
48
48
|
"@tanstack/react-query-devtools": "5.81.5",
|
|
49
49
|
"@types/dom-to-image": "^2.6.7",
|
|
50
50
|
"@types/lodash": "^4.17.6",
|
|
51
|
+
"@types/node": "^24.0.13",
|
|
51
52
|
"@types/react": "^18.3.3",
|
|
52
53
|
"@types/react-dom": "^18.3.0",
|
|
53
54
|
"@vitejs/plugin-react": "^4.2.1",
|
|
54
|
-
"axios": "1.
|
|
55
|
+
"axios": "1.8.2",
|
|
55
56
|
"eslint": "^9.28.0",
|
|
56
57
|
"eslint-plugin-react": "^7.37.5",
|
|
57
58
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
@@ -69,7 +70,7 @@
|
|
|
69
70
|
"yalc": "^1.0.0-pre.53"
|
|
70
71
|
},
|
|
71
72
|
"dependencies": {
|
|
72
|
-
"@ape.swap/apeswap-lists": "4.
|
|
73
|
+
"@ape.swap/apeswap-lists": "4.4.0",
|
|
73
74
|
"@emotion/react": "11.11.4",
|
|
74
75
|
"bignumber.js": "^9.1.2",
|
|
75
76
|
"chart.js": "4.2.0",
|