@ape.swap/bonds-sdk 1.0.383 → 1.0.385

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.
@@ -187,7 +187,7 @@ var Bonds = function (_a) {
187
187
  var explorerLink = BLOCK_EXPLORER[selectedChain];
188
188
  return "".concat(explorerLink, "/address/").concat(bond === null || bond === void 0 ? void 0 : bond.billAddress);
189
189
  };
190
- return (_jsxs(ThemeUIProvider, __assign({ theme: defaultTheme }, { children: [isActive && account && _jsx("p", { children: account }), isActive && account && _jsx("button", __assign({ onClick: handleApprove }, { children: "Approve USDT" })), _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-tokeninfoname" }, { children: "Tokens" })), _jsx(Flex, { className: "column column-tokenicons" })] })), _jsxs(Flex, __assign({ className: "column column-bondinfo" }, { children: [_jsxs(Flex, __assign({ className: "column column-discount" }, { 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(Svg, { icon: "sort", width: "12px" })] })), _jsxs(Flex, __assign({ className: "column column-arr" }, { 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(Svg, { icon: "sort", width: "12px" })] })), _jsxs(Flex, __assign({ className: "column column-term" }, { 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(Svg, { icon: "sort", width: "12px" })] })), _jsxs(Flex, __assign({ className: "column column-tokensremaining" }, { 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(Svg, { icon: "sort", width: "12px" })] })), _jsx(Flex, { className: "column column-hotbond" })] }))] })), sortedBonds.map(function (bond) {
190
+ return (_jsxs(ThemeUIProvider, __assign({ theme: defaultTheme }, { children: [isActive && account && _jsx("p", { children: account }), isActive && account && _jsx("button", __assign({ onClick: handleApprove }, { children: "Approve USDT" })), _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-tokeninfoname" }, { children: "Tokens" })), _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" }, { 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" }, { children: _jsx(Svg, { icon: "sort", width: "12px" }) }))] })), _jsxs(Flex, __assign({ className: "column column-term" }, { 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" }, { 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" }, { children: _jsx(Svg, { icon: "sort", width: "12px" }) }))] })), _jsx(Flex, { className: "column column-hotbond" })] }))] })), sortedBonds.map(function (bond) {
191
191
  var _a, _b, _c, _d, _e;
192
192
  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: "".concat((_c = bond === null || bond === void 0 ? void 0 : bond.discount) === null || _c === void 0 ? void 0 : _c.toFixed(2), "%") })), _jsx(Flex, __assign({ className: "column column-arr" }, { children: "".concat(((((_d = bond === null || bond === void 0 ? void 0 : bond.discount) !== null && _d !== void 0 ? _d : 0) * 365) / vestingTime(bond.vestingTerm).days).toFixed(2), "%") })), _jsx(Flex, __assign({ className: "column column-term" }, { 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: {
193
193
  width: '127px',
@@ -23,7 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
23
23
  import { jsx as _jsx } from "theme-ui/jsx-runtime";
24
24
  import { icons } from './types';
25
25
  import { dynamicStyles } from './styles';
26
- import { Caret, External, Home, Calculator, Farm, Frame, Gnana, Info, More, NFA, Pool, Rocket, Trade, Vault, Ellipse, Twitter, Send, Error, Close, Collapse, TextLogo, ProfileLight, ProfileDark, ProfileIcon, ApeswapSmallLogo, Hamburger, Search, QuestionCircle, Success, Settings, Chart, Discord, Reddit, Medium, Instagram, Website, Arrow, SwapArrows, InfoSolid, SuccessOutline, Trash, Cancelled, ZapArrow, ZapIcon, Migrate, Message, Positions, MenuSettings, Fav, AbondFullLogo, AbondSmallLogo, FullLogo, Telegram, Island, Moon, AccountMonkey, Card, Cog, Bridge, Docs, Quiz, PlaceholderMonkey, SwitchArrows, Copy, HamburgerClosed, BillsM1, BillsM2, BillsM3, URL, Bubble, Audit, GreenShield, Chain, Verified, TickShield, Share, FilledURL, YellowQuestionMark, BananaIcon, ScrollTop, Explorer, LiquidityIcon, PolygonNew, Fire, Hot, NavCaret, Logout, Wallet, Receipt, ApebondLogo, Question, Chat, DocsV2, Tag, Play, Watch, XNew, DiscordNew, WebsiteNew, WhitepaperNew, Calendar, QuestionFill, TelegramNew, Warning, Insight, Expand, LineChart, } from './Icons';
26
+ import { Caret, External, Home, Calculator, Farm, Frame, Gnana, Info, More, NFA, Pool, Rocket, Trade, Vault, Ellipse, Twitter, Send, Error, Close, Collapse, TextLogo, ProfileLight, ProfileDark, ProfileIcon, ApeswapSmallLogo, Hamburger, Search, QuestionCircle, Success, Settings, Chart, Discord, Reddit, Medium, Instagram, Website, Arrow, SwapArrows, InfoSolid, SuccessOutline, Trash, Cancelled, ZapArrow, ZapIcon, Migrate, Message, Positions, MenuSettings, Fav, AbondFullLogo, AbondSmallLogo, FullLogo, Telegram, Island, Moon, AccountMonkey, Card, Cog, Bridge, Docs, Quiz, PlaceholderMonkey, SwitchArrows, Copy, HamburgerClosed, BillsM1, BillsM2, BillsM3, URL, Bubble, Audit, GreenShield, Chain, Verified, TickShield, Share, FilledURL, YellowQuestionMark, BananaIcon, ScrollTop, Explorer, LiquidityIcon, PolygonNew, Fire, Hot, NavCaret, Logout, Wallet, Receipt, ApebondLogo, Question, Chat, DocsV2, Tag, Play, Watch, XNew, DiscordNew, WebsiteNew, WhitepaperNew, Calendar, QuestionFill, TelegramNew, Warning, Insight, Expand, LineChart, Sort, } from './Icons';
27
27
  import { BSC, BANANA, BNB, ETH, GNANA, POLYGON, TLOS, ARBITRUM, FANTOM, AVAX, OPTIMISM, CELO, CRONOS, POLYGONZK, GNOSIS, OKEX, ABOND, INEVM, LINEA, LIGHTLINK, IOTA, BASE, } from './tokens';
28
28
  import { BinanceChain, Bitkeep, Brave, Coinbase, MadWallet, MathWallet, Metamask, Nabox, OKX, OntoWallet, SafePalWallet, SocialLogin, TokenPocket, TorusWallet, TrustWallet, Unstoppable, WalletConnect, WalletImage, } from './walletIcons';
29
29
  import Language from './Icons/LanguageIcon';
@@ -336,6 +336,8 @@ var Svg = function (_a) {
336
336
  return _jsx(LineChart, __assign({}, props, { getStyles: getStyles }));
337
337
  case icons.BASE:
338
338
  return _jsx(BASE, __assign({}, props, { getStyles: getStyles }));
339
+ case icons.SORT:
340
+ return _jsx(Sort, __assign({}, props, { getStyles: getStyles }));
339
341
  default:
340
342
  return null;
341
343
  }
@@ -148,7 +148,7 @@ export declare enum icons {
148
148
  TelegramNew = "telegramnew",
149
149
  CALENDAR = "calendar",
150
150
  QuestionFill = "questionFill",
151
- Sort = "sort"
151
+ SORT = "sort"
152
152
  }
153
153
  export declare enum directions {
154
154
  LEFT = "left",
@@ -153,7 +153,7 @@ export var icons;
153
153
  icons["TelegramNew"] = "telegramnew";
154
154
  icons["CALENDAR"] = "calendar";
155
155
  icons["QuestionFill"] = "questionFill";
156
- icons["Sort"] = "sort";
156
+ icons["SORT"] = "sort";
157
157
  })(icons || (icons = {}));
158
158
  export var directions;
159
159
  (function (directions) {
@@ -81,7 +81,7 @@
81
81
  }
82
82
 
83
83
  .column.column-discount {
84
- flex-direction: column;
84
+ flex-direction: row;
85
85
  justify-content: center;
86
86
  align-items: center;
87
87
  width: 20%;
@@ -98,21 +98,21 @@
98
98
  }
99
99
 
100
100
  .column.column-arr {
101
- flex-direction: column;
101
+ flex-direction: row;
102
102
  justify-content: center;
103
103
  align-items: center;
104
104
  width: 20%;
105
105
  }
106
106
 
107
107
  .column.column-term {
108
- flex-direction: column;
108
+ flex-direction: row;
109
109
  justify-content: center;
110
110
  align-items: center;
111
111
  width: 20%;
112
112
  }
113
113
 
114
114
  .column.column-tokensremaining {
115
- flex-direction: column;
115
+ flex-direction: row;
116
116
  justify-content: center;
117
117
  align-items: center;
118
118
  width: 20%;
@@ -125,6 +125,12 @@
125
125
  width: 10%;
126
126
  }
127
127
 
128
+ .column.tooltip {
129
+ flex-direction: row;
130
+ align-items: center;
131
+ justify-content: space-around;
132
+ }
133
+
128
134
  .column.header-icon {
129
135
  padding-left: 5px;
130
136
  align-items: start;
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.383",
6
+ "version": "1.0.385",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.es.js",
9
9
  "types": "dist/index.d.ts",