@ape.swap/bonds-sdk 1.0.426 → 1.0.427

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.
@@ -54,7 +54,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
54
54
  }
55
55
  return to.concat(ar || Array.prototype.slice.call(from));
56
56
  };
57
- import { jsx as _jsx, jsxs as _jsxs } from "theme-ui/jsx-runtime";
57
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "theme-ui/jsx-runtime";
58
58
  /** @jsxImportSource theme-ui */
59
59
  import { useCallback, useEffect, useState } from 'react';
60
60
  import { Flex, ThemeUIProvider } from 'theme-ui';
@@ -73,7 +73,7 @@ import { formatDollar, formatValue } from '../../utils/formatNumbers';
73
73
  import { TooltipText } from '../../enum/tooltips';
74
74
  import { TooltipBubble, Svg } from '../uikit-sdk';
75
75
  import Tooltip from '../Tooltip/Tooltip';
76
- import { BLOCK_EXPLORER } from '../../config/constants/chains';
76
+ import { BLOCK_EXPLORER, MAINNET_CHAINS } from '../../config/constants/chains';
77
77
  import TokenInfoAndName from '../TokenInfoAndName';
78
78
  import { Input } from '../uikit-sdk/Input';
79
79
  var Bonds = function (_a) {
@@ -272,7 +272,9 @@ var Bonds = function (_a) {
272
272
  setBondsRendered(true);
273
273
  }
274
274
  }, [filteredBonds]);
