@dynamic-labs/sdk-react-core 4.29.6 → 4.30.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 +25 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +11 -11
- package/src/lib/components/SignMessagePreview/components/SignTypedDataPreview/SignTypedDataPreview.cjs +1 -14
- package/src/lib/components/SignMessagePreview/components/SignTypedDataPreview/SignTypedDataPreview.js +1 -14
- package/src/lib/components/TransactionCard/SendBalanceTransactionCard.cjs +6 -6
- package/src/lib/components/TransactionCard/SendBalanceTransactionCard.js +6 -6
- package/src/lib/components/TransactionCard/TransactionCard.cjs +3 -3
- package/src/lib/components/TransactionCard/TransactionCard.js +3 -3
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +2 -2
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +2 -2
- package/src/lib/components/UserAddress/UserAddress.cjs +11 -11
- package/src/lib/components/UserAddress/UserAddress.js +11 -11
- package/src/lib/components/WalletInformationCard/WalletInformationCard.cjs +1 -11
- package/src/lib/components/WalletInformationCard/WalletInformationCard.js +1 -11
- package/src/lib/data/api/externalAuth/externalAuth.cjs +6 -27
- package/src/lib/data/api/externalAuth/externalAuth.d.ts +1 -6
- package/src/lib/data/api/externalAuth/externalAuth.js +8 -28
- package/src/lib/data/api/oauth/oauth.cjs +3 -1
- package/src/lib/data/api/oauth/oauth.js +3 -1
- package/src/lib/events/dynamicEvents.cjs +1 -0
- package/src/lib/events/dynamicEvents.d.ts +1 -1
- package/src/lib/events/dynamicEvents.js +1 -0
- package/src/lib/events/wallets.d.ts +2 -0
- package/src/lib/shared/utils/functions/chain/getChainIcon.cjs +1 -0
- package/src/lib/shared/utils/functions/chain/getChainIcon.js +2 -1
- package/src/lib/shared/utils/functions/index.d.ts +0 -1
- package/src/lib/shared/utils/functions/shortenWalletAddress/index.d.ts +1 -1
- package/src/lib/shared/utils/functions/shortenWalletAddress/shortenWalletAddress.cjs +9 -3
- package/src/lib/shared/utils/functions/shortenWalletAddress/shortenWalletAddress.d.ts +1 -1
- package/src/lib/shared/utils/functions/shortenWalletAddress/shortenWalletAddress.js +9 -3
- package/src/lib/utils/hooks/events/useDynamicEvents/useDynamicEvents.d.ts +1 -1
- package/src/lib/utils/hooks/useExternalAuth/useExternalAuth.cjs +5 -5
- package/src/lib/utils/hooks/useExternalAuth/useExternalAuth.js +8 -8
- package/src/lib/utils/hooks/useUserAuth/useUserAuth.cjs +2 -1
- package/src/lib/utils/hooks/useUserAuth/useUserAuth.js +3 -2
- package/src/lib/utils/hooks/useWalletItemActions/useHandleWalletItem/useHandleWalletItem.cjs +2 -0
- package/src/lib/utils/hooks/useWalletItemActions/useHandleWalletItem/useHandleWalletItem.js +2 -0
- package/src/lib/utils/hooks/useWalletOptions/useWalletOptions.d.ts +2 -2
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +2 -2
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +2 -2
- package/src/lib/views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.cjs +1 -1
- package/src/lib/views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.js +1 -1
- package/src/lib/views/MergeUserAccountsWithSameEmailView/MergeUserAccountsWithSameEmailView.cjs +2 -2
- package/src/lib/views/MergeUserAccountsWithSameEmailView/MergeUserAccountsWithSameEmailView.js +2 -2
- package/src/lib/views/NoAccess/NoAccess.cjs +2 -2
- package/src/lib/views/NoAccess/NoAccess.js +2 -2
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +2 -2
- package/src/lib/views/SendBalanceView/SendBalanceView.js +2 -2
- package/src/lib/views/SyncWalletView/AutoReconnectingView/AutoReconnectingView.cjs +8 -8
- package/src/lib/views/SyncWalletView/AutoReconnectingView/AutoReconnectingView.js +8 -8
- package/src/lib/views/SyncWalletView/ReconnectWithQrCodeView/ReconnectWithQrCodeView.cjs +3 -1
- package/src/lib/views/SyncWalletView/ReconnectWithQrCodeView/ReconnectWithQrCodeView.js +3 -1
- package/src/lib/views/SyncWalletView/SwitchWalletView/SwitchWalletView.cjs +2 -2
- package/src/lib/views/SyncWalletView/SwitchWalletView/SwitchWalletView.js +2 -2
- package/src/lib/views/WalletAlreadyExistsView/WalletAlreadyExistsView.cjs +1 -1
- package/src/lib/views/WalletAlreadyExistsView/WalletAlreadyExistsView.js +1 -1
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.cjs +1 -1
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.js +1 -1
- package/src/lib/views/WalletList/data.d.ts +1 -1
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +1 -1
- package/src/lib/views/WalletUsedView/WalletUsedView.js +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +2 -2
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveBitcoinWalletAddresses/ActiveBitcoinWalletAddresses.cjs +3 -3
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveBitcoinWalletAddresses/ActiveBitcoinWalletAddresses.js +3 -3
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletAddress/ActiveWalletAddress.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletAddress/ActiveWalletAddress.js +2 -2
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +2 -2
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.js +2 -2
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +2 -2
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +2 -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/ConfirmExchangeTransferView/ConfirmExchangeTransferView.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/ConfirmExchangeTransferView/ConfirmExchangeTransferView.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/DepositView/DepositView.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/views/DepositView/DepositView.js +2 -2
- package/src/lib/widgets/DynamicWidget/views/DepositedExchangeView/DepositedExchangeView.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/DepositedExchangeView/DepositedExchangeView.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,29 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.30.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.30.0...v4.30.1) (2025-09-04)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* emit walletConnectionQrCodeReady event when QR code is ready for wallet connection ([#9433](https://github.com/dynamic-labs/dynamic-auth/issues/9433)) ([c9dd9b6](https://github.com/dynamic-labs/dynamic-auth/commit/c9dd9b6e38678af16d71e1d2d3e967a989d128f2))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* add spark to getChainIcon ([#9436](https://github.com/dynamic-labs/dynamic-auth/issues/9436)) ([86aefd7](https://github.com/dynamic-labs/dynamic-auth/commit/86aefd7aa1a973b8c3143ca5ba442f5372e8669e))
|
|
13
|
+
|
|
14
|
+
## [4.30.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.29.6...v4.30.0) (2025-09-02)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* add BaseAccount wallet support ([#9373](https://github.com/dynamic-labs/dynamic-auth/issues/9373)) ([2d5e601](https://github.com/dynamic-labs/dynamic-auth/commit/2d5e601eeca34653b503302c73da6fbbee98810e))
|
|
20
|
+
* add Spark chain support ([#9430](https://github.com/dynamic-labs/dynamic-auth/issues/9430)) ([c01c31e](https://github.com/dynamic-labs/dynamic-auth/commit/c01c31eed7824871028a731bb5b5ce3004b4d5c7))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* unlink oauth with 7702 account ([#9431](https://github.com/dynamic-labs/dynamic-auth/issues/9431)) ([0aae4a4](https://github.com/dynamic-labs/dynamic-auth/commit/0aae4a4e27e56083ff1a9e068048461d5d436569))
|
|
26
|
+
|
|
2
27
|
### [4.29.6](https://github.com/dynamic-labs/dynamic-auth/compare/v4.29.5...v4.29.6) (2025-09-01)
|
|
3
28
|
|
|
4
29
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.30.1",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@dynamic-labs/sdk-api-core": "0.0.762",
|
|
6
6
|
"@dynamic-labs-sdk/client": "0.0.1-alpha.25",
|
|
@@ -15,16 +15,16 @@
|
|
|
15
15
|
"yup": "0.32.11",
|
|
16
16
|
"react-international-phone": "4.5.0",
|
|
17
17
|
"bs58": "5.0.0",
|
|
18
|
-
"@dynamic-labs/assert-package-version": "4.
|
|
19
|
-
"@dynamic-labs/iconic": "4.
|
|
20
|
-
"@dynamic-labs/logger": "4.
|
|
21
|
-
"@dynamic-labs/multi-wallet": "4.
|
|
22
|
-
"@dynamic-labs/rpc-providers": "4.
|
|
23
|
-
"@dynamic-labs/store": "4.
|
|
24
|
-
"@dynamic-labs/types": "4.
|
|
25
|
-
"@dynamic-labs/utils": "4.
|
|
26
|
-
"@dynamic-labs/wallet-book": "4.
|
|
27
|
-
"@dynamic-labs/wallet-connector-core": "4.
|
|
18
|
+
"@dynamic-labs/assert-package-version": "4.30.1",
|
|
19
|
+
"@dynamic-labs/iconic": "4.30.1",
|
|
20
|
+
"@dynamic-labs/logger": "4.30.1",
|
|
21
|
+
"@dynamic-labs/multi-wallet": "4.30.1",
|
|
22
|
+
"@dynamic-labs/rpc-providers": "4.30.1",
|
|
23
|
+
"@dynamic-labs/store": "4.30.1",
|
|
24
|
+
"@dynamic-labs/types": "4.30.1",
|
|
25
|
+
"@dynamic-labs/utils": "4.30.1",
|
|
26
|
+
"@dynamic-labs/wallet-book": "4.30.1",
|
|
27
|
+
"@dynamic-labs/wallet-connector-core": "4.30.1",
|
|
28
28
|
"eventemitter3": "5.0.1"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
@@ -6,18 +6,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var Typography = require('../../../Typography/Typography.cjs');
|
|
8
8
|
var capitalize = require('../../../../shared/utils/functions/capitalize/capitalize.cjs');
|
|
9
|
-
require('@dynamic-labs/sdk-api-core');
|
|
10
|
-
require('../../../../shared/logger.cjs');
|
|
11
|
-
require('@dynamic-labs/iconic');
|
|
12
|
-
require('@dynamic-labs/wallet-connector-core');
|
|
13
|
-
require('react');
|
|
14
|
-
require('../../../../context/ViewContext/ViewContext.cjs');
|
|
15
|
-
require('@dynamic-labs/wallet-book');
|
|
16
9
|
var shortenWalletAddress = require('../../../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.cjs');
|
|
17
|
-
require('@dynamic-labs/utils');
|
|
18
|
-
require('../../../../utils/constants/colors.cjs');
|
|
19
|
-
require('../../../../utils/constants/values.cjs');
|
|
20
|
-
require('../../../../shared/consts/index.cjs');
|
|
21
10
|
|
|
22
11
|
const SignTypedDataPreview = ({ currentType, types, showTypeName = false, data }) => {
|
|
23
12
|
const fields = types[currentType].map((field) => {
|
|
@@ -33,9 +22,7 @@ const SignTypedDataPreview = ({ currentType, types, showTypeName = false, data }
|
|
|
33
22
|
}
|
|
34
23
|
const fieldData = data === null || data === void 0 ? void 0 : data[field.name];
|
|
35
24
|
const fieldType = field.type;
|
|
36
|
-
return (jsxRuntime.jsx(FieldRow, { name: capitalize.capitalize(field.name), data: fieldData, displayValue: fieldType === 'address'
|
|
37
|
-
? shortenWalletAddress.shortenWalletAddress(fieldData, 4, 4)
|
|
38
|
-
: fieldData }, field.name));
|
|
25
|
+
return (jsxRuntime.jsx(FieldRow, { name: capitalize.capitalize(field.name), data: fieldData, displayValue: fieldType === 'address' ? shortenWalletAddress.shortenWalletAddress(fieldData) : fieldData }, field.name));
|
|
39
26
|
});
|
|
40
27
|
if (showTypeName) {
|
|
41
28
|
return jsxRuntime.jsx(TypeSection, { title: currentType, children: fields });
|
|
@@ -2,18 +2,7 @@
|
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { Typography } from '../../../Typography/Typography.js';
|
|
4
4
|
import { capitalize } from '../../../../shared/utils/functions/capitalize/capitalize.js';
|
|
5
|
-
import '@dynamic-labs/sdk-api-core';
|
|
6
|
-
import '../../../../shared/logger.js';
|
|
7
|
-
import '@dynamic-labs/iconic';
|
|
8
|
-
import '@dynamic-labs/wallet-connector-core';
|
|
9
|
-
import 'react';
|
|
10
|
-
import '../../../../context/ViewContext/ViewContext.js';
|
|
11
|
-
import '@dynamic-labs/wallet-book';
|
|
12
5
|
import { shortenWalletAddress } from '../../../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.js';
|
|
13
|
-
import '@dynamic-labs/utils';
|
|
14
|
-
import '../../../../utils/constants/colors.js';
|
|
15
|
-
import '../../../../utils/constants/values.js';
|
|
16
|
-
import '../../../../shared/consts/index.js';
|
|
17
6
|
|
|
18
7
|
const SignTypedDataPreview = ({ currentType, types, showTypeName = false, data }) => {
|
|
19
8
|
const fields = types[currentType].map((field) => {
|
|
@@ -29,9 +18,7 @@ const SignTypedDataPreview = ({ currentType, types, showTypeName = false, data }
|
|
|
29
18
|
}
|
|
30
19
|
const fieldData = data === null || data === void 0 ? void 0 : data[field.name];
|
|
31
20
|
const fieldType = field.type;
|
|
32
|
-
return (jsx(FieldRow, { name: capitalize(field.name), data: fieldData, displayValue: fieldType === 'address'
|
|
33
|
-
? shortenWalletAddress(fieldData, 4, 4)
|
|
34
|
-
: fieldData }, field.name));
|
|
21
|
+
return (jsx(FieldRow, { name: capitalize(field.name), data: fieldData, displayValue: fieldType === 'address' ? shortenWalletAddress(fieldData) : fieldData }, field.name));
|
|
35
22
|
});
|
|
36
23
|
if (showTypeName) {
|
|
37
24
|
return jsx(TypeSection, { title: currentType, children: fields });
|
|
@@ -12,15 +12,11 @@ require('react');
|
|
|
12
12
|
var tooltip = require('../../shared/assets/tooltip.cjs');
|
|
13
13
|
require('../../context/ViewContext/ViewContext.cjs');
|
|
14
14
|
require('@dynamic-labs/wallet-book');
|
|
15
|
-
var shortenWalletAddress = require('../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.cjs');
|
|
16
15
|
require('@dynamic-labs/utils');
|
|
17
16
|
require('../../utils/constants/colors.cjs');
|
|
18
17
|
require('../../utils/constants/values.cjs');
|
|
19
18
|
require('../../shared/consts/index.cjs');
|
|
20
|
-
var
|
|
21
|
-
var Icon = require('../Icon/Icon.cjs');
|
|
22
|
-
var utils = require('../TransactionConfirmationPageLayout/utils.cjs');
|
|
23
|
-
var Typography = require('../Typography/Typography.cjs');
|
|
19
|
+
var shortenWalletAddress = require('../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.cjs');
|
|
24
20
|
require('../../context/DynamicContext/DynamicContext.cjs');
|
|
25
21
|
require('../../store/state/loadingAndLifecycle/loadingAndLifecycle.cjs');
|
|
26
22
|
require('../../events/dynamicEvents.cjs');
|
|
@@ -30,6 +26,7 @@ require('../../context/ErrorContext/ErrorContext.cjs');
|
|
|
30
26
|
require('@dynamic-labs/multi-wallet');
|
|
31
27
|
require('react-international-phone');
|
|
32
28
|
require('../../store/state/nonce/nonce.cjs');
|
|
29
|
+
var networksAndChains = require('../../utils/functions/networksAndChains/networksAndChains.cjs');
|
|
33
30
|
require('@dynamic-labs-sdk/client/core');
|
|
34
31
|
require('../../client/client.cjs');
|
|
35
32
|
require('@dynamic-labs-sdk/client');
|
|
@@ -65,6 +62,8 @@ require('../../store/state/walletOptions/walletOptions.cjs');
|
|
|
65
62
|
require('react-i18next');
|
|
66
63
|
require('../Accordion/components/AccordionItem/AccordionItem.cjs');
|
|
67
64
|
require('../Alert/Alert.cjs');
|
|
65
|
+
var Typography = require('../Typography/Typography.cjs');
|
|
66
|
+
var Icon = require('../Icon/Icon.cjs');
|
|
68
67
|
var Tooltip = require('../Tooltip/Tooltip.cjs');
|
|
69
68
|
require('../IconButton/IconButton.cjs');
|
|
70
69
|
require('../InlineWidget/InlineWidget.cjs');
|
|
@@ -98,6 +97,7 @@ require('../../views/MfaChooseDeviceView/getMfaOptions/getMfaOptions.cjs');
|
|
|
98
97
|
require('../../context/PasskeyContext/PasskeyContext.cjs');
|
|
99
98
|
require('../../context/OnrampContext/OnrampContext.cjs');
|
|
100
99
|
require('../../store/state/sendBalances.cjs');
|
|
100
|
+
var utils = require('../TransactionConfirmationPageLayout/utils.cjs');
|
|
101
101
|
var useNetworkConfigurationsFromProjectSettings = require('../../utils/hooks/useNetworkConfigurationsFromProjectSettings/useNetworkConfigurationsFromProjectSettings.cjs');
|
|
102
102
|
require('../../store/state/connectorsInitializing/connectorsInitializing.cjs');
|
|
103
103
|
require('../OverlayCardBase/OverlayCardTarget/OverlayCardTarget.cjs');
|
|
@@ -131,7 +131,7 @@ const SendBalanceTransactionCard = ({ transaction, currentToken, currencySymbol,
|
|
|
131
131
|
})
|
|
132
132
|
: '')] }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'secondary', children: currencySymbol })] }), transactionValue && (jsxRuntime.jsxs(Typography.Typography, { variant: 'body_small', color: 'error-1', "data-testid": 'transaction-transfer-amount-fiat', children: ["$", utils.getDisplayFiatPrice(Number(transactionValue) || Number(valueRounded) || 0, currentToken)] }))] }), jsxRuntime.jsx("div", { className: 'transaction-card__icon', children: jsxRuntime.jsx("div", { className: 'transaction-card__icon__container', children: jsxRuntime.jsx("img", { src: (currentToken === null || currentToken === void 0 ? void 0 : currentToken.logoURI) ||
|
|
133
133
|
(networkInfoEntry === null || networkInfoEntry === void 0 ? void 0 : networkInfoEntry.nativeCurrency.iconUrl), alt: currencySymbol, width: 32, height: 32, className: 'transaction-card__icon__container__main' }) }) })] })] }) }) }) }));
|
|
134
|
-
const renderTransactionDetails = () => (jsxRuntime.jsx("div", { className: 'transaction-card', children: jsxRuntime.jsxs("div", { className: 'transaction-card__details', children: [jsxRuntime.jsxs("div", { className: 'transaction-card__row', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'secondary', copykey: 'dyn_send_transaction.confirmation.data.destination', children: t('dyn_send_transaction.confirmation.data.destination') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', "data-testid": 'transaction-destination', children: shortenWalletAddress.shortenWalletAddress(transaction.to
|
|
134
|
+
const renderTransactionDetails = () => (jsxRuntime.jsx("div", { className: 'transaction-card', children: jsxRuntime.jsxs("div", { className: 'transaction-card__details', children: [jsxRuntime.jsxs("div", { className: 'transaction-card__row', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'secondary', copykey: 'dyn_send_transaction.confirmation.data.destination', children: t('dyn_send_transaction.confirmation.data.destination') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', "data-testid": 'transaction-destination', children: shortenWalletAddress.shortenWalletAddress(transaction.to) })] }), !isGasSponsored && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: 'transaction-card__divider' }), jsxRuntime.jsxs("div", { className: 'transaction-card__row', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'secondary', "data-testid": 'transaction-network', copykey: 'dyn_send_transaction.confirmation.data.network', children: t('dyn_send_transaction.confirmation.data.network') }), jsxRuntime.jsxs("div", { className: 'transaction-card__network-info', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', children: (networkInfoEntry === null || networkInfoEntry === void 0 ? void 0 : networkInfoEntry.name) || 'Ethereum' }), jsxRuntime.jsx("img", { src: (networkInfoEntry === null || networkInfoEntry === void 0 ? void 0 : networkInfoEntry.iconUrls[0]) || (chain === null || chain === void 0 ? void 0 : chain.icon), alt: (networkInfoEntry === null || networkInfoEntry === void 0 ? void 0 : networkInfoEntry.name) || 'Network icon', width: 16, height: 16, className: 'transaction-card__network-icon' })] })] }), jsxRuntime.jsx("div", { className: 'transaction-card__divider' }), jsxRuntime.jsxs("div", { className: 'transaction-card__row', children: [jsxRuntime.jsxs("div", { className: 'transaction-card__label-with-tooltip', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'secondary', copykey: 'dyn_send_transaction.confirmation.data.gas_estimate', children: t('dyn_send_transaction.confirmation.data.gas_estimate') }), jsxRuntime.jsx(Tooltip.Tooltip, { content: 'Network fees are paid to process your transaction', className: 'transaction-confirmation', children: jsxRuntime.jsx(Icon.Icon, { size: 'small', className: 'fee-tooltip', children: jsxRuntime.jsx(tooltip.ReactComponent, {}) }) })] }), jsxRuntime.jsx("div", { className: 'transaction-card__value', children: (currentToken === null || currentToken === void 0 ? void 0 : currentToken.price) ? (jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', "data-testid": 'transaction-estimated-gas-fee', children: Number(gasFiatValue) <= 0.01
|
|
135
135
|
? '<$0.01'
|
|
136
136
|
: `$${gasFiatValue}` })) : (jsxRuntime.jsxs(Typography.Typography, { variant: 'body_normal', color: 'primary', "data-testid": 'transaction-estimated-gas-fee', children: [transaction.fee.gas
|
|
137
137
|
? transaction.format(transaction.fee.gas, {
|
|
@@ -8,15 +8,11 @@ import 'react';
|
|
|
8
8
|
import { ReactComponent as SvgTooltip } from '../../shared/assets/tooltip.js';
|
|
9
9
|
import '../../context/ViewContext/ViewContext.js';
|
|
10
10
|
import '@dynamic-labs/wallet-book';
|
|
11
|
-
import { shortenWalletAddress } from '../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.js';
|
|
12
11
|
import '@dynamic-labs/utils';
|
|
13
12
|
import '../../utils/constants/colors.js';
|
|
14
13
|
import '../../utils/constants/values.js';
|
|
15
14
|
import '../../shared/consts/index.js';
|
|
16
|
-
import {
|
|
17
|
-
import { Icon } from '../Icon/Icon.js';
|
|
18
|
-
import { getDisplayFiatPrice } from '../TransactionConfirmationPageLayout/utils.js';
|
|
19
|
-
import { Typography } from '../Typography/Typography.js';
|
|
15
|
+
import { shortenWalletAddress } from '../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.js';
|
|
20
16
|
import '../../context/DynamicContext/DynamicContext.js';
|
|
21
17
|
import '../../store/state/loadingAndLifecycle/loadingAndLifecycle.js';
|
|
22
18
|
import '../../events/dynamicEvents.js';
|
|
@@ -26,6 +22,7 @@ import '../../context/ErrorContext/ErrorContext.js';
|
|
|
26
22
|
import '@dynamic-labs/multi-wallet';
|
|
27
23
|
import 'react-international-phone';
|
|
28
24
|
import '../../store/state/nonce/nonce.js';
|
|
25
|
+
import { getNetworkInfoEntry } from '../../utils/functions/networksAndChains/networksAndChains.js';
|
|
29
26
|
import '@dynamic-labs-sdk/client/core';
|
|
30
27
|
import '../../client/client.js';
|
|
31
28
|
import '@dynamic-labs-sdk/client';
|
|
@@ -61,6 +58,8 @@ import '../../store/state/walletOptions/walletOptions.js';
|
|
|
61
58
|
import 'react-i18next';
|
|
62
59
|
import '../Accordion/components/AccordionItem/AccordionItem.js';
|
|
63
60
|
import '../Alert/Alert.js';
|
|
61
|
+
import { Typography } from '../Typography/Typography.js';
|
|
62
|
+
import { Icon } from '../Icon/Icon.js';
|
|
64
63
|
import { Tooltip } from '../Tooltip/Tooltip.js';
|
|
65
64
|
import '../IconButton/IconButton.js';
|
|
66
65
|
import '../InlineWidget/InlineWidget.js';
|
|
@@ -94,6 +93,7 @@ import '../../views/MfaChooseDeviceView/getMfaOptions/getMfaOptions.js';
|
|
|
94
93
|
import '../../context/PasskeyContext/PasskeyContext.js';
|
|
95
94
|
import '../../context/OnrampContext/OnrampContext.js';
|
|
96
95
|
import '../../store/state/sendBalances.js';
|
|
96
|
+
import { getDisplayFiatPrice } from '../TransactionConfirmationPageLayout/utils.js';
|
|
97
97
|
import { useNetworkConfigurationsFromProjectSettings } from '../../utils/hooks/useNetworkConfigurationsFromProjectSettings/useNetworkConfigurationsFromProjectSettings.js';
|
|
98
98
|
import '../../store/state/connectorsInitializing/connectorsInitializing.js';
|
|
99
99
|
import '../OverlayCardBase/OverlayCardTarget/OverlayCardTarget.js';
|
|
@@ -127,7 +127,7 @@ const SendBalanceTransactionCard = ({ transaction, currentToken, currencySymbol,
|
|
|
127
127
|
})
|
|
128
128
|
: '')] }), jsx(Typography, { variant: 'body_normal', color: 'secondary', children: currencySymbol })] }), transactionValue && (jsxs(Typography, { variant: 'body_small', color: 'error-1', "data-testid": 'transaction-transfer-amount-fiat', children: ["$", getDisplayFiatPrice(Number(transactionValue) || Number(valueRounded) || 0, currentToken)] }))] }), jsx("div", { className: 'transaction-card__icon', children: jsx("div", { className: 'transaction-card__icon__container', children: jsx("img", { src: (currentToken === null || currentToken === void 0 ? void 0 : currentToken.logoURI) ||
|
|
129
129
|
(networkInfoEntry === null || networkInfoEntry === void 0 ? void 0 : networkInfoEntry.nativeCurrency.iconUrl), alt: currencySymbol, width: 32, height: 32, className: 'transaction-card__icon__container__main' }) }) })] })] }) }) }) }));
|
|
130
|
-
const renderTransactionDetails = () => (jsx("div", { className: 'transaction-card', children: jsxs("div", { className: 'transaction-card__details', children: [jsxs("div", { className: 'transaction-card__row', children: [jsx(Typography, { variant: 'body_normal', color: 'secondary', copykey: 'dyn_send_transaction.confirmation.data.destination', children: t('dyn_send_transaction.confirmation.data.destination') }), jsx(Typography, { variant: 'body_normal', color: 'primary', "data-testid": 'transaction-destination', children: shortenWalletAddress(transaction.to
|
|
130
|
+
const renderTransactionDetails = () => (jsx("div", { className: 'transaction-card', children: jsxs("div", { className: 'transaction-card__details', children: [jsxs("div", { className: 'transaction-card__row', children: [jsx(Typography, { variant: 'body_normal', color: 'secondary', copykey: 'dyn_send_transaction.confirmation.data.destination', children: t('dyn_send_transaction.confirmation.data.destination') }), jsx(Typography, { variant: 'body_normal', color: 'primary', "data-testid": 'transaction-destination', children: shortenWalletAddress(transaction.to) })] }), !isGasSponsored && (jsxs(Fragment, { children: [jsx("div", { className: 'transaction-card__divider' }), jsxs("div", { className: 'transaction-card__row', children: [jsx(Typography, { variant: 'body_normal', color: 'secondary', "data-testid": 'transaction-network', copykey: 'dyn_send_transaction.confirmation.data.network', children: t('dyn_send_transaction.confirmation.data.network') }), jsxs("div", { className: 'transaction-card__network-info', children: [jsx(Typography, { variant: 'body_normal', color: 'primary', children: (networkInfoEntry === null || networkInfoEntry === void 0 ? void 0 : networkInfoEntry.name) || 'Ethereum' }), jsx("img", { src: (networkInfoEntry === null || networkInfoEntry === void 0 ? void 0 : networkInfoEntry.iconUrls[0]) || (chain === null || chain === void 0 ? void 0 : chain.icon), alt: (networkInfoEntry === null || networkInfoEntry === void 0 ? void 0 : networkInfoEntry.name) || 'Network icon', width: 16, height: 16, className: 'transaction-card__network-icon' })] })] }), jsx("div", { className: 'transaction-card__divider' }), jsxs("div", { className: 'transaction-card__row', children: [jsxs("div", { className: 'transaction-card__label-with-tooltip', children: [jsx(Typography, { variant: 'body_normal', color: 'secondary', copykey: 'dyn_send_transaction.confirmation.data.gas_estimate', children: t('dyn_send_transaction.confirmation.data.gas_estimate') }), jsx(Tooltip, { content: 'Network fees are paid to process your transaction', className: 'transaction-confirmation', children: jsx(Icon, { size: 'small', className: 'fee-tooltip', children: jsx(SvgTooltip, {}) }) })] }), jsx("div", { className: 'transaction-card__value', children: (currentToken === null || currentToken === void 0 ? void 0 : currentToken.price) ? (jsx(Typography, { variant: 'body_normal', color: 'primary', "data-testid": 'transaction-estimated-gas-fee', children: Number(gasFiatValue) <= 0.01
|
|
131
131
|
? '<$0.01'
|
|
132
132
|
: `$${gasFiatValue}` })) : (jsxs(Typography, { variant: 'body_normal', color: 'primary', "data-testid": 'transaction-estimated-gas-fee', children: [transaction.fee.gas
|
|
133
133
|
? transaction.format(transaction.fee.gas, {
|
|
@@ -13,7 +13,6 @@ require('@dynamic-labs/wallet-connector-core');
|
|
|
13
13
|
var tooltip = require('../../shared/assets/tooltip.cjs');
|
|
14
14
|
require('../../context/ViewContext/ViewContext.cjs');
|
|
15
15
|
require('@dynamic-labs/wallet-book');
|
|
16
|
-
var shortenWalletAddress = require('../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.cjs');
|
|
17
16
|
require('@dynamic-labs/utils');
|
|
18
17
|
require('../../utils/constants/colors.cjs');
|
|
19
18
|
require('../../utils/constants/values.cjs');
|
|
@@ -81,6 +80,7 @@ require('../ShadowDOM/ShadowDOM.cjs');
|
|
|
81
80
|
require('react-focus-lock');
|
|
82
81
|
require('qrcode');
|
|
83
82
|
var useFetchChain = require('../../widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.cjs');
|
|
83
|
+
var shortenWalletAddress = require('../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.cjs');
|
|
84
84
|
require('formik');
|
|
85
85
|
require('../../utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
|
|
86
86
|
require('../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
@@ -237,8 +237,8 @@ const TransactionCard = ({ transaction, simulationResult, isGasSponsored, isAATr
|
|
|
237
237
|
}
|
|
238
238
|
return `-- ${nativeCurrencySymbol}`;
|
|
239
239
|
};
|
|
240
|
-
return (jsxRuntime.jsxs("div", { className: 'transaction-card-container', children: [allAssets.length > 0 && (jsxRuntime.jsx("div", { className: 'transaction-card', children: jsxRuntime.jsx("div", { className: 'transaction-card__assets-container', children: allAssets.map((asset, index, array) => (jsxRuntime.jsx(React__default["default"].Fragment, { children: renderAssetTransfer(asset, index, array) }, `asset-${index}`))) }) })), jsxRuntime.jsx("div", { className: 'transaction-card', children: jsxRuntime.jsxs("div", { className: 'transaction-card__details', children: [recipient && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: 'transaction-card__row', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'secondary', copykey: 'dyn_send_transaction.confirmation.data.recipient', children: t('dyn_send_transaction.confirmation.data.recipient') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', "data-testid": 'transaction-recipient', children: shortenWalletAddress.shortenWalletAddress(recipient
|
|
241
|
-
(transaction.to || ((_e = simulationResult === null || simulationResult === void 0 ? void 0 : simulationResult.counterparties) === null || _e === void 0 ? void 0 : _e[0])) && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: 'transaction-card__row', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'secondary', copykey: 'dyn_send_transaction.confirmation.data.destination', children: t('dyn_send_transaction.confirmation.data.destination') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', "data-testid": 'transaction-destination', children: shortenWalletAddress.shortenWalletAddress((_f = transaction.to) !== null && _f !== void 0 ? _f : (_g = simulationResult === null || simulationResult === void 0 ? void 0 : simulationResult.counterparties) === null || _g === void 0 ? void 0 : _g[0]
|
|
240
|
+
return (jsxRuntime.jsxs("div", { className: 'transaction-card-container', children: [allAssets.length > 0 && (jsxRuntime.jsx("div", { className: 'transaction-card', children: jsxRuntime.jsx("div", { className: 'transaction-card__assets-container', children: allAssets.map((asset, index, array) => (jsxRuntime.jsx(React__default["default"].Fragment, { children: renderAssetTransfer(asset, index, array) }, `asset-${index}`))) }) })), jsxRuntime.jsx("div", { className: 'transaction-card', children: jsxRuntime.jsxs("div", { className: 'transaction-card__details', children: [recipient && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: 'transaction-card__row', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'secondary', copykey: 'dyn_send_transaction.confirmation.data.recipient', children: t('dyn_send_transaction.confirmation.data.recipient') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', "data-testid": 'transaction-recipient', children: shortenWalletAddress.shortenWalletAddress(recipient) })] }), jsxRuntime.jsx("div", { className: 'transaction-card__divider' })] })), !recipient &&
|
|
241
|
+
(transaction.to || ((_e = simulationResult === null || simulationResult === void 0 ? void 0 : simulationResult.counterparties) === null || _e === void 0 ? void 0 : _e[0])) && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: 'transaction-card__row', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'secondary', copykey: 'dyn_send_transaction.confirmation.data.destination', children: t('dyn_send_transaction.confirmation.data.destination') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', "data-testid": 'transaction-destination', children: shortenWalletAddress.shortenWalletAddress((_f = transaction.to) !== null && _f !== void 0 ? _f : (_g = simulationResult === null || simulationResult === void 0 ? void 0 : simulationResult.counterparties) === null || _g === void 0 ? void 0 : _g[0]) })] }), jsxRuntime.jsx("div", { className: 'transaction-card__divider' })] })), jsxRuntime.jsxs("div", { className: 'transaction-card__row', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'secondary', copykey: 'dyn_send_transaction.confirmation.data.network', children: t('dyn_send_transaction.confirmation.data.network') }), jsxRuntime.jsxs("div", { className: 'transaction-card__network-info', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', children: (networkInfoEntry === null || networkInfoEntry === void 0 ? void 0 : networkInfoEntry.name) || 'Ethereum' }), jsxRuntime.jsx("img", { src: networkInfoEntry === null || networkInfoEntry === void 0 ? void 0 : networkInfoEntry.iconUrls[0], alt: (networkInfoEntry === null || networkInfoEntry === void 0 ? void 0 : networkInfoEntry.name) || 'Network icon', width: 16, height: 16, className: 'transaction-card__network-icon' })] })] }), !isGasSponsored && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: 'transaction-card__divider' }), jsxRuntime.jsxs("div", { className: 'transaction-card__row', children: [jsxRuntime.jsxs("div", { className: 'transaction-card__label-with-tooltip', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'secondary', copykey: 'dyn_send_transaction.confirmation.data.gas_estimate', children: t('dyn_send_transaction.confirmation.data.gas_estimate') }), jsxRuntime.jsx(Tooltip.Tooltip, { content: 'Network fees are paid to process your transaction', className: 'transaction-confirmation', children: jsxRuntime.jsx(Icon.Icon, { size: 'small', className: 'fee-tooltip', children: jsxRuntime.jsx(tooltip.ReactComponent, {}) }) })] }), jsxRuntime.jsx("div", { className: 'transaction-card__value', children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', "data-testid": 'transaction-estimated-gas-fee', children: getGasFeeDisplay() }) })] })] })), blockaidOn &&
|
|
242
242
|
totalAmountInUsd !== undefined &&
|
|
243
243
|
totalAmountInUsd > 0 &&
|
|
244
244
|
!(isAATransaction && !isGasSponsored) && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: 'transaction-card__divider' }), jsxRuntime.jsxs("div", { className: 'transaction-card__row', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'secondary', weight: 'bold', copykey: 'dyn_send_transaction.confirmation.data.total', children: t('dyn_send_transaction.confirmation.data.total') }), jsxRuntime.jsx("div", { className: 'transaction-card__total-amount', children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', "data-testid": 'transaction-estimated-total', children: getTotalAmountInUsdDisplay(totalAmountInUsd) }) })] })] }))] }) })] }));
|
|
@@ -9,7 +9,6 @@ import '@dynamic-labs/wallet-connector-core';
|
|
|
9
9
|
import { ReactComponent as SvgTooltip } from '../../shared/assets/tooltip.js';
|
|
10
10
|
import '../../context/ViewContext/ViewContext.js';
|
|
11
11
|
import '@dynamic-labs/wallet-book';
|
|
12
|
-
import { shortenWalletAddress } from '../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.js';
|
|
13
12
|
import '@dynamic-labs/utils';
|
|
14
13
|
import '../../utils/constants/colors.js';
|
|
15
14
|
import '../../utils/constants/values.js';
|
|
@@ -77,6 +76,7 @@ import '../ShadowDOM/ShadowDOM.js';
|
|
|
77
76
|
import 'react-focus-lock';
|
|
78
77
|
import 'qrcode';
|
|
79
78
|
import { useFetchChain } from '../../widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.js';
|
|
79
|
+
import { shortenWalletAddress } from '../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.js';
|
|
80
80
|
import 'formik';
|
|
81
81
|
import '../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
|
|
82
82
|
import '../../context/WalletGroupContext/WalletGroupContext.js';
|
|
@@ -229,8 +229,8 @@ const TransactionCard = ({ transaction, simulationResult, isGasSponsored, isAATr
|
|
|
229
229
|
}
|
|
230
230
|
return `-- ${nativeCurrencySymbol}`;
|
|
231
231
|
};
|
|
232
|
-
return (jsxs("div", { className: 'transaction-card-container', children: [allAssets.length > 0 && (jsx("div", { className: 'transaction-card', children: jsx("div", { className: 'transaction-card__assets-container', children: allAssets.map((asset, index, array) => (jsx(React__default.Fragment, { children: renderAssetTransfer(asset, index, array) }, `asset-${index}`))) }) })), jsx("div", { className: 'transaction-card', children: jsxs("div", { className: 'transaction-card__details', children: [recipient && (jsxs(Fragment, { children: [jsxs("div", { className: 'transaction-card__row', children: [jsx(Typography, { variant: 'body_normal', color: 'secondary', copykey: 'dyn_send_transaction.confirmation.data.recipient', children: t('dyn_send_transaction.confirmation.data.recipient') }), jsx(Typography, { variant: 'body_normal', color: 'primary', "data-testid": 'transaction-recipient', children: shortenWalletAddress(recipient
|
|
233
|
-
(transaction.to || ((_e = simulationResult === null || simulationResult === void 0 ? void 0 : simulationResult.counterparties) === null || _e === void 0 ? void 0 : _e[0])) && (jsxs(Fragment, { children: [jsxs("div", { className: 'transaction-card__row', children: [jsx(Typography, { variant: 'body_normal', color: 'secondary', copykey: 'dyn_send_transaction.confirmation.data.destination', children: t('dyn_send_transaction.confirmation.data.destination') }), jsx(Typography, { variant: 'body_normal', color: 'primary', "data-testid": 'transaction-destination', children: shortenWalletAddress((_f = transaction.to) !== null && _f !== void 0 ? _f : (_g = simulationResult === null || simulationResult === void 0 ? void 0 : simulationResult.counterparties) === null || _g === void 0 ? void 0 : _g[0]
|
|
232
|
+
return (jsxs("div", { className: 'transaction-card-container', children: [allAssets.length > 0 && (jsx("div", { className: 'transaction-card', children: jsx("div", { className: 'transaction-card__assets-container', children: allAssets.map((asset, index, array) => (jsx(React__default.Fragment, { children: renderAssetTransfer(asset, index, array) }, `asset-${index}`))) }) })), jsx("div", { className: 'transaction-card', children: jsxs("div", { className: 'transaction-card__details', children: [recipient && (jsxs(Fragment, { children: [jsxs("div", { className: 'transaction-card__row', children: [jsx(Typography, { variant: 'body_normal', color: 'secondary', copykey: 'dyn_send_transaction.confirmation.data.recipient', children: t('dyn_send_transaction.confirmation.data.recipient') }), jsx(Typography, { variant: 'body_normal', color: 'primary', "data-testid": 'transaction-recipient', children: shortenWalletAddress(recipient) })] }), jsx("div", { className: 'transaction-card__divider' })] })), !recipient &&
|
|
233
|
+
(transaction.to || ((_e = simulationResult === null || simulationResult === void 0 ? void 0 : simulationResult.counterparties) === null || _e === void 0 ? void 0 : _e[0])) && (jsxs(Fragment, { children: [jsxs("div", { className: 'transaction-card__row', children: [jsx(Typography, { variant: 'body_normal', color: 'secondary', copykey: 'dyn_send_transaction.confirmation.data.destination', children: t('dyn_send_transaction.confirmation.data.destination') }), jsx(Typography, { variant: 'body_normal', color: 'primary', "data-testid": 'transaction-destination', children: shortenWalletAddress((_f = transaction.to) !== null && _f !== void 0 ? _f : (_g = simulationResult === null || simulationResult === void 0 ? void 0 : simulationResult.counterparties) === null || _g === void 0 ? void 0 : _g[0]) })] }), jsx("div", { className: 'transaction-card__divider' })] })), jsxs("div", { className: 'transaction-card__row', children: [jsx(Typography, { variant: 'body_normal', color: 'secondary', copykey: 'dyn_send_transaction.confirmation.data.network', children: t('dyn_send_transaction.confirmation.data.network') }), jsxs("div", { className: 'transaction-card__network-info', children: [jsx(Typography, { variant: 'body_normal', color: 'primary', children: (networkInfoEntry === null || networkInfoEntry === void 0 ? void 0 : networkInfoEntry.name) || 'Ethereum' }), jsx("img", { src: networkInfoEntry === null || networkInfoEntry === void 0 ? void 0 : networkInfoEntry.iconUrls[0], alt: (networkInfoEntry === null || networkInfoEntry === void 0 ? void 0 : networkInfoEntry.name) || 'Network icon', width: 16, height: 16, className: 'transaction-card__network-icon' })] })] }), !isGasSponsored && (jsxs(Fragment, { children: [jsx("div", { className: 'transaction-card__divider' }), jsxs("div", { className: 'transaction-card__row', children: [jsxs("div", { className: 'transaction-card__label-with-tooltip', children: [jsx(Typography, { variant: 'body_normal', color: 'secondary', copykey: 'dyn_send_transaction.confirmation.data.gas_estimate', children: t('dyn_send_transaction.confirmation.data.gas_estimate') }), jsx(Tooltip, { content: 'Network fees are paid to process your transaction', className: 'transaction-confirmation', children: jsx(Icon, { size: 'small', className: 'fee-tooltip', children: jsx(SvgTooltip, {}) }) })] }), jsx("div", { className: 'transaction-card__value', children: jsx(Typography, { variant: 'body_normal', color: 'primary', "data-testid": 'transaction-estimated-gas-fee', children: getGasFeeDisplay() }) })] })] })), blockaidOn &&
|
|
234
234
|
totalAmountInUsd !== undefined &&
|
|
235
235
|
totalAmountInUsd > 0 &&
|
|
236
236
|
!(isAATransaction && !isGasSponsored) && (jsxs(Fragment, { children: [jsx("div", { className: 'transaction-card__divider' }), jsxs("div", { className: 'transaction-card__row', children: [jsx(Typography, { variant: 'body_normal', color: 'secondary', weight: 'bold', copykey: 'dyn_send_transaction.confirmation.data.total', children: t('dyn_send_transaction.confirmation.data.total') }), jsx("div", { className: 'transaction-card__total-amount', children: jsx(Typography, { variant: 'body_normal', color: 'primary', "data-testid": 'transaction-estimated-total', children: getTotalAmountInUsdDisplay(totalAmountInUsd) }) })] })] }))] }) })] }));
|
|
@@ -17,7 +17,6 @@ require('@dynamic-labs/sdk-api-core');
|
|
|
17
17
|
require('../../shared/logger.cjs');
|
|
18
18
|
require('@dynamic-labs/wallet-connector-core');
|
|
19
19
|
require('@dynamic-labs/wallet-book');
|
|
20
|
-
var shortenWalletAddress = require('../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.cjs');
|
|
21
20
|
require('../../utils/constants/colors.cjs');
|
|
22
21
|
require('../../utils/constants/values.cjs');
|
|
23
22
|
require('../../shared/consts/index.cjs');
|
|
@@ -78,6 +77,7 @@ require('../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
|
78
77
|
require('../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
79
78
|
require('react-focus-lock');
|
|
80
79
|
var Icon = require('../Icon/Icon.cjs');
|
|
80
|
+
var shortenWalletAddress = require('../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.cjs');
|
|
81
81
|
require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
82
82
|
var IconButton = require('../IconButton/IconButton.cjs');
|
|
83
83
|
require('../MenuList/Dropdown/Dropdown.cjs');
|
|
@@ -130,7 +130,7 @@ const TransactionStatusLayout = ({ destinationAddress, transactionValue, network
|
|
|
130
130
|
}));
|
|
131
131
|
const closeButton = onClickClose && (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: onClickClose, "data-testid": 'close', children: jsxRuntime.jsx(close.ReactComponent, {}) }));
|
|
132
132
|
const totalFiatCost = fiatUtils.getTotalFiatCost(currentToken, transaction, nativePrice, transactionValue);
|
|
133
|
-
return (jsxRuntime.jsxs("div", { className: 'transaction-status-layout', children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { trailing: closeButton, alignContent: 'bottom', children: jsxRuntime.jsx(Icon.Icon, { size: 'large', className: 'transaction-status-layout__status-icon', children: jsxRuntime.jsx(checkBlue.ReactComponent, {}) }) }), jsxRuntime.jsxs("div", { className: 'transaction-status-layout__body', children: [jsxRuntime.jsxs("div", { className: 'transaction-status-layout__sent_to', children: [jsxRuntime.jsxs(Typography.Typography, { variant: 'body_small', color: 'secondary', className: 'transaction-status-layout__title', copykey: 'dyn_send_transaction.succeeded.title', children: [t('dyn_send_transaction.succeeded.title'), ' '] }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'primary', className: 'transaction-status-layout__title', copykey: 'dyn_send_transaction.succeeded.title', children: shortenWalletAddress.shortenWalletAddress(destinationAddress
|
|
133
|
+
return (jsxRuntime.jsxs("div", { className: 'transaction-status-layout', children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { trailing: closeButton, alignContent: 'bottom', children: jsxRuntime.jsx(Icon.Icon, { size: 'large', className: 'transaction-status-layout__status-icon', children: jsxRuntime.jsx(checkBlue.ReactComponent, {}) }) }), jsxRuntime.jsxs("div", { className: 'transaction-status-layout__body', children: [jsxRuntime.jsxs("div", { className: 'transaction-status-layout__sent_to', children: [jsxRuntime.jsxs(Typography.Typography, { variant: 'body_small', color: 'secondary', className: 'transaction-status-layout__title', copykey: 'dyn_send_transaction.succeeded.title', children: [t('dyn_send_transaction.succeeded.title'), ' '] }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'primary', className: 'transaction-status-layout__title', copykey: 'dyn_send_transaction.succeeded.title', children: shortenWalletAddress.shortenWalletAddress(destinationAddress) })] }), jsxRuntime.jsx("div", { className: 'transaction-status-layout__content', children: jsxRuntime.jsx("div", { className: 'transaction-status-layout__rows', children: jsxRuntime.jsxs(Typography.Typography, { variant: 'title', color: 'primary', className: 'transaction-status-layout__title', copykey: 'dyn_send_transaction.succeeded.title', children: [`${utils.getValueRounded(isNativeToken, transaction)} ${networkCurrency} `, showFiat &&
|
|
134
134
|
(currentToken === null || currentToken === void 0 ? void 0 : currentToken.price) &&
|
|
135
135
|
totalFiatCost !== undefined &&
|
|
136
136
|
`($${Number(totalFiatCost) <= 0.01 ? '<0.01' : totalFiatCost})`] }) }) }), jsxRuntime.jsx(AnimatePresence.AnimatePresence, { animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, {}), children: jsxRuntime.jsx("div", { className: 'transaction-confirmation__warning', children: jsxRuntime.jsx(Alert.Alert, { variant: 'info', copykey: 'dyn_send_transaction.info_message.refresh_balance_time', children: t('dyn_send_transaction.info_message.refresh_balance_time') }) }) }), jsxRuntime.jsx("div", { className: 'transaction-status-layout__transaction-link-container', children: txLink && (jsxRuntime.jsx(Typography.Typography, { as: 'a', href: txLink, target: '_blank', rel: 'noreferrer', className: 'transaction-status-layout__transaction-link-container__transaction-link', variant: 'body_small', children: t('dyn_wallet_funding.success_txn_link') })) }), jsxRuntime.jsx("div", { className: 'transaction-status-layout__actions', children: jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonVariant: 'brand-primary', buttonPadding: 'small', expanded: true, onClick: onDone, loading: false, copykey: 'dyn_send_transaction.succeeded.continue_button', dataTestId: 'transaction-done-continue', children: t('dyn_send_transaction.succeeded.continue_button') }) }), displayPoweredByDynamicFooter && (jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'transaction-status-layout__footer' }))] })] }));
|
|
@@ -13,7 +13,6 @@ import '@dynamic-labs/sdk-api-core';
|
|
|
13
13
|
import '../../shared/logger.js';
|
|
14
14
|
import '@dynamic-labs/wallet-connector-core';
|
|
15
15
|
import '@dynamic-labs/wallet-book';
|
|
16
|
-
import { shortenWalletAddress } from '../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.js';
|
|
17
16
|
import '../../utils/constants/colors.js';
|
|
18
17
|
import '../../utils/constants/values.js';
|
|
19
18
|
import '../../shared/consts/index.js';
|
|
@@ -74,6 +73,7 @@ import '../../context/WalletGroupContext/WalletGroupContext.js';
|
|
|
74
73
|
import '../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
75
74
|
import 'react-focus-lock';
|
|
76
75
|
import { Icon } from '../Icon/Icon.js';
|
|
76
|
+
import { shortenWalletAddress } from '../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.js';
|
|
77
77
|
import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
78
78
|
import { IconButton } from '../IconButton/IconButton.js';
|
|
79
79
|
import '../MenuList/Dropdown/Dropdown.js';
|
|
@@ -126,7 +126,7 @@ const TransactionStatusLayout = ({ destinationAddress, transactionValue, network
|
|
|
126
126
|
}));
|
|
127
127
|
const closeButton = onClickClose && (jsx(IconButton, { type: 'button', onClick: onClickClose, "data-testid": 'close', children: jsx(SvgClose, {}) }));
|
|
128
128
|
const totalFiatCost = getTotalFiatCost(currentToken, transaction, nativePrice, transactionValue);
|
|
129
|
-
return (jsxs("div", { className: 'transaction-status-layout', children: [jsx(ModalHeader, { trailing: closeButton, alignContent: 'bottom', children: jsx(Icon, { size: 'large', className: 'transaction-status-layout__status-icon', children: jsx(SvgCheckBlue, {}) }) }), jsxs("div", { className: 'transaction-status-layout__body', children: [jsxs("div", { className: 'transaction-status-layout__sent_to', children: [jsxs(Typography, { variant: 'body_small', color: 'secondary', className: 'transaction-status-layout__title', copykey: 'dyn_send_transaction.succeeded.title', children: [t('dyn_send_transaction.succeeded.title'), ' '] }), jsx(Typography, { variant: 'body_small', color: 'primary', className: 'transaction-status-layout__title', copykey: 'dyn_send_transaction.succeeded.title', children: shortenWalletAddress(destinationAddress
|
|
129
|
+
return (jsxs("div", { className: 'transaction-status-layout', children: [jsx(ModalHeader, { trailing: closeButton, alignContent: 'bottom', children: jsx(Icon, { size: 'large', className: 'transaction-status-layout__status-icon', children: jsx(SvgCheckBlue, {}) }) }), jsxs("div", { className: 'transaction-status-layout__body', children: [jsxs("div", { className: 'transaction-status-layout__sent_to', children: [jsxs(Typography, { variant: 'body_small', color: 'secondary', className: 'transaction-status-layout__title', copykey: 'dyn_send_transaction.succeeded.title', children: [t('dyn_send_transaction.succeeded.title'), ' '] }), jsx(Typography, { variant: 'body_small', color: 'primary', className: 'transaction-status-layout__title', copykey: 'dyn_send_transaction.succeeded.title', children: shortenWalletAddress(destinationAddress) })] }), jsx("div", { className: 'transaction-status-layout__content', children: jsx("div", { className: 'transaction-status-layout__rows', children: jsxs(Typography, { variant: 'title', color: 'primary', className: 'transaction-status-layout__title', copykey: 'dyn_send_transaction.succeeded.title', children: [`${getValueRounded(isNativeToken, transaction)} ${networkCurrency} `, showFiat &&
|
|
130
130
|
(currentToken === null || currentToken === void 0 ? void 0 : currentToken.price) &&
|
|
131
131
|
totalFiatCost !== undefined &&
|
|
132
132
|
`($${Number(totalFiatCost) <= 0.01 ? '<0.01' : totalFiatCost})`] }) }) }), jsx(AnimatePresence, { animationComponent: jsx(VerticalDrawerTransition, {}), children: jsx("div", { className: 'transaction-confirmation__warning', children: jsx(Alert, { variant: 'info', copykey: 'dyn_send_transaction.info_message.refresh_balance_time', children: t('dyn_send_transaction.info_message.refresh_balance_time') }) }) }), jsx("div", { className: 'transaction-status-layout__transaction-link-container', children: txLink && (jsx(Typography, { as: 'a', href: txLink, target: '_blank', rel: 'noreferrer', className: 'transaction-status-layout__transaction-link-container__transaction-link', variant: 'body_small', children: t('dyn_wallet_funding.success_txn_link') })) }), jsx("div", { className: 'transaction-status-layout__actions', children: jsx(TypographyButton, { buttonVariant: 'brand-primary', buttonPadding: 'small', expanded: true, onClick: onDone, loading: false, copykey: 'dyn_send_transaction.succeeded.continue_button', dataTestId: 'transaction-done-continue', children: t('dyn_send_transaction.succeeded.continue_button') }) }), displayPoweredByDynamicFooter && (jsx(PoweredByDynamic, { classNameRoot: 'transaction-status-layout__footer' }))] })] }));
|
|
@@ -4,25 +4,24 @@
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var useFetchNameService = require('../../widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.cjs');
|
|
8
|
+
var StatusDot = require('../StatusDot/StatusDot.cjs');
|
|
9
|
+
var Typography = require('../Typography/Typography.cjs');
|
|
10
|
+
require('react');
|
|
11
|
+
require('../../events/dynamicEvents.cjs');
|
|
12
|
+
require('../../../../_virtual/_tslib.cjs');
|
|
13
|
+
require('@dynamic-labs/utils');
|
|
14
|
+
require('../../context/DynamicContext/DynamicContext.cjs');
|
|
15
|
+
require('../../store/state/loadingAndLifecycle/loadingAndLifecycle.cjs');
|
|
7
16
|
require('@dynamic-labs/sdk-api-core');
|
|
8
17
|
require('../../shared/logger.cjs');
|
|
9
18
|
require('@dynamic-labs/iconic');
|
|
10
19
|
require('@dynamic-labs/wallet-connector-core');
|
|
11
|
-
require('react');
|
|
12
20
|
require('../../context/ViewContext/ViewContext.cjs');
|
|
13
21
|
require('@dynamic-labs/wallet-book');
|
|
14
|
-
var shortenWalletAddress = require('../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.cjs');
|
|
15
|
-
require('@dynamic-labs/utils');
|
|
16
22
|
require('../../utils/constants/colors.cjs');
|
|
17
23
|
require('../../utils/constants/values.cjs');
|
|
18
24
|
require('../../shared/consts/index.cjs');
|
|
19
|
-
var useFetchNameService = require('../../widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.cjs');
|
|
20
|
-
var StatusDot = require('../StatusDot/StatusDot.cjs');
|
|
21
|
-
var Typography = require('../Typography/Typography.cjs');
|
|
22
|
-
require('../../events/dynamicEvents.cjs');
|
|
23
|
-
require('../../../../_virtual/_tslib.cjs');
|
|
24
|
-
require('../../context/DynamicContext/DynamicContext.cjs');
|
|
25
|
-
require('../../store/state/loadingAndLifecycle/loadingAndLifecycle.cjs');
|
|
26
25
|
require('../../store/state/authMode/authMode.cjs');
|
|
27
26
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
28
27
|
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
@@ -79,6 +78,7 @@ require('../Popper/Popper/Popper.cjs');
|
|
|
79
78
|
require('../Popper/PopperContext/PopperContext.cjs');
|
|
80
79
|
require('react-focus-lock');
|
|
81
80
|
require('qrcode');
|
|
81
|
+
var shortenWalletAddress = require('../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.cjs');
|
|
82
82
|
require('formik');
|
|
83
83
|
require('../../utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
|
|
84
84
|
require('../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
@@ -112,7 +112,7 @@ const UserAddress = ({ userProfile, walletConnector }) => {
|
|
|
112
112
|
const { data: walletConnectorAddress } = usePromise.usePromise(() => walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.getAddress(), {
|
|
113
113
|
enabled: !userProfile && Boolean(walletConnector),
|
|
114
114
|
});
|
|
115
|
-
return (jsxRuntime.jsxs("div", { className: 'user-address__container', children: [jsxRuntime.jsx(StatusDot.StatusDot, { variant: 'green', containerClassName: 'user-address__status-dot' }), (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, { variant: 'numbers_big', color: 'primary', className: 'user-address', children: nameService.name }), jsxRuntime.jsx("div", { className: 'dynamic-widget-wallet-header__seperator' }), jsxRuntime.jsx(Typography.Typography, { variant: 'numbers_medium', color: 'secondary', className: 'user-address', children: shortenWalletAddress.shortenWalletAddress(lastVerifiedCredential === null || lastVerifiedCredential === void 0 ? void 0 : lastVerifiedCredential.address
|
|
115
|
+
return (jsxRuntime.jsxs("div", { className: 'user-address__container', children: [jsxRuntime.jsx(StatusDot.StatusDot, { variant: 'green', containerClassName: 'user-address__status-dot' }), (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, { variant: 'numbers_big', color: 'primary', className: 'user-address', children: nameService.name }), jsxRuntime.jsx("div", { className: 'dynamic-widget-wallet-header__seperator' }), jsxRuntime.jsx(Typography.Typography, { variant: 'numbers_medium', color: 'secondary', className: 'user-address', children: shortenWalletAddress.shortenWalletAddress(lastVerifiedCredential === null || lastVerifiedCredential === void 0 ? void 0 : lastVerifiedCredential.address) })] })) : (jsxRuntime.jsx(Typography.Typography, { variant: 'numbers_big', color: 'primary', className: 'user-address', children: shortenWalletAddress.shortenWalletAddress((lastVerifiedCredential === null || lastVerifiedCredential === void 0 ? void 0 : lastVerifiedCredential.address) || walletConnectorAddress) }))] }));
|
|
116
116
|
};
|
|
117
117
|
|
|
118
118
|
exports.UserAddress = UserAddress;
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
3
|
+
import { useFetchNameService } from '../../widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.js';
|
|
4
|
+
import { StatusDot } from '../StatusDot/StatusDot.js';
|
|
5
|
+
import { Typography } from '../Typography/Typography.js';
|
|
6
|
+
import 'react';
|
|
7
|
+
import '../../events/dynamicEvents.js';
|
|
8
|
+
import '../../../../_virtual/_tslib.js';
|
|
9
|
+
import '@dynamic-labs/utils';
|
|
10
|
+
import '../../context/DynamicContext/DynamicContext.js';
|
|
11
|
+
import '../../store/state/loadingAndLifecycle/loadingAndLifecycle.js';
|
|
3
12
|
import '@dynamic-labs/sdk-api-core';
|
|
4
13
|
import '../../shared/logger.js';
|
|
5
14
|
import '@dynamic-labs/iconic';
|
|
6
15
|
import '@dynamic-labs/wallet-connector-core';
|
|
7
|
-
import 'react';
|
|
8
16
|
import '../../context/ViewContext/ViewContext.js';
|
|
9
17
|
import '@dynamic-labs/wallet-book';
|
|
10
|
-
import { shortenWalletAddress } from '../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.js';
|
|
11
|
-
import '@dynamic-labs/utils';
|
|
12
18
|
import '../../utils/constants/colors.js';
|
|
13
19
|
import '../../utils/constants/values.js';
|
|
14
20
|
import '../../shared/consts/index.js';
|
|
15
|
-
import { useFetchNameService } from '../../widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.js';
|
|
16
|
-
import { StatusDot } from '../StatusDot/StatusDot.js';
|
|
17
|
-
import { Typography } from '../Typography/Typography.js';
|
|
18
|
-
import '../../events/dynamicEvents.js';
|
|
19
|
-
import '../../../../_virtual/_tslib.js';
|
|
20
|
-
import '../../context/DynamicContext/DynamicContext.js';
|
|
21
|
-
import '../../store/state/loadingAndLifecycle/loadingAndLifecycle.js';
|
|
22
21
|
import '../../store/state/authMode/authMode.js';
|
|
23
22
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
24
23
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
@@ -75,6 +74,7 @@ import '../Popper/Popper/Popper.js';
|
|
|
75
74
|
import '../Popper/PopperContext/PopperContext.js';
|
|
76
75
|
import 'react-focus-lock';
|
|
77
76
|
import 'qrcode';
|
|
77
|
+
import { shortenWalletAddress } from '../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.js';
|
|
78
78
|
import 'formik';
|
|
79
79
|
import '../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
|
|
80
80
|
import '../../context/WalletGroupContext/WalletGroupContext.js';
|
|
@@ -108,7 +108,7 @@ const UserAddress = ({ userProfile, walletConnector }) => {
|
|
|
108
108
|
const { data: walletConnectorAddress } = usePromise(() => walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.getAddress(), {
|
|
109
109
|
enabled: !userProfile && Boolean(walletConnector),
|
|
110
110
|
});
|
|
111
|
-
return (jsxs("div", { className: 'user-address__container', children: [jsx(StatusDot, { variant: 'green', containerClassName: 'user-address__status-dot' }), (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? (jsxs(Fragment, { children: [jsx(Typography, { variant: 'numbers_big', color: 'primary', className: 'user-address', children: nameService.name }), jsx("div", { className: 'dynamic-widget-wallet-header__seperator' }), jsx(Typography, { variant: 'numbers_medium', color: 'secondary', className: 'user-address', children: shortenWalletAddress(lastVerifiedCredential === null || lastVerifiedCredential === void 0 ? void 0 : lastVerifiedCredential.address
|
|
111
|
+
return (jsxs("div", { className: 'user-address__container', children: [jsx(StatusDot, { variant: 'green', containerClassName: 'user-address__status-dot' }), (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? (jsxs(Fragment, { children: [jsx(Typography, { variant: 'numbers_big', color: 'primary', className: 'user-address', children: nameService.name }), jsx("div", { className: 'dynamic-widget-wallet-header__seperator' }), jsx(Typography, { variant: 'numbers_medium', color: 'secondary', className: 'user-address', children: shortenWalletAddress(lastVerifiedCredential === null || lastVerifiedCredential === void 0 ? void 0 : lastVerifiedCredential.address) })] })) : (jsx(Typography, { variant: 'numbers_big', color: 'primary', className: 'user-address', children: shortenWalletAddress((lastVerifiedCredential === null || lastVerifiedCredential === void 0 ? void 0 : lastVerifiedCredential.address) || walletConnectorAddress) }))] }));
|
|
112
112
|
};
|
|
113
113
|
|
|
114
114
|
export { UserAddress };
|
|
@@ -7,18 +7,8 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var reactI18next = require('react-i18next');
|
|
9
9
|
var Typography = require('../Typography/Typography.cjs');
|
|
10
|
-
require('@dynamic-labs/sdk-api-core');
|
|
11
|
-
require('../../shared/logger.cjs');
|
|
12
|
-
require('@dynamic-labs/iconic');
|
|
13
|
-
require('@dynamic-labs/wallet-connector-core');
|
|
14
|
-
require('../../context/ViewContext/ViewContext.cjs');
|
|
15
|
-
require('@dynamic-labs/wallet-book');
|
|
16
|
-
var shortenWalletAddress = require('../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.cjs');
|
|
17
|
-
require('@dynamic-labs/utils');
|
|
18
|
-
require('../../utils/constants/colors.cjs');
|
|
19
|
-
require('../../utils/constants/values.cjs');
|
|
20
|
-
require('../../shared/consts/index.cjs');
|
|
21
10
|
var Icon = require('../Icon/Icon.cjs');
|
|
11
|
+
var shortenWalletAddress = require('../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.cjs');
|
|
22
12
|
|
|
23
13
|
const WalletInformationCard = ({ address, ens, balance, icon, network, menu, }) => {
|
|
24
14
|
const { t } = reactI18next.useTranslation();
|
|
@@ -3,18 +3,8 @@ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { Typography } from '../Typography/Typography.js';
|
|
6
|
-
import '@dynamic-labs/sdk-api-core';
|
|
7
|
-
import '../../shared/logger.js';
|
|
8
|
-
import '@dynamic-labs/iconic';
|
|
9
|
-
import '@dynamic-labs/wallet-connector-core';
|
|
10
|
-
import '../../context/ViewContext/ViewContext.js';
|
|
11
|
-
import '@dynamic-labs/wallet-book';
|
|
12
|
-
import { shortenWalletAddress } from '../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.js';
|
|
13
|
-
import '@dynamic-labs/utils';
|
|
14
|
-
import '../../utils/constants/colors.js';
|
|
15
|
-
import '../../utils/constants/values.js';
|
|
16
|
-
import '../../shared/consts/index.js';
|
|
17
6
|
import { Icon } from '../Icon/Icon.js';
|
|
7
|
+
import { shortenWalletAddress } from '../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.js';
|
|
18
8
|
|
|
19
9
|
const WalletInformationCard = ({ address, ens, balance, icon, network, menu, }) => {
|
|
20
10
|
const { t } = useTranslation();
|