@ape.swap/bonds-sdk 3.0.79 → 3.0.80
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 +6 -5
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -81157,6 +81157,7 @@ const styles$5 = {
|
|
|
81157
81157
|
};
|
|
81158
81158
|
|
|
81159
81159
|
const Toast = ({ popIndex, popup }) => {
|
|
81160
|
+
var _a, _b, _c, _d;
|
|
81160
81161
|
const { variant, title, description, url } = popup;
|
|
81161
81162
|
const { removePopup } = usePopups();
|
|
81162
81163
|
const [show, setShow] = useState(true);
|
|
@@ -81168,13 +81169,13 @@ const Toast = ({ popIndex, popup }) => {
|
|
|
81168
81169
|
}, 500);
|
|
81169
81170
|
}, 10000);
|
|
81170
81171
|
}, []);
|
|
81171
|
-
const showSupportLink = variant === 'error' && !url && !popup.description.includes('User rejected the request');
|
|
81172
|
-
const isSlippageError = popup.description.includes('INSUFFICIENT') ||
|
|
81173
|
-
popup.description.includes('Slippage') ||
|
|
81174
|
-
popup.description.includes('Return amount is not enough');
|
|
81172
|
+
const showSupportLink = variant === 'error' && !url && !((_a = popup === null || popup === void 0 ? void 0 : popup.description) === null || _a === void 0 ? void 0 : _a.includes('User rejected the request'));
|
|
81173
|
+
const isSlippageError = ((_b = popup === null || popup === void 0 ? void 0 : popup.description) === null || _b === void 0 ? void 0 : _b.includes('INSUFFICIENT')) ||
|
|
81174
|
+
((_c = popup === null || popup === void 0 ? void 0 : popup.description) === null || _c === void 0 ? void 0 : _c.includes('Slippage')) ||
|
|
81175
|
+
((_d = popup === null || popup === void 0 ? void 0 : popup.description) === null || _d === void 0 ? void 0 : _d.includes('Return amount is not enough'));
|
|
81175
81176
|
const parsedErrorString = isSlippageError
|
|
81176
81177
|
? 'Slippage error. Try increasing Slippage in the cog icon ⚙️.'
|
|
81177
|
-
: popup.description;
|
|
81178
|
+
: popup === null || popup === void 0 ? void 0 : popup.description;
|
|
81178
81179
|
return (jsx$2(AnimatePresence, { children: show && (jsxs(motion.div, { initial: { right: '-300px' }, animate: { right: '10px' }, transition: { duration: 0.5 }, exit: { right: '-300px' }, sx: Object.assign(Object.assign({}, styles$5.alert), { top: 108 * popIndex, zIndex: 103 }), children: [jsx$2(Flex, { children: jsx$2(Svg, { icon: variant, color: variant, width: "30px" }) }), jsxs(Flex, { sx: styles$5.content, children: [jsx$2(Text, { sx: { color: variant, fontSize: '14px', fontWeight: 500 }, children: title }), description && (jsx$2(Text, { sx: {
|
|
81179
81180
|
fontSize: '12px',
|
|
81180
81181
|
fontWeight: 400,
|