@ape.swap/bonds-sdk 1.0.454 → 1.0.455

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.
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { BondsDataResponse } from "../../types/bonds";
3
- import '../../../scss/BondRow.scss';
3
+ import '../../scss/BondRow.scss';
4
4
  interface BondRowProps {
5
5
  key: string;
6
6
  bond: BondsDataResponse;
@@ -22,7 +22,7 @@ import getTimePeriods from "../../utils/getTimePeriods";
22
22
  import { BLOCK_EXPLORER } from "../../config/constants/chains";
23
23
  import { useState } from "react";
24
24
  import { useNavigate } from "react-router-dom";
25
- import '../../../scss/BondRow.scss';
25
+ import '../../scss/BondRow.scss';
26
26
  var BondRow = function (_a) {
27
27
  var _b, _c, _d;
28
28
  var bond = _a.bond, hotBonds = _a.hotBonds;
@@ -1,6 +1,6 @@
1
1
  /** @jsxImportSource theme-ui */
2
2
  import React from 'react';
3
- import '../../../scss/BondRowHeader.scss';
3
+ import '../../scss/BondRowHeader.scss';
4
4
  interface BondRowHeaderProps {
5
5
  inputValue: string;
6
6
  onInputChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
@@ -14,7 +14,7 @@ import { Flex } from 'theme-ui';
14
14
  import { Input } from '../uikit-sdk/Input';
15
15
  import { Svg, TooltipBubble } from '../uikit-sdk';
16
16
  import { TooltipText } from '../../enum/tooltips';
17
- import '../../../scss/BondRowHeader.scss';
17
+ import '../../scss/BondRowHeader.scss';
18
18
  var BondRowHeader = function (_a) {
19
19
  var inputValue = _a.inputValue, onInputChange = _a.onInputChange, onSort = _a.onSort;
20
20
  return (_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: onInputChange, variant: "search", sx: { fontWeight: 400, background: 'white2', height: '30px', fontSize: '14px', color: 'white' }, 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 onSort('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 onSort('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 onSort('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 onSort('tokensRemaining'); } }, { children: _jsx(Svg, { icon: "sort", width: "12px" }) }))] })), _jsx(Flex, { className: "column column-hotbond" })] }))] })));
@@ -1,6 +1,6 @@
1
1
  /** @jsxImportSource theme-ui */
2
2
  import React from 'react';
3
- import '../../scss/BondModal.scss';
3
+ import '../../../scss/BondModal.scss';
4
4
  declare const BondModal: ({ isOpen, onClose, bondAddress }: {
5
5
  isOpen: boolean;
6
6
  onClose: () => void;
@@ -50,23 +50,23 @@ import { jsxs as _jsxs, jsx as _jsx } from "theme-ui/jsx-runtime";
50
50
  import React, { useEffect, useState } from 'react';
51
51
  import { Flex, Input, ThemeUIProvider } from 'theme-ui';
52
52
  import { useWeb3React } from '@web3-react/core';
53
- import { defaultTheme } from '../../theme';
54
- import getTimePeriods from '../../utils/getTimePeriods';
53
+ import { defaultTheme } from '../../../theme';
54
+ import getTimePeriods from '../../../utils/getTimePeriods';
55
55
  import axios from 'axios';
56
56
  import { BigNumber } from 'bignumber.js';
57
- import { getFirstNonZeroDigits } from '../../utils/roundNumber';
57
+ import { getFirstNonZeroDigits } from '../../../utils/roundNumber';
58
58
  import { useNavigate } from 'react-router-dom';
59
- import { isNumber } from '../../utils/numbers';
60
- import { TooltipBubble, Button, Svg, ListTag } from '../uikit-sdk';
61
- import { TooltipText } from '../../enum/tooltips';
59
+ import { isNumber } from '../../../utils/numbers';
60
+ import { TooltipBubble, Button, Svg, ListTag } from '../../uikit-sdk';
61
+ import { TooltipText } from '../../../enum/tooltips';
62
62
  import { ethers } from 'ethers';
63
- import { adjustDecimals } from "../../utils/convertToTokenValue";
64
- import TokenImage from '../uikit-sdk/TokenImage';
65
- import '../../scss/BondModal.scss';
66
- import BOND_ABI from '../../config/abi/bond.json';
67
- import ERC_20_ABI from '../../config/abi/bond.json';
68
- import { NETWORK_ICONS } from '../../config/constants/chains';
63
+ import { adjustDecimals } from "../../../utils/convertToTokenValue";
64
+ import TokenImage from '../../uikit-sdk/TokenImage';
65
+ import BOND_ABI from '../../../config/abi/bond.json';
66
+ import ERC_20_ABI from '../../../config/abi/bond.json';
67
+ import { NETWORK_ICONS } from '../../../config/constants/chains';
69
68
  import { formatUSDNumber, getPremiumColor, premium, youGet, youGetUSD, youSpend, youSpendUSD } from './helper';
69
+ import '../../../scss/BondModal.scss';
70
70
  var BondModal = function (_a) {
71
71
  var isOpen = _a.isOpen, onClose = _a.onClose, bondAddress = _a.bondAddress;
72
72
  if (!isOpen)
@@ -1,4 +1,4 @@
1
- import { BondsDataResponse } from "../../types/bonds";
1
+ import { BondsDataResponse } from "../../../types/bonds";
2
2
  declare function formatNumber(input: string): string;
3
3
  declare function formatUSDNumber(input: string): string;
4
4
  declare const youSpend: (inputValue: string) => string;
@@ -1,5 +1,5 @@
1
1
  import BigNumber from "bignumber.js";
2
- import { formatNumberSI } from "../../utils/formatNumber";
2
+ import { formatNumberSI } from "../../../utils/formatNumber";
3
3
  function formatNumber(input) {
4
4
  var number = new BigNumber(input);
5
5
  if (number.isNaN())
@@ -0,0 +1,9 @@
1
+ /** @jsxImportSource theme-ui */
2
+ import React from 'react';
3
+ import '../../../scss/YourBondsModal.scss';
4
+ declare const YourBondsModal: ({ isOpen, onClose, bondAddress }: {
5
+ isOpen: boolean;
6
+ onClose: () => void;
7
+ bondAddress: string | null;
8
+ }) => React.JSX.Element | null;
9
+ export default YourBondsModal;
@@ -0,0 +1,150 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
+ return new (P || (P = Promise))(function (resolve, reject) {
15
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
19
+ });
20
+ };
21
+ var __generator = (this && this.__generator) || function (thisArg, body) {
22
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
+ function verb(n) { return function (v) { return step([n, v]); }; }
25
+ function step(op) {
26
+ if (f) throw new TypeError("Generator is already executing.");
27
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
28
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
+ if (y = 0, t) op = [op[0] & 2, t.value];
30
+ switch (op[0]) {
31
+ case 0: case 1: t = op; break;
32
+ case 4: _.label++; return { value: op[1], done: false };
33
+ case 5: _.label++; y = op[1]; op = [0]; continue;
34
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
+ default:
36
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
+ if (t[2]) _.ops.pop();
41
+ _.trys.pop(); continue;
42
+ }
43
+ op = body.call(thisArg, _);
44
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
+ }
47
+ };
48
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "theme-ui/jsx-runtime";
49
+ /** @jsxImportSource theme-ui */
50
+ import React, { useEffect, useState } from 'react';
51
+ import { Flex, ThemeUIProvider } from 'theme-ui';
52
+ import { useWeb3React } from '@web3-react/core';
53
+ import axios from 'axios';
54
+ import { BigNumber } from 'bignumber.js';
55
+ import { AnimatePresence, motion } from 'framer-motion';
56
+ import { MAINNET_CHAINS, NETWORK_ICONS } from '../../../config/constants/chains';
57
+ import { fetchUserOwnedBillsDataAsync } from '../../../pages/YourBonds/fetchBillsUser';
58
+ import { getBalanceNumber } from '../../../utils/getBalanceNumber';
59
+ import { getFirstNonZeroDigits } from '../../../utils/roundNumber';
60
+ import { defaultTheme } from '../../../theme';
61
+ import TokenImage from '../../uikit-sdk/TokenImage';
62
+ import { Button, ListTag, Skeleton, Svg, Text, TooltipBubble } from '../../uikit-sdk';
63
+ import { UserBillTooltipText } from '../../../enum/tooltips';
64
+ import { getPendingVesting } from '../../../hooks/usePendingVesting';
65
+ import { formatNumberSI } from '../../../utils/formatNumber';
66
+ import { StyledHeadingText, TraitsContentContainer } from './styles';
67
+ import '../../../scss/YourBondsModal.scss';
68
+ var YourBondsModal = function (_a) {
69
+ var isOpen = _a.isOpen, onClose = _a.onClose, bondAddress = _a.bondAddress;
70
+ if (!isOpen)
71
+ return null;
72
+ var _b = useWeb3React(), account = _b.account, chainId = _b.chainId, isActive = _b.isActive;
73
+ // Fetch data for user owned bill
74
+ var _c = useState([]), bondData = _c[0], setBondData = _c[1];
75
+ var _d = useState([]), userOwnedBillsData = _d[0], setUserOwnedBillsData = _d[1];
76
+ useEffect(function () {
77
+ axios.get('https://realtime-api.ape.bond/bonds').then(function (response) {
78
+ var bond = response.data.bonds.filter(function (x) {
79
+ return x.billAddress.toLowerCase() === (bondAddress === null || bondAddress === void 0 ? void 0 : bondAddress.toLowerCase());
80
+ });
81
+ setBondData(bond);
82
+ });
83
+ }, [bondAddress]);
84
+ useEffect(function () {
85
+ var fetchData = function () { return __awaiter(void 0, void 0, void 0, function () {
86
+ var results, error_1;
87
+ return __generator(this, function (_a) {
88
+ switch (_a.label) {
89
+ case 0:
90
+ if (!account) return [3 /*break*/, 4];
91
+ _a.label = 1;
92
+ case 1:
93
+ _a.trys.push([1, 3, , 4]);
94
+ return [4 /*yield*/, Promise.all(MAINNET_CHAINS.map(function (chain) { return fetchUserOwnedBillsDataAsync(chain, account, bondData); }))];
95
+ case 2:
96
+ results = _a.sent();
97
+ setUserOwnedBillsData(results);
98
+ return [3 /*break*/, 4];
99
+ case 3:
100
+ error_1 = _a.sent();
101
+ console.error('Error fetching user owned bills data:', error_1);
102
+ return [3 /*break*/, 4];
103
+ case 4: return [2 /*return*/];
104
+ }
105
+ });
106
+ }); };
107
+ fetchData();
108
+ }, [account]);
109
+ // Functions to calculate display values for modal
110
+ var totalPending = function (userBill) {
111
+ var _a, _b, _c, _d;
112
+ return getBalanceNumber(new BigNumber((_a = userBill === null || userBill === void 0 ? void 0 : userBill.payout) !== null && _a !== void 0 ? _a : 0), (_d = (_c = (_b = userBill.bond.earnToken) === null || _b === void 0 ? void 0 : _b.decimals) === null || _c === void 0 ? void 0 : _c[chainId]) !== null && _d !== void 0 ? _d : 18);
113
+ };
114
+ var claimable = function (userBill) {
115
+ var _a, _b, _c;
116
+ return getBalanceNumber(new BigNumber(userBill.pendingRewards), (_c = (_b = (_a = userBill.bond.earnToken) === null || _a === void 0 ? void 0 : _a.decimals) === null || _b === void 0 ? void 0 : _b[chainId]) !== null && _c !== void 0 ? _c : 18);
117
+ };
118
+ var earnTokenPrice = function (bond) {
119
+ var _a;
120
+ return getFirstNonZeroDigits(parseFloat((_a = bond === null || bond === void 0 ? void 0 : bond.payoutTokenPrice) !== null && _a !== void 0 ? _a : '0'));
121
+ };
122
+ var BILL_ATTRIBUTES = ['The Legend', 'The Location', 'The Moment', 'The Trend', 'The Innovation'];
123
+ var _e = useState(false), isOpenTraits = _e[0], setIsOpenTraits = _e[1];
124
+ var _f = useState(false), billRendered = _f[0], setBillRendered = _f[1];
125
+ useEffect(function () {
126
+ if (userOwnedBillsData.length > 0) {
127
+ setBillRendered(true);
128
+ }
129
+ }, [userOwnedBillsData]);
130
+ return (_jsx(ThemeUIProvider, __assign({ theme: defaultTheme }, { children: billRendered && (_jsx(_Fragment, { children: userOwnedBillsData.flat().map(function (data) {
131
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
132
+ var userBill = data.userOwnedBills.find(function (bill) { return bill.bond.billAddress.toLowerCase() === (bondAddress === null || bondAddress === void 0 ? void 0 : bondAddress.toLowerCase()); });
133
+ var attributes = (_b = (_a = userBill === null || userBill === void 0 ? void 0 : userBill.nftData) === null || _a === void 0 ? void 0 : _a.data.attributes) === null || _b === void 0 ? void 0 : _b.filter(function (attrib) { return BILL_ATTRIBUTES.includes(attrib.trait_type); });
134
+ return userBill ? (_jsx(React.Fragment, { children: _jsx(Flex, __assign({ className: "yourbondsmodal backdrop" }, { children: _jsxs(Flex, __assign({ className: "yourbondsmodal content" }, { children: [_jsx(Flex, __assign({ className: "yourbondsmodal header" }, { children: _jsx(Flex, __assign({ className: "svg-close", onClick: onClose }, { children: _jsx(Svg, { icon: "close" }) })) })), _jsxs(Flex, __assign({ className: "yourbondsmodal table-container" }, { children: [_jsx(Flex, __assign({ className: "yourbondsmodal bondimage" }, { children: _jsx("img", { src: (_c = userBill.nftData) === null || _c === void 0 ? void 0 : _c.data.image }) })), _jsxs(Flex, __assign({ className: "yourbondsmodal yourbondinfo" }, { children: [_jsxs(Flex, __assign({ className: "yourbondinfo title-container" }, { children: [_jsx(Flex, __assign({ className: "title-container bondicon" }, { children: _jsxs("div", __assign({ className: "icon-container" }, { children: [_jsx(Svg, { width: 18, height: 18, icon: (_d = NETWORK_ICONS === null || NETWORK_ICONS === void 0 ? void 0 : NETWORK_ICONS[userBill.bond.chainId]) !== null && _d !== void 0 ? _d : 'question' }), _jsx(TokenImage, { symbol: (_e = userBill.bond.showcaseTokenName) !== null && _e !== void 0 ? _e : userBill.bond.payoutTokenName, size: 40 })] })) })), _jsx(Flex, __assign({ className: "title-container tokenname" }, { children: _jsx(StyledHeadingText, { children: (_f = userBill.bond) === null || _f === void 0 ? void 0 : _f.showcaseTokenName }) })), _jsx(Flex, __assign({ className: "title-container tokentags" }, { children: (_g = userBill.bond.tags) === null || _g === void 0 ? void 0 : _g.slice(0, 1).map(function (tag) {
135
+ return (_jsx(Flex, __assign({ sx: { marginRight: '10px' } }, { children: _jsx(ListTag, { variant: tag === 'Cex Fund' ? 'cex_fund' : 'liquidity', text: tag === null || tag === void 0 ? void 0 : tag.toUpperCase() }) }), tag));
136
+ }) })), _jsxs(Text, __assign({ sx: { color: 'text', opacity: '0.6', fontSize: ['12px', '12px', '12px', '16px'] } }, { children: ["#", userBill.id] }))] })), _jsxs(Flex, __assign({ className: "yourbondinfo blocks-container" }, { children: [_jsx(Flex, __assign({ className: "yourbondinfo-block attributes" }, { children: _jsxs(Flex, __assign({ sx: { flexDirection: 'column', width: '100%' } }, { children: [_jsxs(Flex, __assign({ sx: {
137
+ justifyContent: 'space-between',
138
+ height: '24px',
139
+ background: 'white3',
140
+ px: '15px',
141
+ borderRadius: "".concat(isOpenTraits ? '6px 6px 0px 0px' : 'normal'),
142
+ display: ['none', 'none', 'none', 'flex'],
143
+ }, onClick: function () { return setIsOpenTraits(!isOpenTraits); } }, { children: [_jsxs(Flex, __assign({ sx: { gap: '10px', alignItems: 'center' } }, { children: [_jsx(Svg, { icon: "tag", direction: "down" }), _jsx(Text, __assign({ sx: { fontSize: '12px', fontWeight: 400, color: 'text', opacity: '0.6' } }, { children: "Traits" }))] })), _jsx(Svg, { icon: "caret", direction: isOpenTraits ? 'up' : 'down' })] })), _jsx(AnimatePresence, { children: isOpenTraits && (_jsx(motion.div, __assign({ initial: { height: 0 }, animate: { height: 'fit-content' }, transition: { opacity: { duration: 0.2 } }, exit: { height: 0 }, sx: { overflow: 'hidden', width: '100%' } }, { children: _jsx(Flex, __assign({ sx: { flexDirection: 'column', gap: '1px' } }, { children: attributes
144
+ ? attributes.map(function (a) { return (_jsxs(TraitsContentContainer, { children: [_jsx(Text, __assign({ sx: { fontSize: '10px', fontWeight: 500 } }, { children: a === null || a === void 0 ? void 0 : a.trait_type })), _jsx(Text, __assign({ sx: { fontSize: '10px', fontWeight: 500 } }, { children: a === null || a === void 0 ? void 0 : a.value }))] }, a.value)); })
145
+ : BILL_ATTRIBUTES.map(function (attrib) {
146
+ return (_jsxs(TraitsContentContainer, { children: [_jsx(Text, __assign({ sx: { fontSize: '10px', fontWeight: 500 } }, { children: attrib })), _jsx(Skeleton, { width: "150px" })] }, attrib));
147
+ }) })) }))) })] })) })), _jsxs(Flex, __assign({ className: "yourbondinfo-block row-vested" }, { children: [_jsxs(Flex, __assign({ className: "yourbondinfo-block header" }, { children: [_jsx(Flex, __assign({ className: "yourbondinfo-block header-title" }, { children: "Fully Vested" })), _jsx(Flex, __assign({ className: "yourbondinfo-block header-tooltip" }, { children: _jsx(TooltipBubble, __assign({ body: _jsx(Flex, { children: UserBillTooltipText.FullyVested }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)" }, { children: _jsx(Flex, __assign({ className: "block-header icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) })) })) }))] })), _jsxs(Flex, __assign({ className: "yourbondinfo-block info" }, { children: [_jsx(Flex, { className: "block-info icon" }), _jsx(Flex, __assign({ className: "block-info text" }, { children: _jsx(Text, __assign({ sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 } }, { children: getPendingVesting(userBill.lastBlockTimestamp, userBill.vesting) })) }))] }))] })), _jsxs(Flex, __assign({ className: "yourbondinfo-block row-pending" }, { children: [_jsxs(Flex, __assign({ className: "yourbondinfo-block header" }, { children: [_jsx(Flex, __assign({ className: "yourbondinfo-block header-title" }, { children: "Pending" })), _jsx(Flex, __assign({ className: "yourbondinfo-block header-tooltip" }, { children: _jsx(TooltipBubble, __assign({ body: _jsx(Flex, { children: UserBillTooltipText.Pending }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)" }, { children: _jsx(Flex, __assign({ className: "block-header icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) })) })) }))] })), _jsxs(Flex, __assign({ className: "yourbondinfo-block info" }, { children: [_jsx(Flex, __assign({ className: "block-info icon" }, { children: _jsxs("div", __assign({ className: "icon-container-small" }, { children: [_jsx(Svg, { width: 10, height: 10, icon: (_h = NETWORK_ICONS === null || NETWORK_ICONS === void 0 ? void 0 : NETWORK_ICONS[userBill.bond.chainId]) !== null && _h !== void 0 ? _h : 'question' }), _jsx(TokenImage, { symbol: (_j = userBill.bond.showcaseTokenName) !== null && _j !== void 0 ? _j : userBill.bond.payoutTokenName, size: 25 })] })) })), _jsxs(Flex, __assign({ className: "block-info text" }, { children: [_jsx(Text, __assign({ sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 } }, { children: formatNumberSI(parseFloat(totalPending(userBill).toFixed(4)), 4) })), _jsx(Text, __assign({ sx: { fontSize: ['10px', '10px', '10px', '12px'], fontWeight: [500, 500, 500, 400], paddingLeft: '10px' } }, { children: "($".concat((totalPending(userBill) * ((_k = parseFloat(earnTokenPrice(userBill.bond))) !== null && _k !== void 0 ? _k : 0)).toFixed(2), ")") }))] }))] }))] })), _jsxs(Flex, __assign({ className: "yourbondinfo-block row-claimable" }, { children: [_jsxs(Flex, __assign({ className: "yourbondinfo-block header" }, { children: [_jsx(Flex, __assign({ className: "yourbondinfo-block header-title" }, { children: "Claimable" })), _jsx(Flex, __assign({ className: "yourbondinfo-block header-tooltip" }, { children: _jsx(TooltipBubble, __assign({ body: _jsx(Flex, { children: UserBillTooltipText.Claimable }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)" }, { children: _jsx(Flex, __assign({ className: "block-header icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) })) })) }))] })), _jsxs(Flex, __assign({ className: "yourbondinfo-block info" }, { children: [_jsx(Flex, __assign({ className: "block-info icon" }, { children: _jsxs("div", __assign({ className: "icon-container-small" }, { children: [_jsx(Svg, { width: 10, height: 10, icon: (_l = NETWORK_ICONS === null || NETWORK_ICONS === void 0 ? void 0 : NETWORK_ICONS[userBill.bond.chainId]) !== null && _l !== void 0 ? _l : 'question' }), _jsx(TokenImage, { symbol: (_m = userBill.bond.showcaseTokenName) !== null && _m !== void 0 ? _m : userBill.bond.payoutTokenName, size: 25 })] })) })), _jsxs(Flex, __assign({ className: "block-info text" }, { children: [_jsx(Text, __assign({ sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 } }, { children: formatNumberSI(parseFloat(claimable(userBill).toFixed(4)), 4) })), _jsx(Text, __assign({ sx: { fontSize: ['10px', '10px', '10px', '12px'], fontWeight: [500, 500, 500, 400], paddingLeft: '10px' } }, { children: "($".concat((claimable(userBill) * ((_o = parseFloat(earnTokenPrice(userBill.bond))) !== null && _o !== void 0 ? _o : 0)).toFixed(2), ")") }))] }))] }))] }))] })), _jsxs(Flex, __assign({ className: "yourbondinfo button-container" }, { children: [_jsx(Flex, __assign({ className: "button-container claim" }, { children: _jsx(Button, { children: "CLAIM" }) })), _jsx(Flex, __assign({ className: "button-container transfer" }, { children: _jsx(Button, __assign({ variant: "secondary" }, { children: "TRANSFER" })) }))] }))] }))] }))] })) })) }, userBill.bond.billAddress)) : null;
148
+ }) })) })));
149
+ };
150
+ export default YourBondsModal;
@@ -3,7 +3,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
3
3
  return cooked;
