@ape.swap/bonds-sdk 2.7.2-test.3 → 2.7.3
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
CHANGED
|
@@ -70176,7 +70176,7 @@ function checkImageExists(fileName) {
|
|
|
70176
70176
|
});
|
|
70177
70177
|
}
|
|
70178
70178
|
|
|
70179
|
-
const LinkShare = ({ bondNFTData, userBill, }) => {
|
|
70179
|
+
const LinkShare = ({ bondNFTData, userBill, chainId, }) => {
|
|
70180
70180
|
var _a, _b, _c, _d;
|
|
70181
70181
|
const [isLoading, setIsLoading] = useState([false, false]);
|
|
70182
70182
|
const [hideTag, setHideTag] = useState(false);
|
|
@@ -70187,6 +70187,13 @@ const LinkShare = ({ bondNFTData, userBill, }) => {
|
|
|
70187
70187
|
const handleShare = (url, social) => __awaiter$9(void 0, void 0, void 0, function* () {
|
|
70188
70188
|
if (isLoading[0] || isLoading[1])
|
|
70189
70189
|
return;
|
|
70190
|
+
track({
|
|
70191
|
+
event: 'referral',
|
|
70192
|
+
chain: chainId,
|
|
70193
|
+
data: {
|
|
70194
|
+
wallet: `${social.toUpperCase()} Share Bond`,
|
|
70195
|
+
},
|
|
70196
|
+
});
|
|
70190
70197
|
setIsLoading(social === 'x' ? [true, false] : [false, true]);
|
|
70191
70198
|
yield generateImageFromTemplate(bondNFTData, url, apiUrl);
|
|
70192
70199
|
setIsLoading([false, false]);
|
|
@@ -70272,7 +70279,7 @@ const YourBondsModal = ({ onDismiss, userBill }) => {
|
|
|
70272
70279
|
justifyContent: 'center',
|
|
70273
70280
|
alignItems: 'center',
|
|
70274
70281
|
zIndex: 1,
|
|
70275
|
-
}, children: jsx$2(Spinner, { width: 100 }) })), imgLoaded && jsx$2(LinkShare, { bondNFTData: bondNFTData, userBill: userBill })] }), jsxs(Flex$1, { className: "yourbondsmodal yourbondinfo", children: [jsxs(Flex$1, { className: "yourbondinfo title-container", children: [jsx$2(Flex$1, { className: "title-container bondicon", children: userBill && (jsx$2(TokenImage, { symbol: (_k = (_j = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _j === void 0 ? void 0 : _j.showcaseTokenName) !== null && _k !== void 0 ? _k : (_m = (_l = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _l === void 0 ? void 0 : _l.earnToken) === null || _m === void 0 ? void 0 : _m.symbol, size: 40, chain: userBill === null || userBill === void 0 ? void 0 : userBill.bond.chainId })) }), jsx$2(Flex$1, { className: "title-container tokenname", children: (_p = (_o = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _o === void 0 ? void 0 : _o.showcaseTokenName) !== null && _p !== void 0 ? _p : userBill === null || userBill === void 0 ? void 0 : userBill.bond.earnToken.symbol }), jsx$2(Flex$1, { className: "title-container tokentags", children: (_r = (_q = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _q === void 0 ? void 0 : _q.tags) === null || _r === void 0 ? void 0 : _r.slice(0, 1).map((tag) => {
|
|
70282
|
+
}, children: jsx$2(Spinner, { width: 100 }) })), imgLoaded && jsx$2(LinkShare, { bondNFTData: bondNFTData, userBill: userBill, chainId: chainId })] }), jsxs(Flex$1, { className: "yourbondsmodal yourbondinfo", children: [jsxs(Flex$1, { className: "yourbondinfo title-container", children: [jsx$2(Flex$1, { className: "title-container bondicon", children: userBill && (jsx$2(TokenImage, { symbol: (_k = (_j = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _j === void 0 ? void 0 : _j.showcaseTokenName) !== null && _k !== void 0 ? _k : (_m = (_l = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _l === void 0 ? void 0 : _l.earnToken) === null || _m === void 0 ? void 0 : _m.symbol, size: 40, chain: userBill === null || userBill === void 0 ? void 0 : userBill.bond.chainId })) }), jsx$2(Flex$1, { className: "title-container tokenname", children: (_p = (_o = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _o === void 0 ? void 0 : _o.showcaseTokenName) !== null && _p !== void 0 ? _p : userBill === null || userBill === void 0 ? void 0 : userBill.bond.earnToken.symbol }), jsx$2(Flex$1, { className: "title-container tokentags", children: (_r = (_q = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _q === void 0 ? void 0 : _q.tags) === null || _r === void 0 ? void 0 : _r.slice(0, 1).map((tag) => {
|
|
70276
70283
|
return (jsx$2(Flex$1, { sx: { marginRight: '10px' }, children: jsx$2(ListTag, { text: tag === null || tag === void 0 ? void 0 : tag.toUpperCase() }) }, tag));
|
|
70277
70284
|
}) }), jsxs(Text, { sx: { color: 'text', opacity: '0.6', fontSize: ['12px', '12px', '12px', '16px'] }, children: ["#", userBill === null || userBill === void 0 ? void 0 : userBill.id] })] }), jsxs(Flex$1, { className: "yourbondinfo blocks-container", children: [jsxs(Flex$1, { className: "attributes-container", children: [jsxs(Flex$1, { className: "attributes-header", sx: {
|
|
70278
70285
|
borderRadius: `${isOpenTraits ? '6px 6px 0px 0px' : 'normal'}`,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { UserBill, UserBillNftData } from '../../../../types/yourbonds';
|
|
2
|
-
declare const LinkShare: ({ bondNFTData, userBill, }: {
|
|
2
|
+
declare const LinkShare: ({ bondNFTData, userBill, chainId, }: {
|
|
3
3
|
bondNFTData: UserBillNftData | undefined;
|
|
4
4
|
userBill: UserBill | undefined;
|
|
5
|
+
chainId: number;
|
|
5
6
|
}) => import("react").JSX.Element;
|
|
6
7
|
export default LinkShare;
|