@exodus/web3-ethereum 11.7.0 → 11.7.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.
@@ -1,8 +1,7 @@
1
- import { fetchGasLimit, getNonce as apiGetNonce, getServer, } from '@exodus/ethereum-api';
1
+ import { getNonce as apiGetNonce, getServer } from '@exodus/ethereum-api';
2
2
  import { InvalidInputError } from '@exodus/web3-errors';
3
3
  import { signMessage, signTypedData, hex0xStringToBuffer, bufferToHex0xString, } from '@exodus/web3-ethereum-utils';
4
4
  import { SignTypedDataVersion } from '@metamask/eth-sig-util';
5
- import BN from 'bn.js';
6
5
  async function getDefaultPurposeForLedger(asset) {
7
6
  const purposes = await asset.api.getSupportedPurposes({
8
7
  compatibilityMode: 'ledger',
@@ -44,19 +43,10 @@ const createEvmDepsFactory = ({ analytics, blockchainMetadata, }) => {
44
43
  return `0x${Math.max(walletNonce, blockchainNonce).toString(16)}`;
45
44
  };
46
45
  const getEstimatedGas = async (transaction) => {
47
- const EXTRA_PERCENTAGE_GAS_LIMIT = 20;
48
- const { data: txInput, from: fromAddress, to: toAddress, value: amount, } = transaction;
49
- const gasLimit = await fetchGasLimit({
50
- asset,
51
- amount: amount
52
- ? asset.currency.baseUnit(new BN(amount.slice(2), 'hex'))
53
- : asset.currency.ZERO,
54
- fromAddress,
55
- toAddress,
56
- txInput,
57
- extraPercentage: EXTRA_PERCENTAGE_GAS_LIMIT,
46
+ return forwardRequest({
47
+ method: 'eth_estimateGas',
48
+ params: [transaction],
58
49
  });
59
- return `0x${gasLimit.toString(16)}`;
60
50
  };
61
51
  const getFeeData = async () => {
62
52
  const { eip1559Enabled, tipGasPrice, gasPrice: _gasPrice, } = await getFeeConfig({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@exodus/web3-ethereum",
3
3
  "description": "Apps connectivity library for EVM-compatible chains.",
4
- "version": "11.7.0",
4
+ "version": "11.7.1",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "module": "lib/index.js",
@@ -52,5 +52,5 @@
52
52
  "peerDependencies": {
53
53
  "@exodus/assets": "^8.0.95"
54
54
  },
55
- "gitHead": "f412aca7620ab931e02b0e7c4697338a3f2b5fa2"
55
+ "gitHead": "580555d84d968311b78e9c35ea79e439b194b286"
56
56
  }