@ape.swap/bonds-sdk 1.0.78-2.test.17 → 1.0.78-2.test.20

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.
@@ -24,7 +24,7 @@ var TokenInfoAndName = function (_a) {
24
24
  background: NETWORK_COLORS[bill.chainId]
25
25
  }, children: _jsx(Svg, { width: 18, height: 18, icon: (_b = NETWORK_ICONS === null || NETWORK_ICONS === void 0 ? void 0 : NETWORK_ICONS[bill === null || bill === void 0 ? void 0 : bill.chainId]) !== null && _b !== void 0 ? _b : 'question' }) }), _jsx(Flex, { className: "tokeninfoname gradient", sx: {
26
26
  background: NETWORK_COLORS[bill.chainId]
27
- } }), _jsxs(Flex, { className: "tokeninfoname tokencontainer", children: [_jsx(Index, { symbol: (_c = bill.showcaseTokenName) !== null && _c !== void 0 ? _c : bill.earnToken.symbol, size: 33 }), _jsxs(Flex, { className: "tokeninfoname tokenname", children: [(_d = bill.showcaseTokenName) !== null && _d !== void 0 ? _d : bill.earnToken.symbol, vestEnds && (_jsx(Flex, { sx: { fontSize: '12px', fontWeight: 400, opacity: 0.6, lineHeight: '14px' }, children: vestEnds }))] })] }), _jsxs(Flex, { children: [_jsx(Flex, { sx: { width: '25px' } }), _jsx(Flex, { sx: {
27
+ } }), _jsxs(Flex, { className: "tokeninfoname tokencontainer", children: [_jsx(Index, { symbol: (_c = bill.showcaseTokenName) !== null && _c !== void 0 ? _c : bill.earnToken.symbol, size: 33 }), _jsxs(Flex, { className: "tokeninfoname tokentext", children: [(_d = bill.showcaseTokenName) !== null && _d !== void 0 ? _d : bill.earnToken.symbol, vestEnds && (_jsx(Flex, { sx: { fontSize: '12px', fontWeight: 400, opacity: 0.6, lineHeight: '14px' }, children: vestEnds }))] })] }), _jsxs(Flex, { children: [_jsx(Flex, { sx: { width: '25px' } }), _jsx(Flex, { sx: {
28
28
  ml: '10px',
29
29
  display: ['none', 'none', 'none', 'flex'],
30
30
  minWidth: '70px',
@@ -51,7 +51,7 @@
51
51
  align-items: center;
52
52
  }
53
53
 
54
- .tokeninfoname.tokenname {
54
+ .tokeninfoname.tokentext {
55
55
  margin-left: 10px;
56
56
  font-size: 16px;
57
57
  font-weight: 700;
@@ -262,16 +262,15 @@ var BondModal = function (_a) {
262
262
  setInputValue(tokenBalance !== null && tokenBalance !== void 0 ? tokenBalance : '0');
263
263
  }, children: "Max" }) })] }))] }), _jsxs(Flex, { className: "modaltable-container button-container", children: [_jsx(Flex, { className: "button-container get", children: _jsxs(Button, { className: "action-button", onClick: onAsd, children: ["Get ", bond === null || bond === void 0 ? void 0 : bond.lpToken.symbol] }) }), _jsx(Flex, { className: "button-container buy", children: chainId !== bond.chainId
264
264
  ?
265
- _jsxs(Button, { className: "switch-button", disabled: isPending || isConfirming || (bond === null || bond === void 0 ? void 0 : bond.soldOut), onClick: function (event) {
265
+ _jsx(Button, { className: "switch-button", disabled: isPending || isConfirming || (bond === null || bond === void 0 ? void 0 : bond.soldOut) || !account, onClick: function (event) {
266
266
  event.stopPropagation();
267
- // Add your claim logic here
268
267
  switchChain({ chainId: bond.chainId });
269
- }, children: ["Switch to ", NETWORK_LABEL[bond.chainId]] })
268
+ }, children: !account ? 'Connect Wallet' : "Switch to ".concat(NETWORK_LABEL[bond.chainId]) })
270
269
  :
271
270
  approveTx != null && isConfirmed ?
272
- _jsx(Button, { className: "action-button", disabled: isPending || isConfirming || (bond === null || bond === void 0 ? void 0 : bond.soldOut), onClick: handleBuy, children: isConfirming ? 'Confirming...' : "Buy ".concat(bond === null || bond === void 0 ? void 0 : bond.showcaseTokenName) })
271
+ _jsx(Button, { className: "action-button", disabled: isPending || isConfirming || (bond === null || bond === void 0 ? void 0 : bond.soldOut) || !account, onClick: handleBuy, children: isConfirming ? 'Confirming...' : "Buy ".concat(bond === null || bond === void 0 ? void 0 : bond.showcaseTokenName) })
273
272
  :
274
- _jsx(Button, { className: "action-button", disabled: isPending || isConfirming || (bond === null || bond === void 0 ? void 0 : bond.soldOut), onClick: handleApprove, children: isConfirming ? 'Confirming...' : 'Approve' }) })] })] })] }) }) }, bond.billAddress));
273
+ _jsx(Button, { className: "action-button", disabled: isPending || isConfirming || (bond === null || bond === void 0 ? void 0 : bond.soldOut) || !account, onClick: handleApprove, children: isConfirming ? 'Confirming...' : 'Approve' }) })] })] })] }) }) }, bond.billAddress));
275
274
  }) }));
276
275
  };
277
276
  export default BondModal;
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.78-2.test.17",
6
+ "version": "1.0.78-2.test.20",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.es.js",
9
9
  "types": "dist/index.d.ts",