@exodus/web3-ethereum 11.6.3 → 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.
@@ -2,20 +2,15 @@ import type { EthereumProvider } from '../provider/index.js';
2
2
  /**
3
3
  * Represents the assets needed to display a wallet
4
4
  */
5
- interface IEIP6963ProviderDetail {
6
- uuid: string;
5
+ export interface IEIP6963ProviderDetail {
6
+ uuid?: string;
7
7
  name: string;
8
8
  icon: string;
9
9
  rdns: string;
10
10
  }
11
- export declare const createAnnounceProviderInfo: ({ uuid, name, icon, rdns, provider, }: {
12
- uuid?: string | undefined;
13
- name: string;
14
- icon: string;
15
- rdns: string;
11
+ export declare const createAnnounceProviderInfo: ({ uuid, name, icon, rdns, provider, }: IEIP6963ProviderDetail & {
16
12
  provider: EthereumProvider;
17
13
  }) => Readonly<{
18
14
  info: IEIP6963ProviderDetail;
19
15
  provider: EthereumProvider;
20
16
  }>;
21
- export {};
@@ -1 +1,2 @@
1
1
  export { createAnnounceProviderInfo } from './announceProviderInfo.js';
2
+ export type { IEIP6963ProviderDetail } from './announceProviderInfo.js';
@@ -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.6.3",
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": "b1a23f6b6384f629da267c487a31452d84bbbdcc"
55
+ "gitHead": "580555d84d968311b78e9c35ea79e439b194b286"
56
56
  }