@dynamic-labs/sdk-react-core 4.0.0-alpha.51 → 4.0.0-alpha.52
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 +2 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +12 -12
- package/src/lib/components/NetworkPicker/components/Network/Network.cjs +9 -6
- package/src/lib/components/NetworkPicker/components/Network/Network.js +9 -6
- package/src/lib/locale/en/translation.cjs +1 -0
- package/src/lib/locale/en/translation.d.ts +1 -0
- package/src/lib/locale/en/translation.js +1 -0
package/CHANGELOG.md
CHANGED
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.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.52",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@dynamic-labs/sdk-api-core": "0.0.578",
|
|
6
6
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
@@ -13,17 +13,17 @@
|
|
|
13
13
|
"react-i18next": "13.5.0",
|
|
14
14
|
"yup": "0.32.11",
|
|
15
15
|
"react-international-phone": "4.2.5",
|
|
16
|
-
"@dynamic-labs/assert-package-version": "4.0.0-alpha.
|
|
17
|
-
"@dynamic-labs/ethereum-aa": "4.0.0-alpha.
|
|
18
|
-
"@dynamic-labs/iconic": "4.0.0-alpha.
|
|
19
|
-
"@dynamic-labs/logger": "4.0.0-alpha.
|
|
20
|
-
"@dynamic-labs/multi-wallet": "4.0.0-alpha.
|
|
21
|
-
"@dynamic-labs/rpc-providers": "4.0.0-alpha.
|
|
22
|
-
"@dynamic-labs/store": "4.0.0-alpha.
|
|
23
|
-
"@dynamic-labs/types": "4.0.0-alpha.
|
|
24
|
-
"@dynamic-labs/utils": "4.0.0-alpha.
|
|
25
|
-
"@dynamic-labs/wallet-book": "4.0.0-alpha.
|
|
26
|
-
"@dynamic-labs/wallet-connector-core": "4.0.0-alpha.
|
|
16
|
+
"@dynamic-labs/assert-package-version": "4.0.0-alpha.52",
|
|
17
|
+
"@dynamic-labs/ethereum-aa": "4.0.0-alpha.52",
|
|
18
|
+
"@dynamic-labs/iconic": "4.0.0-alpha.52",
|
|
19
|
+
"@dynamic-labs/logger": "4.0.0-alpha.52",
|
|
20
|
+
"@dynamic-labs/multi-wallet": "4.0.0-alpha.52",
|
|
21
|
+
"@dynamic-labs/rpc-providers": "4.0.0-alpha.52",
|
|
22
|
+
"@dynamic-labs/store": "4.0.0-alpha.52",
|
|
23
|
+
"@dynamic-labs/types": "4.0.0-alpha.52",
|
|
24
|
+
"@dynamic-labs/utils": "4.0.0-alpha.52",
|
|
25
|
+
"@dynamic-labs/wallet-book": "4.0.0-alpha.52",
|
|
26
|
+
"@dynamic-labs/wallet-connector-core": "4.0.0-alpha.52",
|
|
27
27
|
"bs58": "5.0.0",
|
|
28
28
|
"eventemitter3": "5.0.1"
|
|
29
29
|
},
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var reactI18next = require('react-i18next');
|
|
7
8
|
var classNames = require('../../../../utils/functions/classNames/classNames.cjs');
|
|
8
9
|
require('../../../Accordion/components/AccordionItem/AccordionItem.cjs');
|
|
9
10
|
require('../../../Alert/Alert.cjs');
|
|
@@ -53,7 +54,6 @@ require('../../../../context/UserFieldEditorContext/UserFieldEditorContext.cjs')
|
|
|
53
54
|
require('@dynamic-labs/rpc-providers');
|
|
54
55
|
require('../../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
55
56
|
require('../../../../store/state/walletOptions/walletOptions.cjs');
|
|
56
|
-
require('react-i18next');
|
|
57
57
|
var Typography = require('../../../Typography/Typography.cjs');
|
|
58
58
|
require('../../../../context/FooterAnimationContext/index.cjs');
|
|
59
59
|
require('../../../ShadowDOM/ShadowDOM.cjs');
|
|
@@ -91,10 +91,13 @@ require('../../../Popper/PopperContext/PopperContext.cjs');
|
|
|
91
91
|
require('qrcode');
|
|
92
92
|
require('@dynamic-labs/ethereum-aa');
|
|
93
93
|
|
|
94
|
-
const Network = ({ iconUrl, isActive, networkName, className, checkboxClassName = '', isChanging, notSupported = false, }) =>
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
94
|
+
const Network = ({ iconUrl, isActive, networkName, className, checkboxClassName = '', isChanging, notSupported = false, }) => {
|
|
95
|
+
const { t } = reactI18next.useTranslation();
|
|
96
|
+
return (jsxRuntime.jsxs("div", { className: classNames.classNames('network', className, {
|
|
97
|
+
'network--not-supported': notSupported,
|
|
98
|
+
}), children: [jsxRuntime.jsxs("div", { className: 'network__container', children: [iconUrl ? (jsxRuntime.jsx("img", { src: iconUrl, className: 'network__title-icon', alt: `${networkName} icon` })) : (jsxRuntime.jsx(error.ReactComponent, {})), jsxRuntime.jsxs("div", { className: 'network__title-container', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'button_primary', className: 'network__title-copy', as: 'span', weight: 'medium', color: notSupported ? 'secondary' : 'primary', children: networkName }), notSupported && (jsxRuntime.jsx(Typography.Typography, { variant: 'body_mini', className: 'network__title-copy', as: 'span', weight: 'medium', color: notSupported ? 'secondary' : 'primary', "data-testid": 'network-not-supported', children: t('dyn_network_not_supported.wallet') }))] })] }), jsxRuntime.jsxs("div", { className: classNames.classNames('network__status-container', {
|
|
99
|
+
'network__status-container--active': isActive,
|
|
100
|
+
}, checkboxClassName), "data-testid": 'single-network-checkbox', children: [isActive && jsxRuntime.jsx(check.ReactComponent, { className: 'network__status-icon' }), isChanging && (jsxRuntime.jsx(Spinner.Spinner, { className: 'network__status-spinner-icon', size: 12 }))] })] }));
|
|
101
|
+
};
|
|
99
102
|
|
|
100
103
|
exports.Network = Network;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
3
4
|
import { classNames } from '../../../../utils/functions/classNames/classNames.js';
|
|
4
5
|
import '../../../Accordion/components/AccordionItem/AccordionItem.js';
|
|
5
6
|
import '../../../Alert/Alert.js';
|
|
@@ -49,7 +50,6 @@ import '../../../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
|
49
50
|
import '@dynamic-labs/rpc-providers';
|
|
50
51
|
import '../../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
51
52
|
import '../../../../store/state/walletOptions/walletOptions.js';
|
|
52
|
-
import 'react-i18next';
|
|
53
53
|
import { Typography } from '../../../Typography/Typography.js';
|
|
54
54
|
import '../../../../context/FooterAnimationContext/index.js';
|
|
55
55
|
import '../../../ShadowDOM/ShadowDOM.js';
|
|
@@ -87,10 +87,13 @@ import '../../../Popper/PopperContext/PopperContext.js';
|
|
|
87
87
|
import 'qrcode';
|
|
88
88
|
import '@dynamic-labs/ethereum-aa';
|
|
89
89
|
|
|
90
|
-
const Network = ({ iconUrl, isActive, networkName, className, checkboxClassName = '', isChanging, notSupported = false, }) =>
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
90
|
+
const Network = ({ iconUrl, isActive, networkName, className, checkboxClassName = '', isChanging, notSupported = false, }) => {
|
|
91
|
+
const { t } = useTranslation();
|
|
92
|
+
return (jsxs("div", { className: classNames('network', className, {
|
|
93
|
+
'network--not-supported': notSupported,
|
|
94
|
+
}), children: [jsxs("div", { className: 'network__container', children: [iconUrl ? (jsx("img", { src: iconUrl, className: 'network__title-icon', alt: `${networkName} icon` })) : (jsx(SvgError, {})), jsxs("div", { className: 'network__title-container', children: [jsx(Typography, { variant: 'button_primary', className: 'network__title-copy', as: 'span', weight: 'medium', color: notSupported ? 'secondary' : 'primary', children: networkName }), notSupported && (jsx(Typography, { variant: 'body_mini', className: 'network__title-copy', as: 'span', weight: 'medium', color: notSupported ? 'secondary' : 'primary', "data-testid": 'network-not-supported', children: t('dyn_network_not_supported.wallet') }))] })] }), jsxs("div", { className: classNames('network__status-container', {
|
|
95
|
+
'network__status-container--active': isActive,
|
|
96
|
+
}, checkboxClassName), "data-testid": 'single-network-checkbox', children: [isActive && jsx(SvgCheck, { className: 'network__status-icon' }), isChanging && (jsx(Spinner, { className: 'network__status-spinner-icon', size: 12 }))] })] }));
|
|
97
|
+
};
|
|
95
98
|
|
|
96
99
|
export { Network };
|
|
@@ -1332,6 +1332,7 @@ const translation = {
|
|
|
1332
1332
|
subtitle: 'Your wallet is not connected to a supported network. Please update before continuing.',
|
|
1333
1333
|
title: 'Update Network',
|
|
1334
1334
|
warning_message: 'This network is not available, please update.',
|
|
1335
|
+
wallet: 'Not Supported',
|
|
1335
1336
|
},
|
|
1336
1337
|
/**
|
|
1337
1338
|
* @description copy keys for network not supported view for manual switch
|
|
@@ -1328,6 +1328,7 @@ const translation = {
|
|
|
1328
1328
|
subtitle: 'Your wallet is not connected to a supported network. Please update before continuing.',
|
|
1329
1329
|
title: 'Update Network',
|
|
1330
1330
|
warning_message: 'This network is not available, please update.',
|
|
1331
|
+
wallet: 'Not Supported',
|
|
1331
1332
|
},
|
|
1332
1333
|
/**
|
|
1333
1334
|
* @description copy keys for network not supported view for manual switch
|