4
4
  };
5
5
  import styled from "@emotion/styled";
6
- import { Flex, Text } from "../uikit-sdk";
6
+ import { Flex, Text } from "../../uikit-sdk";
7
7
  export var StyledHeadingText = styled(Text)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-size: 12px;\n align-self: center;\n @media screen and (min-width: 1180px) {\n font-size: 22px;\n }\n"], ["\n font-size: 12px;\n align-self: center;\n @media screen and (min-width: 1180px) {\n font-size: 22px;\n }\n"])));
8
8
  export var TraitsContentContainer = styled(Flex)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n justify-content: space-between;\n background: ", ";\n padding: 0px 15px;\n &:last-child {\n border-radius: 0px 0px 6px 6px;\n }\n @media screen and (max-width: 667px) {\n :first-of-type {\n border-radius: 6px 6px 0px 0px;\n }\n }\n"], ["\n justify-content: space-between;\n background: ", ";\n padding: 0px 15px;\n &:last-child {\n border-radius: 0px 0px 6px 6px;\n }\n @media screen and (max-width: 667px) {\n :first-of-type {\n border-radius: 6px 6px 0px 0px;\n }\n }\n"])), function (_a) {
9
9
  var theme = _a.theme;
@@ -62,7 +62,7 @@ import { getBalanceNumber } from '../../utils/getBalanceNumber';
62
62
  import { MAINNET_CHAINS, NETWORK_ICONS } from '../../config/constants/chains';
