@dynamic-labs/sdk-react-core 2.1.0-alpha.24 → 2.1.0-alpha.25

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 CHANGED
@@ -1,4 +1,11 @@
1
1
 
2
+ ## [2.1.0-alpha.25](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.24...v2.1.0-alpha.25) (2024-05-27)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * btc balance calculation ([#5737](https://github.com/dynamic-labs/DynamicAuth/issues/5737)) ([9b5ceb3](https://github.com/dynamic-labs/DynamicAuth/commit/9b5ceb32d543037f60d7104f0b81b3abc86ebd10))
8
+
2
9
  ## [2.1.0-alpha.24](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.23...v2.1.0-alpha.24) (2024-05-26)
3
10
 
4
11
 
package/package.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "2.1.0-alpha.24";
6
+ var version = "2.1.0-alpha.25";
7
7
  var dependencies = {
8
8
  "@dynamic-labs/sdk-api-core": "0.0.453",
9
9
  "@hcaptcha/react-hcaptcha": "1.4.4",
package/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client'
2
- var version = "2.1.0-alpha.24";
2
+ var version = "2.1.0-alpha.25";
3
3
  var dependencies = {
4
4
  "@dynamic-labs/sdk-api-core": "0.0.453",
5
5
  "@hcaptcha/react-hcaptcha": "1.4.4",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-react-core",
3
- "version": "2.1.0-alpha.24",
3
+ "version": "2.1.0-alpha.25",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
@@ -17,18 +17,18 @@
17
17
  "react-i18next": "13.5.0",
18
18
  "yup": "0.32.11",
19
19
  "react-international-phone": "4.2.5",
20
- "@dynamic-labs/iconic": "2.1.0-alpha.24",
21
- "@dynamic-labs/logger": "2.1.0-alpha.24",
22
- "@dynamic-labs/multi-wallet": "2.1.0-alpha.24",
23
- "@dynamic-labs/rpc-provider-ethereum": "2.1.0-alpha.24",
24
- "@dynamic-labs/rpc-provider-solana": "2.1.0-alpha.24",
25
- "@dynamic-labs/rpc-providers": "2.1.0-alpha.24",
26
- "@dynamic-labs/store": "2.1.0-alpha.24",
27
- "@dynamic-labs/types": "2.1.0-alpha.24",
28
- "@dynamic-labs/utils": "2.1.0-alpha.24",
29
- "@dynamic-labs/viem-utils": "2.1.0-alpha.24",
30
- "@dynamic-labs/wallet-book": "2.1.0-alpha.24",
31
- "@dynamic-labs/wallet-connector-core": "2.1.0-alpha.24",
20
+ "@dynamic-labs/iconic": "2.1.0-alpha.25",
21
+ "@dynamic-labs/logger": "2.1.0-alpha.25",
22
+ "@dynamic-labs/multi-wallet": "2.1.0-alpha.25",
23
+ "@dynamic-labs/rpc-provider-ethereum": "2.1.0-alpha.25",
24
+ "@dynamic-labs/rpc-provider-solana": "2.1.0-alpha.25",
25
+ "@dynamic-labs/rpc-providers": "2.1.0-alpha.25",
26
+ "@dynamic-labs/store": "2.1.0-alpha.25",
27
+ "@dynamic-labs/types": "2.1.0-alpha.25",
28
+ "@dynamic-labs/utils": "2.1.0-alpha.25",
29
+ "@dynamic-labs/viem-utils": "2.1.0-alpha.25",
30
+ "@dynamic-labs/wallet-book": "2.1.0-alpha.25",
31
+ "@dynamic-labs/wallet-connector-core": "2.1.0-alpha.25",
32
32
  "eventemitter3": "5.0.1"
33
33
  },
34
34
  "devDependencies": {
@@ -5,7 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
7
  var reactI18next = require('react-i18next');
8
- var MockedQrCode = require('../../MockedQrCode/MockedQrCode.cjs');
9
8
  require('@dynamic-labs/sdk-api-core');
10
9
  require('../../../shared/logger.cjs');
11
10
  require('@dynamic-labs/iconic');
@@ -106,7 +105,7 @@ const QrCodeContainer = ({ accentColor, walletConnector, qrcodeValue, Icon: Main
106
105
  };
107
106
  return (jsxRuntime.jsxs("div", { className: classNames.classNames('qrcode-container__container', {
108
107
  'qrcode-container__container--message': showQrCodeMessage,
109
- }), children: [jsxRuntime.jsxs("div", { className: 'qrcode-container__top', children: [qrcodeValue.length ? (jsxRuntime.jsx(QRCode.QRCode, { Icon: MainIcon, accentColor: accentColor, value: qrcodeValue, logoSize: 50, walletKey: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key, showQrCodeImage: showQrCodeImage })) : (jsxRuntime.jsx(LoadingQrCode.LoadingQrCode, { Icon: MainIcon, logoSize: 50 })), jsxRuntime.jsx(MockedQrCode.MockedQrCode, {}), jsxRuntime.jsxs("div", { className: 'button-container', children: [showCopyToClipboardButton && (jsxRuntime.jsx(CopyButton.CopyButton, { variant: 'button', textToCopy: qrcodeValue, disabled: !qrcodeValue.length, buttonClassName: 'qr-code-button', copykey: 'dyn_qr_code.copy_button', startSlot:
108
+ }), children: [jsxRuntime.jsxs("div", { className: 'qrcode-container__top', children: [qrcodeValue.length ? (jsxRuntime.jsx(QRCode.QRCode, { Icon: MainIcon, accentColor: accentColor, value: qrcodeValue, logoSize: 50, walletKey: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key, showQrCodeImage: showQrCodeImage })) : (jsxRuntime.jsx(LoadingQrCode.LoadingQrCode, { Icon: MainIcon, logoSize: 50 })), jsxRuntime.jsxs("div", { className: 'button-container', children: [showCopyToClipboardButton && (jsxRuntime.jsx(CopyButton.CopyButton, { variant: 'button', textToCopy: qrcodeValue, disabled: !qrcodeValue.length, buttonClassName: 'qr-code-button', copykey: 'dyn_qr_code.copy_button', startSlot:
110
109
  // eslint-disable-next-line react/jsx-wrap-multilines
111
110
  jsxRuntime.jsx(Icon.Icon, { size: 'mini', color: 'text-tertiary', children: jsxRuntime.jsx(link.ReactComponent, {}) }), children: t('dyn_qr_code.copy_button') })), renderAppOrExtensionButton()] })] }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'secondary', weight: 'regular', className: 'qrcode-container__content', copykey: 'dyn_qr_code.scan_title', children: t('dyn_qr_code.scan_title', {
112
111
  app: walletConnector ? 'wallet' : 'app',
@@ -1,7 +1,6 @@
1
1
  'use client'
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
3
  import { useTranslation } from 'react-i18next';
4
- import { MockedQrCode } from '../../MockedQrCode/MockedQrCode.js';
5
4
  import '@dynamic-labs/sdk-api-core';
6
5
  import '../../../shared/logger.js';
7
6
  import '@dynamic-labs/iconic';
@@ -102,7 +101,7 @@ const QrCodeContainer = ({ accentColor, walletConnector, qrcodeValue, Icon: Main
102
101
  };
103
102
  return (jsxs("div", { className: classNames('qrcode-container__container', {
104
103
  'qrcode-container__container--message': showQrCodeMessage,
105
- }), children: [jsxs("div", { className: 'qrcode-container__top', children: [qrcodeValue.length ? (jsx(QRCode, { Icon: MainIcon, accentColor: accentColor, value: qrcodeValue, logoSize: 50, walletKey: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key, showQrCodeImage: showQrCodeImage })) : (jsx(LoadingQrCode, { Icon: MainIcon, logoSize: 50 })), jsx(MockedQrCode, {}), jsxs("div", { className: 'button-container', children: [showCopyToClipboardButton && (jsx(CopyButton, { variant: 'button', textToCopy: qrcodeValue, disabled: !qrcodeValue.length, buttonClassName: 'qr-code-button', copykey: 'dyn_qr_code.copy_button', startSlot:
104
+ }), children: [jsxs("div", { className: 'qrcode-container__top', children: [qrcodeValue.length ? (jsx(QRCode, { Icon: MainIcon, accentColor: accentColor, value: qrcodeValue, logoSize: 50, walletKey: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key, showQrCodeImage: showQrCodeImage })) : (jsx(LoadingQrCode, { Icon: MainIcon, logoSize: 50 })), jsxs("div", { className: 'button-container', children: [showCopyToClipboardButton && (jsx(CopyButton, { variant: 'button', textToCopy: qrcodeValue, disabled: !qrcodeValue.length, buttonClassName: 'qr-code-button', copykey: 'dyn_qr_code.copy_button', startSlot:
106
105
  // eslint-disable-next-line react/jsx-wrap-multilines
107
106
  jsx(Icon, { size: 'mini', color: 'text-tertiary', children: jsx(SvgLink, {}) }), children: t('dyn_qr_code.copy_button') })), renderAppOrExtensionButton()] })] }), jsx(Typography, { variant: 'body_normal', color: 'secondary', weight: 'regular', className: 'qrcode-container__content', copykey: 'dyn_qr_code.scan_title', children: t('dyn_qr_code.scan_title', {
108
107
  app: walletConnector ? 'wallet' : 'app',
@@ -137,7 +137,7 @@ const PasskeyContextProviderWithBrowser = ({ children, }) => {
137
137
  if (typeof window === 'undefined') {
138
138
  return false;
139
139
  }
140
- const hostname = utils.LocationService.getHostname();
140
+ const hostname = utils.PlatformService.getHostname();
141
141
  if (!getUserPasskeysResult.data)
142
142
  return false;
143
143
  return getUserPasskeysResult.data.some((passkey) => {
@@ -2,7 +2,7 @@
2
2
  import { __awaiter } from '../../../../_virtual/_tslib.js';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
  import { createContext, useContext, useState, useMemo, useCallback } from 'react';
5
- import { LocationService, getTLD } from '@dynamic-labs/utils';
5
+ import { PlatformService, getTLD } from '@dynamic-labs/utils';
6
6
  import '../../events/dynamicEvents.js';
7
7
  import '../DynamicContext/DynamicContext.js';
8
8
  import '@dynamic-labs/sdk-api-core';
@@ -133,7 +133,7 @@ const PasskeyContextProviderWithBrowser = ({ children, }) => {
133
133
  if (typeof window === 'undefined') {
134
134
  return false;
135
135
  }
136
- const hostname = LocationService.getHostname();
136
+ const hostname = PlatformService.getHostname();
137
137
  if (!getUserPasskeysResult.data)
138
138
  return false;
139
139
  return getUserPasskeysResult.data.some((passkey) => {
@@ -1,89 +0,0 @@
1
- 'use client'
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, '__esModule', { value: true });
5
-
6
- var jsxRuntime = require('react/jsx-runtime');
7
- var iconic = require('@dynamic-labs/iconic');
8
- var MockContext = require('../../context/MockContext/MockContext.cjs');
9
- var ThemeContext = require('../../context/ThemeContext/ThemeContext.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('@dynamic-labs/sdk-api-core');
16
- require('../../shared/logger.cjs');
17
- require('@dynamic-labs/wallet-connector-core');
18
- require('../../context/ViewContext/ViewContext.cjs');
19
- require('@dynamic-labs/wallet-book');
20
- require('../../utils/constants/colors.cjs');
21
- require('../../utils/constants/values.cjs');
22
- require('../../shared/utils/classes/storage/localStorage.cjs');
23
- require('../../shared/consts/index.cjs');
24
- require('../../context/CaptchaContext/CaptchaContext.cjs');
25
- require('../../context/ErrorContext/ErrorContext.cjs');
26
- require('@dynamic-labs/multi-wallet');
27
- require('react-international-phone');
28
- require('viem');
29
- require('viem/chains');
30
- require('../../config/ApiEndpoint.cjs');
31
- require('@dynamic-labs/store');
32
- require('../../locale/locale.cjs');
33
- require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
34
- require('../../context/AccountExistsContext/AccountExistsContext.cjs');
35
- require('../../context/UserWalletsContext/UserWalletsContext.cjs');
36
- require('../../context/VerificationContext/VerificationContext.cjs');
37
- require('react-dom');
38
- require('../../context/WalletContext/WalletContext.cjs');
39
- require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
40
- require('@dynamic-labs/types');
41
- require('../../context/LoadingContext/LoadingContext.cjs');
42
- require('yup');
43
- require('../../views/CollectUserDataView/useFields.cjs');
44
- require('../../context/FieldsStateContext/FieldsStateContext.cjs');
45
- require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
46
- require('@dynamic-labs/rpc-providers');
47
- require('react-i18next');
48
- require('../../context/FooterAnimationContext/index.cjs');
49
- require('../ShadowDOM/ShadowDOM.cjs');
50
- require('../Transition/ZoomTransition/ZoomTransition.cjs');
51
- require('../Transition/SlideInUpTransition/SlideInUpTransition.cjs');
52
- require('../Transition/OpacityTransition/OpacityTransition.cjs');
53
- require('../OverlayCard/OverlayCardTarget/OverlayCardTarget.cjs');
54
- require('../../context/SocialRedirectContext/SocialRedirectContext.cjs');
55
- require('../../context/WalletGroupContext/WalletGroupContext.cjs');
56
- require('../../context/MfaSettingsContext/MfaSettingsContext.cjs');
57
- require('../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
58
- require('react-focus-lock');
59
- require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
60
- require('../IconButton/IconButton.cjs');
61
- require('../MenuList/Dropdown/Dropdown.cjs');
62
- require('formik');
63
- require('../../views/TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
64
- require('../Alert/Alert.cjs');
65
- require('../Input/Input.cjs');
66
- require('../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
67
- require('../../context/PasskeyContext/PasskeyContext.cjs');
68
- require('../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
69
- require('../InlineWidget/InlineWidget.cjs');
70
- require('../IsBrowser/IsBrowser.cjs');
71
- require('../Popper/Popper/Popper.cjs');
72
- require('../Popper/PopperContext/PopperContext.cjs');
73
- var QRCode = require('../QRCode/QRCode.cjs');
74
- require('../../views/WalletList/WalletList.cjs');
75
- require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
76
- require('@hcaptcha/react-hcaptcha');
77
- require('../../views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.cjs');
78
- require('../../context/IpConfigurationContext/IpConfigurationContext.cjs');
79
-
80
- const MockedQrCode = () => {
81
- const { mockedSDK } = MockContext.useMockContext();
82
- const { theme } = ThemeContext.useThemeContext();
83
- if (!mockedSDK)
84
- return null;
85
- const accentColor = theme.theme.name === 'dark' ? '#FFF' : '#1648F9';
86
- return (jsxRuntime.jsx(QRCode.QRCode, { Icon: jsxRuntime.jsx(iconic.CoinbaseIcon, {}), logoSize: 50, accentColor: accentColor, value: 'hello world!'.repeat(20), walletKey: 'coinbase' }));
87
- };
88
-
89
- exports.MockedQrCode = MockedQrCode;
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const MockedQrCode: () => JSX.Element | null;
@@ -1,85 +0,0 @@
1
- 'use client'
2
- import { jsx } from 'react/jsx-runtime';
3
- import { CoinbaseIcon } from '@dynamic-labs/iconic';
4
- import { useMockContext } from '../../context/MockContext/MockContext.js';
5
- import { useThemeContext } from '../../context/ThemeContext/ThemeContext.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 '@dynamic-labs/sdk-api-core';
12
- import '../../shared/logger.js';
13
- import '@dynamic-labs/wallet-connector-core';
14
- import '../../context/ViewContext/ViewContext.js';
15
- import '@dynamic-labs/wallet-book';
16
- import '../../utils/constants/colors.js';
17
- import '../../utils/constants/values.js';
18
- import '../../shared/utils/classes/storage/localStorage.js';
19
- import '../../shared/consts/index.js';
20
- import '../../context/CaptchaContext/CaptchaContext.js';
21
- import '../../context/ErrorContext/ErrorContext.js';
22
- import '@dynamic-labs/multi-wallet';
23
- import 'react-international-phone';
24
- import 'viem';
25
- import 'viem/chains';
26
- import '../../config/ApiEndpoint.js';
27
- import '@dynamic-labs/store';
28
- import '../../locale/locale.js';
29
- import '../../context/AccessDeniedContext/AccessDeniedContext.js';
30
- import '../../context/AccountExistsContext/AccountExistsContext.js';
31
- import '../../context/UserWalletsContext/UserWalletsContext.js';
32
- import '../../context/VerificationContext/VerificationContext.js';
33
- import 'react-dom';
34
- import '../../context/WalletContext/WalletContext.js';
35
- import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.js';
36
- import '@dynamic-labs/types';
37
- import '../../context/LoadingContext/LoadingContext.js';
38
- import 'yup';
39
- import '../../views/CollectUserDataView/useFields.js';
40
- import '../../context/FieldsStateContext/FieldsStateContext.js';
41
- import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
42
- import '@dynamic-labs/rpc-providers';
43
- import 'react-i18next';
44
- import '../../context/FooterAnimationContext/index.js';
45
- import '../ShadowDOM/ShadowDOM.js';
46
- import '../Transition/ZoomTransition/ZoomTransition.js';
47
- import '../Transition/SlideInUpTransition/SlideInUpTransition.js';
48
- import '../Transition/OpacityTransition/OpacityTransition.js';
49
- import '../OverlayCard/OverlayCardTarget/OverlayCardTarget.js';
50
- import '../../context/SocialRedirectContext/SocialRedirectContext.js';
51
- import '../../context/WalletGroupContext/WalletGroupContext.js';
52
- import '../../context/MfaSettingsContext/MfaSettingsContext.js';
53
- import '../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
54
- import 'react-focus-lock';
55
- import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
56
- import '../IconButton/IconButton.js';
57
- import '../MenuList/Dropdown/Dropdown.js';
58
- import 'formik';
59
- import '../../views/TransactionConfirmationView/helpers/transactionErrorMessage.js';
60
- import '../Alert/Alert.js';
61
- import '../Input/Input.js';
62
- import '../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
63
- import '../../context/PasskeyContext/PasskeyContext.js';
64
- import '../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
65
- import '../InlineWidget/InlineWidget.js';
66
- import '../IsBrowser/IsBrowser.js';
67
- import '../Popper/Popper/Popper.js';
68
- import '../Popper/PopperContext/PopperContext.js';
69
- import { QRCode } from '../QRCode/QRCode.js';
70
- import '../../views/WalletList/WalletList.js';
71
- import '../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
72
- import '@hcaptcha/react-hcaptcha';
73
- import '../../views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.js';
74
- import '../../context/IpConfigurationContext/IpConfigurationContext.js';
75
-
76
- const MockedQrCode = () => {
77
- const { mockedSDK } = useMockContext();
78
- const { theme } = useThemeContext();
79
- if (!mockedSDK)
80
- return null;
81
- const accentColor = theme.theme.name === 'dark' ? '#FFF' : '#1648F9';
82
- return (jsx(QRCode, { Icon: jsx(CoinbaseIcon, {}), logoSize: 50, accentColor: accentColor, value: 'hello world!'.repeat(20), walletKey: 'coinbase' }));
83
- };
84
-
85
- export { MockedQrCode };
@@ -1 +0,0 @@
1
- export { MockedQrCode } from './MockedQrCode';