@ape.swap/bonds-sdk 3.0.82 → 3.0.83
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/main.js +8 -13
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -17989,6 +17989,7 @@ var types = {};
|
|
|
17989
17989
|
ChainId[(ChainId['SOL'] = 7565164)] = 'SOL';
|
|
17990
17990
|
ChainId[(ChainId['BERACHAIN'] = 80094)] = 'BERACHAIN';
|
|
17991
17991
|
ChainId[(ChainId['KATANA_TESTNET'] = 129399)] = 'KATANA_TESTNET';
|
|
17992
|
+
ChainId[(ChainId['KATANA'] = 747474)] = 'KATANA';
|
|
17992
17993
|
})((ChainId = exports.ChainId || (exports.ChainId = {})));
|
|
17993
17994
|
var LiquidityDex
|
|
17994
17995
|
;(function (LiquidityDex) {
|
|
@@ -70244,7 +70245,7 @@ const getUserBonds = (account, bondList, chains, tokenPrices, apiUrl) => __await
|
|
|
70244
70245
|
});
|
|
70245
70246
|
|
|
70246
70247
|
const YourBondsModal = ({ onDismiss, bill }) => {
|
|
70247
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15
|
|
70248
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15;
|
|
70248
70249
|
// Hooks
|
|
70249
70250
|
const SDKConfig = useSDKConfig();
|
|
70250
70251
|
const chainId = useChainId();
|
|
@@ -70360,34 +70361,28 @@ const YourBondsModal = ({ onDismiss, bill }) => {
|
|
|
70360
70361
|
? attributes.map((a) => (jsxs(Flex$1, { sx: { background: 'white4', width: '100%', padding: '2px 8px' }, children: [jsx$2(Text, { sx: { fontSize: '10px', fontWeight: 500 }, children: a === null || a === void 0 ? void 0 : a.trait_type }), jsx$2(Text, { sx: { fontSize: '10px', fontWeight: 500 }, children: a === null || a === void 0 ? void 0 : a.value })] }, a.value)))
|
|
70361
70362
|
: BILL_ATTRIBUTES.map((attrib) => {
|
|
70362
70363
|
return (jsxs(Flex$1, { sx: { background: 'white4', width: '100%', padding: '2px 8px' }, children: [jsx$2(Text, { sx: { fontSize: '10px', fontWeight: 500 }, children: attrib }), jsx$2(Skeleton, { width: "150px" })] }, attrib));
|
|
70363
|
-
}) }) })) })] }), ((_t = bondNFTData === null || bondNFTData === void 0 ? void 0 : bondNFTData.data) === null || _t === void 0 ? void 0 : _t.deposit) && (jsxs(Flex$1, { className: "yourbondinfo-block row-vested", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "You Spent" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.YouSpent }), width: "270px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsxs(Flex$1, { className: "yourbondinfo-block info", children: [jsx$2(Flex$1, { className: "block-info icon", children: userBill && (jsx$2(TokenImage, { symbol: (_v = (
|
|
70364
|
-
? formatNumberSI((_z = (_y = bondNFTData === null || bondNFTData === void 0 ? void 0 : bondNFTData.data) === null || _y === void 0 ? void 0 : _y.deposit) === null || _z === void 0 ? void 0 : _z.toFixed(4), 4)
|
|
70365
|
-
: '----' }), jsxs(Text, { sx: {
|
|
70364
|
+
}) }) })) })] }), ((_t = bondNFTData === null || bondNFTData === void 0 ? void 0 : bondNFTData.data) === null || _t === void 0 ? void 0 : _t.deposit) && (jsxs(Flex$1, { className: "yourbondinfo-block row-vested", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "You Spent" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.YouSpent }), width: "270px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsx$2(Flex$1, { className: "yourbondinfo-block info", children: jsx$2(Flex$1, { className: "block-info text", children: jsxs(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: ["$", (_u = bondNFTData === null || bondNFTData === void 0 ? void 0 : bondNFTData.data) === null || _u === void 0 ? void 0 : _u.dollarValue.toFixed(2)] }) }) })] })), jsxs(Flex$1, { className: "yourbondinfo-block row-vested", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "Fully Vested" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.FullyVested }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsxs(Flex$1, { className: "yourbondinfo-block info", children: [jsx$2(Flex$1, { className: "block-info icon" }), jsx$2(Flex$1, { className: "block-info text", children: jsxs(Flex$1, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: [vestingTimeRemainingString(userBill), isPendingCliff && (jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsxs(Flex$1, { children: ["Bond will be claimable in", ' ', `${cliffCountdown.days !== 0 ? `${cliffCountdown.days} days` : cliffCountdown.hours !== 0 ? `${cliffCountdown.hours} hours` : `${cliffCountdown.minutes} mins`}`, "."] }), width: "180px", placement: "bottomRight", transformTip: "translate(13%, 0%)", children: jsx$2(Flex$1, { sx: { opacity: 0.6, ml: '6px' }, children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }))] }) })] })] }), jsxs(Flex$1, { className: "yourbondinfo-block row-pending", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "Pending" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.Pending }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsxs(Flex$1, { className: "yourbondinfo-block info", children: [jsx$2(Flex$1, { className: "block-info icon", children: userBill && (jsx$2(TokenImage, { symbol: (_w = (_v = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _v === void 0 ? void 0 : _v.showcaseTokenName) !== null && _w !== void 0 ? _w : (_y = (_x = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _x === void 0 ? void 0 : _x.earnToken) === null || _y === void 0 ? void 0 : _y.symbol, size: 25, chain: (_z = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _z === void 0 ? void 0 : _z.chainId })) }), jsxs(Flex$1, { className: "block-info text", children: [jsx$2(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: formatNumberSI(parseFloat(totalPending(userBill).toFixed(4)), 4) }), jsx$2(Text, { sx: {
|
|
70366
70365
|
fontSize: ['10px', '10px', '10px', '12px'],
|
|
70367
70366
|
fontWeight: [500, 500, 500, 400],
|
|
70368
70367
|
paddingLeft: '10px',
|
|
70369
|
-
}, children:
|
|
70368
|
+
}, children: `($${(totalPending(userBill) * ((_0 = earnTokenPrice === null || earnTokenPrice === void 0 ? void 0 : earnTokenPrice.price) !== null && _0 !== void 0 ? _0 : 0)).toFixed(2)})` })] })] })] }), jsxs(Flex$1, { className: "yourbondinfo-block row-claimable", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "Claimable" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.Claimable }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsxs(Flex$1, { className: "yourbondinfo-block info", children: [jsx$2(Flex$1, { className: "block-info icon", children: userBill && (jsx$2(TokenImage, { symbol: (_2 = (_1 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _1 === void 0 ? void 0 : _1.showcaseTokenName) !== null && _2 !== void 0 ? _2 : (_4 = (_3 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _3 === void 0 ? void 0 : _3.earnToken) === null || _4 === void 0 ? void 0 : _4.symbol, size: 25, chain: (_5 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _5 === void 0 ? void 0 : _5.chainId })) }), jsxs(Flex$1, { className: "block-info text", children: [jsx$2(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: formatNumberSI(parseFloat(claimable(userBill).toFixed(4)), 4) }), jsx$2(Text, { sx: {
|
|
70370
70369
|
fontSize: ['10px', '10px', '10px', '12px'],
|
|
70371
70370
|
fontWeight: [500, 500, 500, 400],
|
|
70372
70371
|
paddingLeft: '10px',
|
|
70373
|
-
}, children: `($${(
|
|
70372
|
+
}, children: `($${(claimable(userBill) * ((_6 = earnTokenPrice === null || earnTokenPrice === void 0 ? void 0 : earnTokenPrice.price) !== null && _6 !== void 0 ? _6 : 0)).toFixed(2)})` })] })] })] }), jsxs(Flex$1, { className: "yourbondinfo-block row-vested", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "Claimed" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.Claimed }), width: "250px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsxs(Flex$1, { className: "yourbondinfo-block info", children: [jsx$2(Flex$1, { className: "block-info icon", children: userBill && (jsx$2(TokenImage, { symbol: (_8 = (_7 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _7 === void 0 ? void 0 : _7.showcaseTokenName) !== null && _8 !== void 0 ? _8 : (_10 = (_9 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _9 === void 0 ? void 0 : _9.earnToken) === null || _10 === void 0 ? void 0 : _10.symbol, size: 25, chain: (_11 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _11 === void 0 ? void 0 : _11.chainId })) }), jsxs(Flex$1, { className: "block-info text", children: [jsx$2(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: formatNumberSI(parseFloat(claimed(userBill).toFixed(4)), 4) }), jsx$2(Text, { sx: {
|
|
70374
70373
|
fontSize: ['10px', '10px', '10px', '12px'],
|
|
70375
70374
|
fontWeight: [500, 500, 500, 400],
|
|
70376
70375
|
paddingLeft: '10px',
|
|
70377
|
-
}, children: `($${(
|
|
70378
|
-
fontSize: ['10px', '10px', '10px', '12px'],
|
|
70379
|
-
fontWeight: [500, 500, 500, 400],
|
|
70380
|
-
paddingLeft: '10px',
|
|
70381
|
-
}, children: `($${(claimed(userBill) * ((_18 = earnTokenPrice === null || earnTokenPrice === void 0 ? void 0 : earnTokenPrice.price) !== null && _18 !== void 0 ? _18 : 0)).toFixed(2)})` })] })] })] })] }), ((_19 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _19 === void 0 ? void 0 : _19.warningCard) && (jsx$2(Flex$1, { sx: {
|
|
70376
|
+
}, children: `($${(claimed(userBill) * ((_12 = earnTokenPrice === null || earnTokenPrice === void 0 ? void 0 : earnTokenPrice.price) !== null && _12 !== void 0 ? _12 : 0)).toFixed(2)})` })] })] })] })] }), ((_13 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _13 === void 0 ? void 0 : _13.warningCard) && (jsx$2(Flex$1, { sx: {
|
|
70382
70377
|
width: '100%',
|
|
70383
70378
|
background: '#DE62F366',
|
|
70384
70379
|
justifyContent: 'center',
|
|
70385
70380
|
borderRadius: 'normal',
|
|
70386
|
-
}, children: jsx$2(Text, { sx: { fontSize: '12px', fontWeight: 400, p: '2px 10px' }, children: jsx$2(SafeHTMLComponent, { html: (
|
|
70381
|
+
}, children: jsx$2(Text, { sx: { fontSize: '12px', fontWeight: 400, p: '2px 10px' }, children: jsx$2(SafeHTMLComponent, { html: (_14 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _14 === void 0 ? void 0 : _14.warningCard }) }) })), jsxs(Flex$1, { className: "yourbondinfo button-container", children: [jsx$2(Flex$1, { className: "button-container claim", children: userBill && chainId !== (userBill === null || userBill === void 0 ? void 0 : userBill.bond.chainId) ? (jsxs(Button, { className: "switch-button", disabled: claimable(userBill) === 0 || load, onClick: (event) => {
|
|
70387
70382
|
var _a;
|
|
70388
70383
|
event.stopPropagation();
|
|
70389
70384
|
switchChain({ chainId: (_a = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _a === void 0 ? void 0 : _a.chainId });
|
|
70390
|
-
}, children: ["Switch to ", NETWORK_LABEL[(
|
|
70385
|
+
}, children: ["Switch to ", NETWORK_LABEL[(_15 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _15 === void 0 ? void 0 : _15.chainId]] })) : (jsx$2(Button, { className: "claim-button", disabled: claimable(userBill) === 0 || load || !userBill || isPendingCliff, load: load, onClick: (event) => {
|
|
70391
70386
|
event.stopPropagation();
|
|
70392
70387
|
handleClaim(userBill === null || userBill === void 0 ? void 0 : userBill.id, userBill === null || userBill === void 0 ? void 0 : userBill.address);
|
|
70393
70388
|
}, children: isPendingCliff
|