@dynamic-labs/sdk-react-core 0.16.12 → 0.16.14
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,18 @@
|
|
|
1
1
|
|
|
2
|
+
### [0.16.14](https://github.com/dynamic-labs/DynamicAuth/compare/v0.16.13...v0.16.14) (2023-05-08)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* **DynamicWagmiConnector:** prevent disconnect when WC is not present… ([#2071](https://github.com/dynamic-labs/DynamicAuth/issues/2071)) ([bb8d023](https://github.com/dynamic-labs/DynamicAuth/commit/bb8d023f097d80c69dcf08282dec3823069e129e)), closes [#2063](https://github.com/dynamic-labs/DynamicAuth/issues/2063) [#2060](https://github.com/dynamic-labs/DynamicAuth/issues/2060)
|
|
8
|
+
|
|
9
|
+
### [0.16.13](https://github.com/dynamic-labs/DynamicAuth/compare/v0.16.12...v0.16.13) (2023-05-08)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **TransactionModal:** ensure alchemy will not fail when estimating for gas ([#2067](https://github.com/dynamic-labs/DynamicAuth/issues/2067)) ([a0aea1b](https://github.com/dynamic-labs/DynamicAuth/commit/a0aea1bbabb9a81968dc4ba59d62e748c267849a))
|
|
15
|
+
|
|
2
16
|
### [0.16.12](https://github.com/dynamic-labs/DynamicAuth/compare/v0.16.11...v0.16.12) (2023-05-05)
|
|
3
17
|
|
|
4
18
|
|
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": "0.16.
|
|
3
|
+
"version": "0.16.14",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"formik": "^2.2.9",
|
|
18
18
|
"qrcode": "1.5.1",
|
|
19
19
|
"ethers": "^5.7.2",
|
|
20
|
-
"@dynamic-labs/logger": "0.16.
|
|
21
|
-
"@dynamic-labs/multi-wallet": "0.16.
|
|
22
|
-
"@dynamic-labs/wallet-connector-core": "0.16.
|
|
20
|
+
"@dynamic-labs/logger": "0.16.14",
|
|
21
|
+
"@dynamic-labs/multi-wallet": "0.16.14",
|
|
22
|
+
"@dynamic-labs/wallet-connector-core": "0.16.14"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"semver": "^7.3.8"
|
|
@@ -81,8 +81,13 @@ const TransactionConfirmationModal = ({ title, appOrigin, handler, onReject, onT
|
|
|
81
81
|
return val ? ethers.ethers.BigNumber.from(val) : undefined;
|
|
82
82
|
}));
|
|
83
83
|
const { data: effectiveGasPrice, isLoading: isEffectiveGasPriceLoading } = usePromise.usePromise(() => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
84
|
+
// To safely run estimateGas using alchemy, we need to remove the from address
|
|
85
|
+
// because alchemy checks the origin address funds and can return an error if
|
|
86
|
+
// origin wallet has no funds for the transaction
|
|
87
|
+
// https://docs.alchemy.com/reference/eth-estimategas
|
|
88
|
+
const { from } = transaction, transactionWithNoOrigin = _tslib.__rest(transaction, ["from"]);
|
|
84
89
|
const gasPrice = yield provider.getGasPrice();
|
|
85
|
-
const estimatedGas = yield provider.estimateGas(
|
|
90
|
+
const estimatedGas = yield provider.estimateGas(transactionWithNoOrigin);
|
|
86
91
|
return gasPrice && estimatedGas
|
|
87
92
|
? ethers.ethers.BigNumber.from(gasPrice).mul(estimatedGas)
|
|
88
93
|
: undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __awaiter } from '../../../../_virtual/_tslib.js';
|
|
1
|
+
import { __awaiter, __rest } from '../../../../_virtual/_tslib.js';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { useRef, useState, useCallback, useMemo } from 'react';
|
|
4
4
|
import { ethers } from 'ethers';
|
|
@@ -77,8 +77,13 @@ const TransactionConfirmationModal = ({ title, appOrigin, handler, onReject, onT
|
|
|
77
77
|
return val ? ethers.BigNumber.from(val) : undefined;
|
|
78
78
|
}));
|
|
79
79
|
const { data: effectiveGasPrice, isLoading: isEffectiveGasPriceLoading } = usePromise(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
80
|
+
// To safely run estimateGas using alchemy, we need to remove the from address
|
|
81
|
+
// because alchemy checks the origin address funds and can return an error if
|
|
82
|
+
// origin wallet has no funds for the transaction
|
|
83
|
+
// https://docs.alchemy.com/reference/eth-estimategas
|
|
84
|
+
const { from } = transaction, transactionWithNoOrigin = __rest(transaction, ["from"]);
|
|
80
85
|
const gasPrice = yield provider.getGasPrice();
|
|
81
|
-
const estimatedGas = yield provider.estimateGas(
|
|
86
|
+
const estimatedGas = yield provider.estimateGas(transactionWithNoOrigin);
|
|
82
87
|
return gasPrice && estimatedGas
|
|
83
88
|
? ethers.BigNumber.from(gasPrice).mul(estimatedGas)
|
|
84
89
|
: undefined;
|