@dynamic-labs/sdk-react-core 4.7.2 → 4.8.1
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/CHANGELOG.md +21 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +11 -11
- package/src/lib/components/NetworkPicker/components/NetworkSwitchControl/NetworkSwitchControl.cjs +2 -2
- package/src/lib/components/NetworkPicker/components/NetworkSwitchControl/NetworkSwitchControl.js +2 -2
- package/src/lib/components/QrCodeWrapper/QrCodeContainer/QrCodeContainer.cjs +2 -2
- package/src/lib/components/QrCodeWrapper/QrCodeContainer/QrCodeContainer.js +2 -2
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.cjs +6 -1
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.js +6 -1
- package/src/lib/components/TransactionCard/SendBalanceTransactionCard.cjs +7 -2
- package/src/lib/components/TransactionCard/SendBalanceTransactionCard.d.ts +1 -2
- package/src/lib/components/TransactionCard/SendBalanceTransactionCard.js +7 -2
- package/src/lib/components/TransactionCard/TransactionCard.cjs +16 -12
- package/src/lib/components/TransactionCard/TransactionCard.js +16 -12
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +1 -1
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +1 -1
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +14 -4
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.d.ts +1 -0
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +14 -4
- package/src/lib/context/DynamicContext/DynamicContext.cjs +12 -11
- package/src/lib/context/DynamicContext/DynamicContext.js +12 -11
- package/src/lib/context/DynamicContext/types/SettingsOverrides.d.ts +10 -0
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/functions/getTransactionLink/getTransactionLink.cjs +22 -0
- package/src/lib/utils/functions/getTransactionLink/getTransactionLink.d.ts +5 -0
- package/src/lib/utils/functions/getTransactionLink/getTransactionLink.js +18 -0
- package/src/lib/utils/functions/isMultiAssetSupportedNetwork/isMultiAssetSupportedNetwork.cjs +9 -4
- package/src/lib/utils/functions/isMultiAssetSupportedNetwork/isMultiAssetSupportedNetwork.js +9 -4
- package/src/lib/utils/functions/isSupportedNetwork/isSupportedNetwork.cjs +3 -3
- package/src/lib/utils/functions/isSupportedNetwork/isSupportedNetwork.js +3 -3
- package/src/lib/utils/functions/networksAndChains/networksAndChains.cjs +31 -11
- package/src/lib/utils/functions/networksAndChains/networksAndChains.d.ts +6 -2
- package/src/lib/utils/functions/networksAndChains/networksAndChains.js +31 -11
- package/src/lib/utils/hooks/useNetworkConfigurationsFromProjectSettings/useNetworkConfigurationsFromProjectSettings.cjs +11 -3
- package/src/lib/utils/hooks/useNetworkConfigurationsFromProjectSettings/useNetworkConfigurationsFromProjectSettings.d.ts +2 -1
- package/src/lib/utils/hooks/useNetworkConfigurationsFromProjectSettings/useNetworkConfigurationsFromProjectSettings.js +11 -3
- package/src/lib/utils/hooks/useTokenBalances/useTokenBalances.cjs +5 -8
- package/src/lib/utils/hooks/useTokenBalances/useTokenBalances.js +5 -8
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.cjs +0 -1
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.js +0 -1
- package/src/lib/views/MobileWalletRedirectView/MobileWalletRedirectView.cjs +2 -1
- package/src/lib/views/MobileWalletRedirectView/MobileWalletRedirectView.js +3 -2
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +3 -1
- package/src/lib/views/SendBalanceView/SendBalanceView.js +3 -1
- package/src/lib/views/UserDeleteAccountView/UserDeleteAccountView.cjs +1 -1
- package/src/lib/views/UserDeleteAccountView/UserDeleteAccountView.js +1 -1
- package/src/lib/widgets/DynamicWidget/helpers/helpers.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/helpers/helpers.js +2 -2
- package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.cjs +3 -2
- package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.js +3 -2
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +2 -2
- package/src/lib/widgets/DynamicWidget/views/ConnectedAppsView/ConnectedAppsView.cjs +12 -12
- package/src/lib/widgets/DynamicWidget/views/ConnectedAppsView/ConnectedAppsView.js +12 -12
- package/src/lib/widgets/DynamicWidget/views/ReceiveWalletFunds/utils/useSubmitWalletFunding/useSubmitWalletFunding.cjs +9 -2
- package/src/lib/widgets/DynamicWidget/views/ReceiveWalletFunds/utils/useSubmitWalletFunding/useSubmitWalletFunding.js +9 -2
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var walletBook = require('@dynamic-labs/wallet-book');
|
|
8
|
-
require('@dynamic-labs/utils');
|
|
8
|
+
var utils = require('@dynamic-labs/utils');
|
|
9
9
|
require('../../../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
|
|
10
10
|
require('../../../../components/Alert/Alert.cjs');
|
|
11
11
|
require('react');
|
|
@@ -124,7 +124,7 @@ const QrCodeModalView = ({ walletId }) => {
|
|
|
124
124
|
// this div exists to give the parent a child, so that the parent
|
|
125
125
|
// takes on its given width and height. the result is stable
|
|
126
126
|
// rendering of this component, without this there is a brief flash
|
|
127
|
-
jsxRuntime.jsx("div", { "data-testid": 'no-qrcode' })) }) }), jsxRuntime.jsxs("div", { className: 'button__container', children: [(newPrimaryWallet === null || newPrimaryWallet === void 0 ? void 0 : newPrimaryWallet.connector.isWalletConnect) && qrcodeUri && (jsxRuntime.jsxs(CopyButton.CopyButton, { textToCopy: qrcodeUri, children: [jsxRuntime.jsx(Icon.Icon, { size: 'small', color: 'text-tertiary', children: jsxRuntime.jsx(link.ReactComponent, {}) }), "Copy QR URI"] })), desktopUri && (jsxRuntime.jsxs(TextButton.TextButton, { className: 'button--open-app', onClick: () =>
|
|
127
|
+
jsxRuntime.jsx("div", { "data-testid": 'no-qrcode' })) }) }), jsxRuntime.jsxs("div", { className: 'button__container', children: [(newPrimaryWallet === null || newPrimaryWallet === void 0 ? void 0 : newPrimaryWallet.connector.isWalletConnect) && qrcodeUri && (jsxRuntime.jsxs(CopyButton.CopyButton, { textToCopy: qrcodeUri, children: [jsxRuntime.jsx(Icon.Icon, { size: 'small', color: 'text-tertiary', children: jsxRuntime.jsx(link.ReactComponent, {}) }), "Copy QR URI"] })), desktopUri && (jsxRuntime.jsxs(TextButton.TextButton, { className: 'button--open-app', onClick: () => utils.PlatformService.openURL(desktopUri, 'blank'), children: [jsxRuntime.jsx(Icon.Icon, { size: 'xsmall', color: 'text-tertiary', children: jsxRuntime.jsx(externalLink.ReactComponent, {}) }), "Open ", walletName, " App"] }))] })] }));
|
|
128
128
|
};
|
|
129
129
|
|
|
130
130
|
exports.QrCodeModalView = QrCodeModalView;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { WalletIcon } from '@dynamic-labs/wallet-book';
|
|
4
|
-
import '@dynamic-labs/utils';
|
|
4
|
+
import { PlatformService } from '@dynamic-labs/utils';
|
|
5
5
|
import '../../../../components/Accordion/components/AccordionItem/AccordionItem.js';
|
|
6
6
|
import '../../../../components/Alert/Alert.js';
|
|
7
7
|
import 'react';
|
|
@@ -120,7 +120,7 @@ const QrCodeModalView = ({ walletId }) => {
|
|
|
120
120
|
// this div exists to give the parent a child, so that the parent
|
|
121
121
|
// takes on its given width and height. the result is stable
|
|
122
122
|
// rendering of this component, without this there is a brief flash
|
|
123
|
-
jsx("div", { "data-testid": 'no-qrcode' })) }) }), jsxs("div", { className: 'button__container', children: [(newPrimaryWallet === null || newPrimaryWallet === void 0 ? void 0 : newPrimaryWallet.connector.isWalletConnect) && qrcodeUri && (jsxs(CopyButton, { textToCopy: qrcodeUri, children: [jsx(Icon, { size: 'small', color: 'text-tertiary', children: jsx(SvgLink, {}) }), "Copy QR URI"] })), desktopUri && (jsxs(TextButton, { className: 'button--open-app', onClick: () =>
|
|
123
|
+
jsx("div", { "data-testid": 'no-qrcode' })) }) }), jsxs("div", { className: 'button__container', children: [(newPrimaryWallet === null || newPrimaryWallet === void 0 ? void 0 : newPrimaryWallet.connector.isWalletConnect) && qrcodeUri && (jsxs(CopyButton, { textToCopy: qrcodeUri, children: [jsx(Icon, { size: 'small', color: 'text-tertiary', children: jsx(SvgLink, {}) }), "Copy QR URI"] })), desktopUri && (jsxs(TextButton, { className: 'button--open-app', onClick: () => PlatformService.openURL(desktopUri, 'blank'), children: [jsx(Icon, { size: 'xsmall', color: 'text-tertiary', children: jsx(SvgExternalLink, {}) }), "Open ", walletName, " App"] }))] })] }));
|
|
124
124
|
};
|
|
125
125
|
|
|
126
126
|
export { QrCodeModalView };
|
|
@@ -7,27 +7,27 @@ var _tslib = require('../../../../../../_virtual/_tslib.cjs');
|
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
8
|
var React = require('react');
|
|
9
9
|
var reactI18next = require('react-i18next');
|
|
10
|
+
var utils = require('@dynamic-labs/utils');
|
|
11
|
+
require('../../../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
|
|
12
|
+
require('../../../../components/Alert/Alert.cjs');
|
|
13
|
+
require('../../../../events/dynamicEvents.cjs');
|
|
14
|
+
var useDynamicContext = require('../../../../context/DynamicContext/useDynamicContext/useDynamicContext.cjs');
|
|
15
|
+
require('../../../../context/DynamicContext/DynamicContext.cjs');
|
|
16
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
17
|
+
require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
18
|
+
require('../../../../context/ErrorContext/ErrorContext.cjs');
|
|
19
|
+
require('../../../../context/ViewContext/ViewContext.cjs');
|
|
10
20
|
require('@dynamic-labs/sdk-api-core');
|
|
11
21
|
var logger = require('../../../../shared/logger.cjs');
|
|
12
22
|
require('@dynamic-labs/iconic');
|
|
13
|
-
require('@dynamic-labs/wallet-connector-core');
|
|
14
23
|
var arrowLeft = require('../../../../shared/assets/arrow-left.cjs');
|
|
15
24
|
var check = require('../../../../shared/assets/check.cjs');
|
|
16
25
|
var externalLink = require('../../../../shared/assets/externalLink.cjs');
|
|
17
26
|
var unlink = require('../../../../shared/assets/unlink.cjs');
|
|
18
|
-
require('../../../../context/ViewContext/ViewContext.cjs');
|
|
19
27
|
require('@dynamic-labs/wallet-book');
|
|
20
|
-
require('@dynamic-labs/utils');
|
|
21
28
|
require('../../../../utils/constants/colors.cjs');
|
|
22
29
|
require('../../../../utils/constants/values.cjs');
|
|
23
30
|
require('../../../../shared/consts/index.cjs');
|
|
24
|
-
require('../../../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
|
|
25
|
-
require('../../../../components/Alert/Alert.cjs');
|
|
26
|
-
require('../../../../events/dynamicEvents.cjs');
|
|
27
|
-
var useDynamicContext = require('../../../../context/DynamicContext/useDynamicContext/useDynamicContext.cjs');
|
|
28
|
-
require('../../../../context/DynamicContext/DynamicContext.cjs');
|
|
29
|
-
require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
30
|
-
require('../../../../context/ErrorContext/ErrorContext.cjs');
|
|
31
31
|
require('@dynamic-labs/multi-wallet');
|
|
32
32
|
require('react-international-phone');
|
|
33
33
|
require('../../../../store/state/nonce/nonce.cjs');
|
|
@@ -169,10 +169,10 @@ const ConnectedAppsView = ({ name }) => {
|
|
|
169
169
|
logger.logger.warn('Error disconnecting app', error);
|
|
170
170
|
}
|
|
171
171
|
});
|
|
172
|
-
return (jsxRuntime.jsxs("div", { className: 'connected-apps-view', children: [jsxRuntime.jsxs("div", { className: 'header', children: [jsxRuntime.jsx(IconButton.IconButton, { onClick: () => setDynamicWidgetView('settings'), "data-testid": 'back-button', className: 'back-button', type: 'button', children: jsxRuntime.jsx(arrowLeft.ReactComponent, { className: 'arrow-left-icon' }) }), jsxRuntime.jsx(Typography.Typography, { variant: 'title', weight: 'medium', color: 'primary', className: 'title', children: t('global_wallet.connected_apps.title') })] }), jsxRuntime.jsx("div", { className: 'subheader', children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', weight: 'medium', color: 'primary', className: 'title', children: t('global_wallet.connected_apps.subtitle') }) }), connectedApps.length > 0 && (jsxRuntime.jsx("ul", { className: 'connected-apps-list', children: connectedApps.map((app) => (jsxRuntime.jsxs("li", { className: 'connected-app-item', children: [jsxRuntime.jsx("img", { src: app.icon, alt: app.name, className: 'app-icon' }), jsxRuntime.jsx("div", { className: 'app-info', children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', children: app.url }) }), jsxRuntime.jsxs("div", { className: 'app-actions', children: [jsxRuntime.jsx(TypographyButton.TypographyButton, { onClick: () =>
|
|
172
|
+
return (jsxRuntime.jsxs("div", { className: 'connected-apps-view', children: [jsxRuntime.jsxs("div", { className: 'header', children: [jsxRuntime.jsx(IconButton.IconButton, { onClick: () => setDynamicWidgetView('settings'), "data-testid": 'back-button', className: 'back-button', type: 'button', children: jsxRuntime.jsx(arrowLeft.ReactComponent, { className: 'arrow-left-icon' }) }), jsxRuntime.jsx(Typography.Typography, { variant: 'title', weight: 'medium', color: 'primary', className: 'title', children: t('global_wallet.connected_apps.title') })] }), jsxRuntime.jsx("div", { className: 'subheader', children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', weight: 'medium', color: 'primary', className: 'title', children: t('global_wallet.connected_apps.subtitle') }) }), connectedApps.length > 0 && (jsxRuntime.jsx("ul", { className: 'connected-apps-list', children: connectedApps.map((app) => (jsxRuntime.jsxs("li", { className: 'connected-app-item', children: [jsxRuntime.jsx("img", { src: app.icon, alt: app.name, className: 'app-icon' }), jsxRuntime.jsx("div", { className: 'app-info', children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', children: app.url }) }), jsxRuntime.jsxs("div", { className: 'app-actions', children: [jsxRuntime.jsx(TypographyButton.TypographyButton, { onClick: () => utils.PlatformService.openURL(app.url, 'blank'), buttonVariant: 'tertiary', buttonPadding: 'none', startSlot: jsxRuntime.jsx(externalLink.ReactComponent, {}), typographyProps: {
|
|
173
173
|
color: 'secondary',
|
|
174
174
|
variant: 'button_secondary',
|
|
175
|
-
} }), jsxRuntime.jsx(TypographyButton.TypographyButton, { onClick: () => handleDisconnect(app.topic), buttonVariant: 'tertiary', buttonPadding: 'none', startSlot: jsxRuntime.jsx(unlink.ReactComponent, {}), typographyProps: {
|
|
175
|
+
}, dataTestId: 'open-app-button' }), jsxRuntime.jsx(TypographyButton.TypographyButton, { onClick: () => handleDisconnect(app.topic), buttonVariant: 'tertiary', buttonPadding: 'none', startSlot: jsxRuntime.jsx(unlink.ReactComponent, {}), typographyProps: {
|
|
176
176
|
color: 'secondary',
|
|
177
177
|
variant: 'button_secondary',
|
|
178
178
|
} })] })] }, app.url))) })), showSuccessMessage && (jsxRuntime.jsxs("div", { className: 'success-message', children: [jsxRuntime.jsx(check.ReactComponent, {}), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'primary', children: t('global_wallet.connected_apps.success', { name }) })] }))] }));
|
|
@@ -3,27 +3,27 @@ import { __awaiter } from '../../../../../../_virtual/_tslib.js';
|
|
|
3
3
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
4
|
import { useState, useEffect } from 'react';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
|
+
import { PlatformService } from '@dynamic-labs/utils';
|
|
7
|
+
import '../../../../components/Accordion/components/AccordionItem/AccordionItem.js';
|
|
8
|
+
import '../../../../components/Alert/Alert.js';
|
|
9
|
+
import '../../../../events/dynamicEvents.js';
|
|
10
|
+
import { useDynamicContext } from '../../../../context/DynamicContext/useDynamicContext/useDynamicContext.js';
|
|
11
|
+
import '../../../../context/DynamicContext/DynamicContext.js';
|
|
12
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
13
|
+
import '../../../../context/CaptchaContext/CaptchaContext.js';
|
|
14
|
+
import '../../../../context/ErrorContext/ErrorContext.js';
|
|
15
|
+
import '../../../../context/ViewContext/ViewContext.js';
|
|
6
16
|
import '@dynamic-labs/sdk-api-core';
|
|
7
17
|
import { logger } from '../../../../shared/logger.js';
|
|
8
18
|
import '@dynamic-labs/iconic';
|
|
9
|
-
import '@dynamic-labs/wallet-connector-core';
|
|
10
19
|
import { ReactComponent as SvgArrowLeft } from '../../../../shared/assets/arrow-left.js';
|
|
11
20
|
import { ReactComponent as SvgCheck } from '../../../../shared/assets/check.js';
|
|
12
21
|
import { ReactComponent as SvgExternalLink } from '../../../../shared/assets/externalLink.js';
|
|
13
22
|
import { ReactComponent as SvgUnlink } from '../../../../shared/assets/unlink.js';
|
|
14
|
-
import '../../../../context/ViewContext/ViewContext.js';
|
|
15
23
|
import '@dynamic-labs/wallet-book';
|
|
16
|
-
import '@dynamic-labs/utils';
|
|
17
24
|
import '../../../../utils/constants/colors.js';
|
|
18
25
|
import '../../../../utils/constants/values.js';
|
|
19
26
|
import '../../../../shared/consts/index.js';
|
|
20
|
-
import '../../../../components/Accordion/components/AccordionItem/AccordionItem.js';
|
|
21
|
-
import '../../../../components/Alert/Alert.js';
|
|
22
|
-
import '../../../../events/dynamicEvents.js';
|
|
23
|
-
import { useDynamicContext } from '../../../../context/DynamicContext/useDynamicContext/useDynamicContext.js';
|
|
24
|
-
import '../../../../context/DynamicContext/DynamicContext.js';
|
|
25
|
-
import '../../../../context/CaptchaContext/CaptchaContext.js';
|
|
26
|
-
import '../../../../context/ErrorContext/ErrorContext.js';
|
|
27
27
|
import '@dynamic-labs/multi-wallet';
|
|
28
28
|
import 'react-international-phone';
|
|
29
29
|
import '../../../../store/state/nonce/nonce.js';
|
|
@@ -165,10 +165,10 @@ const ConnectedAppsView = ({ name }) => {
|
|
|
165
165
|
logger.warn('Error disconnecting app', error);
|
|
166
166
|
}
|
|
167
167
|
});
|
|
168
|
-
return (jsxs("div", { className: 'connected-apps-view', children: [jsxs("div", { className: 'header', children: [jsx(IconButton, { onClick: () => setDynamicWidgetView('settings'), "data-testid": 'back-button', className: 'back-button', type: 'button', children: jsx(SvgArrowLeft, { className: 'arrow-left-icon' }) }), jsx(Typography, { variant: 'title', weight: 'medium', color: 'primary', className: 'title', children: t('global_wallet.connected_apps.title') })] }), jsx("div", { className: 'subheader', children: jsx(Typography, { variant: 'body_small', weight: 'medium', color: 'primary', className: 'title', children: t('global_wallet.connected_apps.subtitle') }) }), connectedApps.length > 0 && (jsx("ul", { className: 'connected-apps-list', children: connectedApps.map((app) => (jsxs("li", { className: 'connected-app-item', children: [jsx("img", { src: app.icon, alt: app.name, className: 'app-icon' }), jsx("div", { className: 'app-info', children: jsx(Typography, { variant: 'body_normal', color: 'primary', children: app.url }) }), jsxs("div", { className: 'app-actions', children: [jsx(TypographyButton, { onClick: () =>
|
|
168
|
+
return (jsxs("div", { className: 'connected-apps-view', children: [jsxs("div", { className: 'header', children: [jsx(IconButton, { onClick: () => setDynamicWidgetView('settings'), "data-testid": 'back-button', className: 'back-button', type: 'button', children: jsx(SvgArrowLeft, { className: 'arrow-left-icon' }) }), jsx(Typography, { variant: 'title', weight: 'medium', color: 'primary', className: 'title', children: t('global_wallet.connected_apps.title') })] }), jsx("div", { className: 'subheader', children: jsx(Typography, { variant: 'body_small', weight: 'medium', color: 'primary', className: 'title', children: t('global_wallet.connected_apps.subtitle') }) }), connectedApps.length > 0 && (jsx("ul", { className: 'connected-apps-list', children: connectedApps.map((app) => (jsxs("li", { className: 'connected-app-item', children: [jsx("img", { src: app.icon, alt: app.name, className: 'app-icon' }), jsx("div", { className: 'app-info', children: jsx(Typography, { variant: 'body_normal', color: 'primary', children: app.url }) }), jsxs("div", { className: 'app-actions', children: [jsx(TypographyButton, { onClick: () => PlatformService.openURL(app.url, 'blank'), buttonVariant: 'tertiary', buttonPadding: 'none', startSlot: jsx(SvgExternalLink, {}), typographyProps: {
|
|
169
169
|
color: 'secondary',
|
|
170
170
|
variant: 'button_secondary',
|
|
171
|
-
} }), jsx(TypographyButton, { onClick: () => handleDisconnect(app.topic), buttonVariant: 'tertiary', buttonPadding: 'none', startSlot: jsx(SvgUnlink, {}), typographyProps: {
|
|
171
|
+
}, dataTestId: 'open-app-button' }), jsx(TypographyButton, { onClick: () => handleDisconnect(app.topic), buttonVariant: 'tertiary', buttonPadding: 'none', startSlot: jsx(SvgUnlink, {}), typographyProps: {
|
|
172
172
|
color: 'secondary',
|
|
173
173
|
variant: 'button_secondary',
|
|
174
174
|
} })] })] }, app.url))) })), showSuccessMessage && (jsxs("div", { className: 'success-message', children: [jsx(SvgCheck, {}), jsx(Typography, { variant: 'body_small', color: 'primary', children: t('global_wallet.connected_apps.success', { name }) })] }))] }));
|
|
@@ -12,6 +12,7 @@ var logger = require('../../../../../../shared/logger.cjs');
|
|
|
12
12
|
var pixelToRem = require('../../../../../../utils/functions/pixelToRem/pixelToRem.cjs');
|
|
13
13
|
var useFundWithWallet = require('../../../../../../utils/hooks/useFundWithWallet/useFundWithWallet.cjs');
|
|
14
14
|
var DynamicWidgetContext = require('../../../../context/DynamicWidgetContext.cjs');
|
|
15
|
+
var getTransactionLink = require('../../../../../../utils/functions/getTransactionLink/getTransactionLink.cjs');
|
|
15
16
|
|
|
16
17
|
const useSubmitWalletFunding = () => {
|
|
17
18
|
const { fund } = useFundWithWallet.useInternalFundWithWallet();
|
|
@@ -34,8 +35,14 @@ const useSubmitWalletFunding = () => {
|
|
|
34
35
|
token: token === 'native' ? undefined : token,
|
|
35
36
|
});
|
|
36
37
|
logger.logger.info(`Funding with wallet succeeded with transaction id: ${txId}`);
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
let txLink;
|
|
39
|
+
if (txId) {
|
|
40
|
+
txLink = yield getTransactionLink.getTransactionLink({
|
|
41
|
+
transactionHash: txId,
|
|
42
|
+
walletConnector: wallet.connector,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
const TxnSuccessAlert = (jsxRuntime.jsxs(Typography.Typography, { variant: 'body_normal', color: 'current-color', children: [t('dyn_wallet_funding.success'), txLink && (jsxRuntime.jsx(Typography.Typography, { as: 'a', href: txLink, target: '_blank', rel: 'noreferrer', style: {
|
|
39
46
|
marginLeft: pixelToRem.pixelToRem(4),
|
|
40
47
|
textDecoration: 'underline',
|
|
41
48
|
textDecorationThickness: pixelToRem.pixelToRem(1),
|
|
@@ -8,6 +8,7 @@ import { logger } from '../../../../../../shared/logger.js';
|
|
|
8
8
|
import { pixelToRem } from '../../../../../../utils/functions/pixelToRem/pixelToRem.js';
|
|
9
9
|
import { useInternalFundWithWallet } from '../../../../../../utils/hooks/useFundWithWallet/useFundWithWallet.js';
|
|
10
10
|
import { useWidgetContext } from '../../../../context/DynamicWidgetContext.js';
|
|
11
|
+
import { getTransactionLink } from '../../../../../../utils/functions/getTransactionLink/getTransactionLink.js';
|
|
11
12
|
|
|
12
13
|
const useSubmitWalletFunding = () => {
|
|
13
14
|
const { fund } = useInternalFundWithWallet();
|
|
@@ -30,8 +31,14 @@ const useSubmitWalletFunding = () => {
|
|
|
30
31
|
token: token === 'native' ? undefined : token,
|
|
31
32
|
});
|
|
32
33
|
logger.info(`Funding with wallet succeeded with transaction id: ${txId}`);
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
let txLink;
|
|
35
|
+
if (txId) {
|
|
36
|
+
txLink = yield getTransactionLink({
|
|
37
|
+
transactionHash: txId,
|
|
38
|
+
walletConnector: wallet.connector,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
const TxnSuccessAlert = (jsxs(Typography, { variant: 'body_normal', color: 'current-color', children: [t('dyn_wallet_funding.success'), txLink && (jsx(Typography, { as: 'a', href: txLink, target: '_blank', rel: 'noreferrer', style: {
|
|
35
42
|
marginLeft: pixelToRem(4),
|
|
36
43
|
textDecoration: 'underline',
|
|
37
44
|
textDecorationThickness: pixelToRem(1),
|