63
63
  import { getPendingVesting } from '../../hooks/usePendingVesting';
64
64
  import { formatNumberSI } from '../../utils/formatNumber';
65
- import { StyledHeadingText, TraitsContentContainer } from './styles';
65
+ import { StyledHeadingText, TraitsContentContainer } from '../Modals/YourBondsModal/styles';
66
66
  import { AnimatePresence, motion } from 'framer-motion';
67
67
  import { fetchUserOwnedBillsDataAsync } from '../../pages/YourBonds/fetchBillsUser';
68
68
  var YourBondsModal = function (_a) {
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import Bonds from './pages/Bonds/Bonds';
2
2
  import BondSingle from './pages/BondSingle/BondSingle';
3
3
  import YourBonds from './pages/YourBonds/YourBonds';
4
- import BondModal from './components/BondModal/BondModal';
5
- import YourBondsModal from './components/YourBondsModal/YourBondsModal';
4
+ import BondModal from './components/Modals/BondModal/BondModal';
5
+ import YourBondsModal from './components/Modals/YourBondsModal/YourBondsModal';
6
6
  export { Bonds, BondSingle, BondModal, YourBonds, YourBondsModal };
package/dist/index.js CHANGED
@@ -2,6 +2,6 @@
2
2
  import Bonds from './pages/Bonds/Bonds';
3
3
  import BondSingle from './pages/BondSingle/BondSingle';
4
4
  import YourBonds from './pages/YourBonds/YourBonds';
5
- import BondModal from './components/BondModal/BondModal';
6
- import YourBondsModal from './components/YourBondsModal/YourBondsModal';
5
+ import BondModal from './components/Modals/BondModal/BondModal';
6
+ import YourBondsModal from './components/Modals/YourBondsModal/YourBondsModal';
7
7
  export { Bonds, BondSingle, BondModal, YourBonds, YourBondsModal };
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.454",
6
+ "version": "1.0.455",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.es.js",
9
9
  "types": "dist/index.d.ts",