275
- return (_jsxs(ThemeUIProvider, __assign({ theme: defaultTheme }, { children: [isActive && account && _jsx("p", { children: account }), isActive && account && _jsx("button", __assign({ onClick: handleApprove }, { children: "Approve USDT" })), bondsRendered && (_jsxs(Flex, __assign({ className: "container table-container" }, { children: [_jsxs(Flex, __assign({ className: "container header-container" }, { children: [_jsxs(Flex, __assign({ className: "column column-tokens" }, { children: [_jsx(Flex, __assign({ className: "column column-search", sx: { width: '100%', maxWidth: ['200px', '200px', '200px', '340px'] } }, { children: _jsx(Input, { value: inputValue, onChange: handleInputChange, variant: "search", sx: { fontWeight: 400, background: 'white2', height: '30px', fontSize: '14px' }, width: '100%', placeholder: 'Search...' }) })), _jsx(Flex, { className: "column column-tokenicons" })] })), _jsxs(Flex, __assign({ className: "column column-bondinfo" }, { children: [_jsxs(Flex, __assign({ className: "column column-discount" }, { children: [_jsx(Flex, __assign({ className: "column tooltip" }, { children: _jsxs(TooltipBubble, __assign({ body: _jsx(Flex, { children: TooltipText.Discount }), width: "230px", placement: "bottomLeft", transformTip: "translate(18%, -4%)" }, { children: ["Discount", _jsx(Flex, __assign({ className: "column header-icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) }))] })) })), _jsx(Flex, __assign({ className: "column header-icon", onClick: function () { return handleSort('discount'); } }, { children: _jsx(Svg, { icon: "sort", width: "12px" }) }))] })), _jsxs(Flex, __assign({ className: "column column-arr" }, { children: [_jsx(Flex, __assign({ className: "column tooltip" }, { children: _jsxs(TooltipBubble, __assign({ body: _jsx(Flex, { children: TooltipText.ARR }), width: "230px", placement: "bottomLeft", transformTip: "translate(8%, -5%)" }, { children: ["ARR", _jsx(Flex, __assign({ className: "column header-icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) }))] })) })), _jsx(Flex, __assign({ className: "column header-icon", onClick: function () { return handleSort('arr'); } }, { children: _jsx(Svg, { icon: "sort", width: "12px" }) }))] })), _jsxs(Flex, __assign({ className: "column column-terms" }, { children: [_jsx(Flex, __assign({ className: "column tooltip" }, { children: _jsxs(TooltipBubble, __assign({ body: _jsx(Flex, { children: TooltipText.Terms }), width: "230px", placement: "bottomRight", transformTip: "translate(11%, -5%)" }, { children: ["Terms", _jsx(Flex, __assign({ className: "column header-icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) }))] })) })), _jsx(Flex, __assign({ className: "column header-icon", onClick: function () { return handleSort('terms'); } }, { children: _jsx(Svg, { icon: "sort", width: "12px" }) }))] })), _jsxs(Flex, __assign({ className: "column column-tokensremaining" }, { children: [_jsx(Flex, __assign({ className: "column tooltip" }, { children: _jsxs(TooltipBubble, __assign({ body: _jsx(Flex, { children: TooltipText.TokensRemaining }), width: "230px", placement: "bottomRight", transformTip: "translate(12%, -4%)" }, { children: ["Tokens Remaining", _jsx(Flex, __assign({ className: "column header-icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) }))] })) })), _jsx(Flex, __assign({ className: "column header-icon", onClick: function () { return handleSort('tokensRemaining'); } }, { children: _jsx(Svg, { icon: "sort", width: "12px" }) }))] })), _jsx(Flex, { className: "column column-hotbond" })] }))] })), filteredBonds.map(function (bond) {
275
+ return (_jsxs(ThemeUIProvider, __assign({ theme: defaultTheme }, { children: [isActive && account && _jsx("p", { children: account }), isActive && account && _jsx("button", __assign({ onClick: handleApprove }, { children: "Approve USDT" })), bondsRendered && (_jsxs(Flex, __assign({ className: "container table-container" }, { children: [_jsxs(Flex, __assign({ className: "container header-container" }, { children: [_jsxs(Flex, __assign({ className: "column column-tokens" }, { children: [_jsx(Flex, __assign({ className: "column column-search", sx: { width: '100%', maxWidth: ['200px', '200px', '200px', '340px'] } }, { children: _jsx(Input, { value: inputValue, onChange: handleInputChange, variant: "search", sx: { fontWeight: 400, background: 'white2', height: '30px', fontSize: '14px' }, width: '100%', placeholder: 'Search...' }) })), _jsx(Flex, { className: "column column-tokenicons" })] })), _jsxs(Flex, __assign({ className: "column column-bondinfo" }, { children: [_jsxs(Flex, __assign({ className: "column column-discount" }, { children: [_jsx(Flex, __assign({ className: "column tooltip" }, { children: _jsxs(TooltipBubble, __assign({ body: _jsx(Flex, { children: TooltipText.Discount }), width: "230px", placement: "bottomLeft", transformTip: "translate(18%, -4%)" }, { children: ["Discount", _jsx(Flex, __assign({ className: "column header-icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) }))] })) })), _jsx(Flex, __assign({ className: "column header-icon", onClick: function () { return handleSort('discount'); } }, { children: _jsx(Svg, { icon: "sort", width: "12px" }) }))] })), _jsxs(Flex, __assign({ className: "column column-arr" }, { children: [_jsx(Flex, __assign({ className: "column tooltip" }, { children: _jsxs(TooltipBubble, __assign({ body: _jsx(Flex, { children: TooltipText.ARR }), width: "230px", placement: "bottomLeft", transformTip: "translate(8%, -5%)" }, { children: ["ARR", _jsx(Flex, __assign({ className: "column header-icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) }))] })) })), _jsx(Flex, __assign({ className: "column header-icon", onClick: function () { return handleSort('arr'); } }, { children: _jsx(Svg, { icon: "sort", width: "12px" }) }))] })), _jsxs(Flex, __assign({ className: "column column-terms" }, { children: [_jsx(Flex, __assign({ className: "column tooltip" }, { children: _jsxs(TooltipBubble, __assign({ body: _jsx(Flex, { children: TooltipText.Terms }), width: "230px", placement: "bottomRight", transformTip: "translate(11%, -5%)" }, { children: ["Terms", _jsx(Flex, __assign({ className: "column header-icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) }))] })) })), _jsx(Flex, __assign({ className: "column header-icon", onClick: function () { return handleSort('terms'); } }, { children: _jsx(Svg, { icon: "sort", width: "12px" }) }))] })), _jsxs(Flex, __assign({ className: "column column-tokensremaining" }, { children: [_jsx(Flex, __assign({ className: "column tooltip" }, { children: _jsxs(TooltipBubble, __assign({ body: _jsx(Flex, { children: TooltipText.TokensRemaining }), width: "230px", placement: "bottomRight", transformTip: "translate(12%, -4%)" }, { children: ["Tokens Remaining", _jsx(Flex, __assign({ className: "column header-icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) }))] })) })), _jsx(Flex, __assign({ className: "column header-icon", onClick: function () { return handleSort('tokensRemaining'); } }, { children: _jsx(Svg, { icon: "sort", width: "12px" }) }))] })), _jsx(Flex, { className: "column column-hotbond" })] }))] })), MAINNET_CHAINS.slice(2, MAINNET_CHAINS.length).map(function (chain, index) {
276
+ return (_jsxs(_Fragment, { children: ["MAINNETCHAINS", chain] }));
277
+ }), filteredBonds.map(function (bond) {
276
278
  var _a, _b, _c;
277
279
  return (_jsxs(Flex, __assign({ className: "container bondrow-container", onClick: function () { return rowClick(bond); } }, { children: [_jsxs(Flex, __assign({ className: "column column-tokens" }, { children: [_jsx(Flex, __assign({ className: "column column-tokeninfoname" }, { children: _jsx(TokenInfoAndName, { bill: bond }) })), _jsx(Flex, __assign({ className: "column column-tokenicons" }, { children: _jsx(TooltipBubble, __assign({ body: _jsx(Tooltip, { tokenContract: (bond === null || bond === void 0 ? void 0 : bond.payoutToken) || '', secondURL: getBillContractURL(bond), secondURLTitle: 'View Bond Contract', thirdURL: "https://dashboard.ape.bond/bond/".concat((_a = bond === null || bond === void 0 ? void 0 : bond.billAddress) === null || _a === void 0 ? void 0 : _a.toLowerCase()), thirdURLTitle: 'View Insights', twitter: bond === null || bond === void 0 ? void 0 : bond.twitter, projectLink: bond === null || bond === void 0 ? void 0 : bond.projectLink, audit: bond === null || bond === void 0 ? void 0 : bond.audit, chain: (_b = bond.chainId) !== null && _b !== void 0 ? _b : ChainId.BSC }), width: "205px", placement: "bottomRight", transformTip: "translate(11%, 0%)" }, { children: _jsx(Svg, { icon: "more", width: "20px" }) })) }))] })), _jsxs(Flex, __assign({ className: "column column-bondinfo" }, { children: [_jsx(Flex, __assign({ className: "column column-discount ".concat(getDiscountColor(bond === null || bond === void 0 ? void 0 : bond.discount)) }, { children: (bond === null || bond === void 0 ? void 0 : bond.discount) !== undefined ? "".concat(bond.discount.toFixed(2), "%") : '-' })), _jsx(Flex, __assign({ className: "column column-arr" }, { children: calculateARR(bond) !== undefined ? "".concat(calculateARR(bond), "%") : '-' })), _jsx(Flex, __assign({ className: "column column-terms" }, { children: vestingTime(bond.vestingTerm).days ? "".concat(vestingTime(bond.vestingTerm).days, " D") : '-' })), _jsx(Flex, __assign({ className: "column column-tokensremaining" }, { children: _jsx(ProgressBarWrapper, { title: '', value: _jsx(ProgressBar, { value: remainingPercentage(bond) }), style: {
278
280
  width: '127px',
@@ -46,7 +46,7 @@ export var PRICE_GETTER_ADDRESSES = (_f = {},
46
46
  _f[SupportedChainId.POLYGON] = '0x6908356faC751dA36F4ec1B4ADBc56d0B3862155',
47
47
  _f[SupportedChainId.MAINNET] = '0x10ffd467e8701fc2887b3df9b9a31adfefd388ec',
48
48
  _f[SupportedChainId.TLOS] = '0x85d2C626E28a42E184cF8e32db1461013D23331D',
49
- _f[SupportedChainId.ARBITRUM_ONE] = '0xe6828D65bf5023AE1851D90D8783Cc821ba7eeE1',
49
+ _f[SupportedChainId.ARBITRUM_ONE] = '0xfa7598C50fbA17b64EBB8Ed2058564D9b5359b03',
50
50
  _f[ChainId.LINEA] = '0x35b1eadAbaDD0Edd26076247f3dEdF9E15De8D5D',
51
51
  _f[ChainId.LIGHTLINK] = '0xC22Db8dDe3A3591fFB02be868Ce2901d30671FE4',
52
52
  _f[ChainId.IOTA] = '0xC22Db8dDe3A3591fFB02be868Ce2901d30671FE4',
@@ -96,6 +96,7 @@ export var SoulZapTokenManager = (_j = {},
96
96
  _j[ChainId.LINEA] = '0x93b636d58656B2CCA69c539e511C14eb3b71DA2f',
97
97
  _j[ChainId.BSC] = '0x7119014f0d75A7a31b875F79cE14b2a32B34B067',
98
98
  _j[ChainId.BASE] = '0x0B750790dCa8f289fAB5eFd1a48EfAb969e51D16',
99
+ _j[ChainId.ARBITRUM_ONE] = '0x22572A548Ff26Fc5725a17dfd233F49a98c17EE7',
99
100
  _j);
100
101
  export var LENS_CONTRACT = (_k = {},
101
102
  _k[SupportedChainId.BSC_TESTNET] = '0xcC51213d12431249001548228124c3bFAa359F96',
@@ -32,17 +32,14 @@ export var ChainId;
32
32
  })(ChainId || (ChainId = {}));
33
33
  // These are the lists we will display to the user
34
34
  export var MAINNET_CHAINS = [
35
+ ChainId.MAINNET,
35
36
  ChainId.BSC,
36
37
  ChainId.POLYGON,
37
- ChainId.MAINNET,
38
- ChainId.ARBITRUM_ONE,
39
- //ChainId.INJECTED_EVM_TESTNET,
40
- ChainId.INEVM,
41
- // ChainId.SEPOLIA,
42
- // ChainId.BSC_TESTNET,
38
+ ChainId.BASE,
39
+ ChainId.IOTA,
43
40
  ChainId.LINEA,
41
+ ChainId.ARBITRUM_ONE,
44
42
  ChainId.LIGHTLINK,
45
- ChainId.BASE,
46
43
  ];
47
44
  export var DEX_ONLY_CHAINS = [
48
45
  ChainId.AVALANCHE,
@@ -14,5 +14,8 @@ export declare const QUERY_KEYS: {
14
14
  TOKEN_PRICES: string;
15
15
  TIERS: string;
16
16
  BOND_STATS: string;
17
+ USER_STATS: string;
17
18
  HOT_BONDS: string;
19
+ CHAIN_FILTER_OPTION: string;
20
+ AB_TEST_VALUE: string;
18
21
  };
@@ -14,5 +14,8 @@ export var QUERY_KEYS = {
14
14
  TOKEN_PRICES: 'tokenPrices',
15
15
  TIERS: 'tiers',
16
16
  BOND_STATS: 'bondStats',
17
+ USER_STATS: 'userStats',
17
18
  HOT_BONDS: 'hotBonds',
19
+ CHAIN_FILTER_OPTION: 'chainFilterOption',
20
+ AB_TEST_VALUE: 'ABTestValue',
18
21
  };
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": "1.0.426",
6
+ "version": "1.0.427",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.es.js",
9
9
  "types": "dist/index.d.ts",