@dynamic-labs/sdk-react-core 0.19.0-alpha.27 → 0.19.0-alpha.28

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
+ ## [0.19.0-alpha.28](https://github.com/dynamic-labs/DynamicAuth/compare/v0.19.0-alpha.27...v0.19.0-alpha.28) (2023-10-26)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * do not pass TransactionType for zksync transactions in Sendbalance view due to RPC errors ([#3745](https://github.com/dynamic-labs/DynamicAuth/issues/3745)) ([27f8aa1](https://github.com/dynamic-labs/DynamicAuth/commit/27f8aa1c7c790fa24a5e6b5e4400bd9415b3c3ce))
8
+
2
9
  ## [0.19.0-alpha.27](https://github.com/dynamic-labs/DynamicAuth/compare/v0.19.0-alpha.26...v0.19.0-alpha.27) (2023-10-26)
3
10
 
4
11
 
package/package.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var version = "0.19.0-alpha.27";
5
+ var version = "0.19.0-alpha.28";
6
6
  var dependencies = {
7
7
  "@dynamic-labs/iconic": "0.1.34",
8
8
  "@dynamic-labs/sdk-api": "0.0.292",
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
- var version = "0.19.0-alpha.27";
1
+ var version = "0.19.0-alpha.28";
2
2
  var dependencies = {
3
3
  "@dynamic-labs/iconic": "0.1.34",
4
4
  "@dynamic-labs/sdk-api": "0.0.292",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-react-core",
3
- "version": "0.19.0-alpha.27",
3
+ "version": "0.19.0-alpha.28",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -17,13 +17,13 @@
17
17
  "react-focus-lock": "2.9.2",
18
18
  "react-i18next": "^13.2.0",
19
19
  "yup": "0.32.11",
20
- "@dynamic-labs/logger": "0.19.0-alpha.27",
21
- "@dynamic-labs/multi-wallet": "0.19.0-alpha.27",
22
- "@dynamic-labs/rpc-providers": "0.19.0-alpha.27",
23
- "@dynamic-labs/types": "0.19.0-alpha.27",
24
- "@dynamic-labs/utils": "0.19.0-alpha.27",
25
- "@dynamic-labs/wallet-book": "0.19.0-alpha.27",
26
- "@dynamic-labs/wallet-connector-core": "0.19.0-alpha.27",
20
+ "@dynamic-labs/logger": "0.19.0-alpha.28",
21
+ "@dynamic-labs/multi-wallet": "0.19.0-alpha.28",
22
+ "@dynamic-labs/rpc-providers": "0.19.0-alpha.28",
23
+ "@dynamic-labs/types": "0.19.0-alpha.28",
24
+ "@dynamic-labs/utils": "0.19.0-alpha.28",
25
+ "@dynamic-labs/wallet-book": "0.19.0-alpha.28",
26
+ "@dynamic-labs/wallet-connector-core": "0.19.0-alpha.28",
27
27
  "eventemitter3": "5.0.1"
28
28
  },
29
29
  "devDependencies": {
@@ -65,6 +65,7 @@ var TransactionStatusLayout = require('../../components/TransactionStatusLayout/
65
65
  var useFetchCurrency = require('../../widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.cjs');
66
66
  var TransactionStage = require('./components/TransactionStage/TransactionStage.cjs');
67
67
 
68
+ const isZkSync = (chainId) => chainId === 280 || chainId === 324;
68
69
  const SendBalanceView = ({ initialRecipientAddress = '', initialValue, onClickBack, onClickClose, onError, onSuccess, onDone, displayPoweredByDynamicFooter = false, }) => {
69
70
  const [stage, setStage] = React.useState('form');
70
71
  const { primaryWallet, network } = useInternalDynamicContext.useInternalDynamicContext();
@@ -100,10 +101,15 @@ const SendBalanceView = ({ initialRecipientAddress = '', initialValue, onClickBa
100
101
  if (!provider || value === null) {
101
102
  return null;
102
103
  }
104
+ let transactionType = 'eip2930';
105
+ // ZKSync RPCs return 'access lists are not supported' error when using eip2930
106
+ if (isZkSync(Number(network))) {
107
+ transactionType = undefined;
108
+ }
103
109
  const transaction = {
104
110
  from: primaryWallet.address,
105
111
  to: recipientAddress,
106
- type: 'eip2930',
112
+ type: transactionType,
107
113
  value,
108
114
  };
109
115
  return (jsxRuntime.jsx(TransactionStage.TransactionStage, { walletConnector: walletConnector, provider: provider, transaction: transaction, title: 'Confirm transaction', onClickBack: () => setStage('form'), onError: onError, displayPoweredByDynamicFooter: displayPoweredByDynamicFooter, onSuccess: (transaction) => {
@@ -61,6 +61,7 @@ import { TransactionStatusLayout } from '../../components/TransactionStatusLayou
61
61
  import { useFetchCurrency } from '../../widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.js';
62
62
  import { TransactionStage } from './components/TransactionStage/TransactionStage.js';
63
63
 
64
+ const isZkSync = (chainId) => chainId === 280 || chainId === 324;
64
65
  const SendBalanceView = ({ initialRecipientAddress = '', initialValue, onClickBack, onClickClose, onError, onSuccess, onDone, displayPoweredByDynamicFooter = false, }) => {
65
66
  const [stage, setStage] = useState('form');
66
67
  const { primaryWallet, network } = useInternalDynamicContext();
@@ -96,10 +97,15 @@ const SendBalanceView = ({ initialRecipientAddress = '', initialValue, onClickBa
96
97
  if (!provider || value === null) {
97
98
  return null;
98
99
  }
100
+ let transactionType = 'eip2930';
101
+ // ZKSync RPCs return 'access lists are not supported' error when using eip2930
102
+ if (isZkSync(Number(network))) {
103
+ transactionType = undefined;
104
+ }
99
105
  const transaction = {
100
106
  from: primaryWallet.address,
101
107
  to: recipientAddress,
102
- type: 'eip2930',
108
+ type: transactionType,
103
109
  value,
104
110
  };
105
111
  return (jsx(TransactionStage, { walletConnector: walletConnector, provider: provider, transaction: transaction, title: 'Confirm transaction', onClickBack: () => setStage('form'), onError: onError, displayPoweredByDynamicFooter: displayPoweredByDynamicFooter, onSuccess: (transaction) => {