@metamask-previews/transaction-controller 25.3.0-preview-07ab424 → 25.3.0-preview-a8ffe8e
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/dist/TransactionController.js +13 -14
- package/dist/TransactionController.mjs +12 -13
- package/dist/{chunk-K4KOSAGM.mjs → chunk-6XMG522E.mjs} +3 -8
- package/dist/chunk-6XMG522E.mjs.map +1 -0
- package/dist/{chunk-NLE3SS2S.js → chunk-7QOACSQU.js} +19 -23
- package/dist/chunk-7QOACSQU.js.map +1 -0
- package/dist/{chunk-SOSF65FI.js → chunk-7YLATOE4.js} +3 -3
- package/dist/{chunk-A4P4B3OF.mjs → chunk-BYBPZUHS.mjs} +6 -14
- package/dist/chunk-BYBPZUHS.mjs.map +1 -0
- package/dist/{chunk-K7UC23EG.mjs → chunk-CSQPJCBP.mjs} +3 -3
- package/dist/{chunk-UCY5PFZI.js → chunk-CWJBSWH3.js} +6 -6
- package/dist/{chunk-V5X6MZHN.js → chunk-GC77BSQZ.js} +8 -16
- package/dist/chunk-GC77BSQZ.js.map +1 -0
- package/dist/{chunk-KT6UAKBB.js → chunk-GE57YNGX.js} +3 -8
- package/dist/chunk-GE57YNGX.js.map +1 -0
- package/dist/{chunk-L4S5SEV3.js → chunk-GQYELPS3.js} +4 -4
- package/dist/{chunk-AMDQXP37.mjs → chunk-HXPG3DIX.mjs} +2 -2
- package/dist/{chunk-UADPSS35.mjs → chunk-LADOJTK4.mjs} +2 -10
- package/dist/{chunk-UADPSS35.mjs.map → chunk-LADOJTK4.mjs.map} +1 -1
- package/dist/{chunk-5L7EMVB3.mjs → chunk-M6Q3DVMJ.mjs} +15 -19
- package/dist/chunk-M6Q3DVMJ.mjs.map +1 -0
- package/dist/{chunk-HBNQEJEM.js → chunk-MXQLW52B.js} +2 -10
- package/dist/chunk-MXQLW52B.js.map +1 -0
- package/dist/{chunk-OLIA2HD4.mjs → chunk-PVO55HHW.mjs} +3 -3
- package/dist/{chunk-2JERLB6M.js → chunk-SSYRMQ63.js} +3 -3
- package/dist/{chunk-2AYEGKAN.js → chunk-US7NQPYE.js} +7 -7
- package/dist/{chunk-VAOKN3J4.mjs → chunk-UVKK5JBJ.mjs} +2 -2
- package/dist/{chunk-ZWKHTNLF.mjs → chunk-Z4FIWEAJ.mjs} +2 -2
- package/dist/gas-flows/DefaultGasFeeFlow.js +5 -5
- package/dist/gas-flows/DefaultGasFeeFlow.mjs +4 -4
- package/dist/gas-flows/LineaGasFeeFlow.js +6 -6
- package/dist/gas-flows/LineaGasFeeFlow.mjs +5 -5
- package/dist/helpers/EtherscanRemoteTransactionSource.js +1 -1
- package/dist/helpers/EtherscanRemoteTransactionSource.mjs +1 -1
- package/dist/helpers/GasFeePoller.js +4 -4
- package/dist/helpers/GasFeePoller.mjs +3 -3
- package/dist/helpers/MultichainTrackingHelper.js +1 -1
- package/dist/helpers/MultichainTrackingHelper.mjs +1 -1
- package/dist/helpers/PendingTransactionTracker.js +1 -1
- package/dist/helpers/PendingTransactionTracker.mjs +1 -1
- package/dist/index.js +15 -18
- package/dist/index.mjs +14 -17
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/TransactionController.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types.d.ts +3 -7
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils/simulation-api.d.ts.map +1 -1
- package/dist/types/utils/simulation.d.ts.map +1 -1
- package/dist/types.js +2 -4
- package/dist/types.mjs +1 -3
- package/dist/utils/external-transactions.js +1 -1
- package/dist/utils/external-transactions.mjs +1 -1
- package/dist/utils/gas-fees.js +4 -4
- package/dist/utils/gas-fees.mjs +3 -3
- package/dist/utils/gas-flow.js +3 -3
- package/dist/utils/gas-flow.mjs +2 -2
- package/dist/utils/simulation-api.js +2 -4
- package/dist/utils/simulation-api.mjs +1 -3
- package/dist/utils/simulation.js +4 -5
- package/dist/utils/simulation.mjs +3 -4
- package/dist/utils/swaps.js +1 -1
- package/dist/utils/swaps.mjs +1 -1
- package/dist/utils/transaction-type.js +1 -1
- package/dist/utils/transaction-type.mjs +1 -1
- package/dist/utils/utils.js +1 -1
- package/dist/utils/utils.mjs +1 -1
- package/dist/utils/validation.js +1 -1
- package/dist/utils/validation.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-5L7EMVB3.mjs.map +0 -1
- package/dist/chunk-A4P4B3OF.mjs.map +0 -1
- package/dist/chunk-HBNQEJEM.js.map +0 -1
- package/dist/chunk-HMOSP33F.js +0 -36
- package/dist/chunk-HMOSP33F.js.map +0 -1
- package/dist/chunk-HQSNKCXI.mjs +0 -36
- package/dist/chunk-HQSNKCXI.mjs.map +0 -1
- package/dist/chunk-K4KOSAGM.mjs.map +0 -1
- package/dist/chunk-KT6UAKBB.js.map +0 -1
- package/dist/chunk-NLE3SS2S.js.map +0 -1
- package/dist/chunk-V5X6MZHN.js.map +0 -1
- package/dist/errors.js +0 -15
- package/dist/errors.js.map +0 -1
- package/dist/errors.mjs +0 -15
- package/dist/errors.mjs.map +0 -1
- package/dist/types/errors.d.ts +0 -15
- package/dist/types/errors.d.ts.map +0 -1
- /package/dist/{chunk-SOSF65FI.js.map → chunk-7YLATOE4.js.map} +0 -0
- /package/dist/{chunk-K7UC23EG.mjs.map → chunk-CSQPJCBP.mjs.map} +0 -0
- /package/dist/{chunk-UCY5PFZI.js.map → chunk-CWJBSWH3.js.map} +0 -0
- /package/dist/{chunk-L4S5SEV3.js.map → chunk-GQYELPS3.js.map} +0 -0
- /package/dist/{chunk-AMDQXP37.mjs.map → chunk-HXPG3DIX.mjs.map} +0 -0
- /package/dist/{chunk-OLIA2HD4.mjs.map → chunk-PVO55HHW.mjs.map} +0 -0
- /package/dist/{chunk-2JERLB6M.js.map → chunk-SSYRMQ63.js.map} +0 -0
- /package/dist/{chunk-2AYEGKAN.js.map → chunk-US7NQPYE.js.map} +0 -0
- /package/dist/{chunk-VAOKN3J4.mjs.map → chunk-UVKK5JBJ.mjs.map} +0 -0
- /package/dist/{chunk-ZWKHTNLF.mjs.map → chunk-Z4FIWEAJ.mjs.map} +0 -0
|
@@ -4,32 +4,31 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('./chunk-SD6CWFDF.js');
|
|
7
|
+
var _chunk7QOACSQUjs = require('./chunk-7QOACSQU.js');
|
|
9
8
|
require('./chunk-VH47Q6TS.js');
|
|
10
9
|
require('./chunk-RQKICZYP.js');
|
|
11
10
|
require('./chunk-QP75SWIQ.js');
|
|
12
11
|
require('./chunk-ZNZEJDOE.js');
|
|
13
|
-
require('./chunk-
|
|
14
|
-
require('./chunk-
|
|
15
|
-
require('./chunk-
|
|
12
|
+
require('./chunk-GC77BSQZ.js');
|
|
13
|
+
require('./chunk-GE57YNGX.js');
|
|
14
|
+
require('./chunk-SD6CWFDF.js');
|
|
15
|
+
require('./chunk-7YLATOE4.js');
|
|
16
16
|
require('./chunk-R7NJVDWN.js');
|
|
17
17
|
require('./chunk-DTDTOMTB.js');
|
|
18
18
|
require('./chunk-NRWEI43Q.js');
|
|
19
|
-
require('./chunk-F3CMU2DM.js');
|
|
20
19
|
require('./chunk-5XBULBP2.js');
|
|
21
|
-
require('./chunk-CXXGL43K.js');
|
|
22
20
|
require('./chunk-7LXE4KHV.js');
|
|
23
|
-
require('./chunk-
|
|
24
|
-
require('./chunk-
|
|
25
|
-
require('./chunk-
|
|
26
|
-
require('./chunk-2JERLB6M.js');
|
|
21
|
+
require('./chunk-CWJBSWH3.js');
|
|
22
|
+
require('./chunk-US7NQPYE.js');
|
|
23
|
+
require('./chunk-SSYRMQ63.js');
|
|
27
24
|
require('./chunk-5OQ373JS.js');
|
|
28
25
|
require('./chunk-UGFBA4GV.js');
|
|
29
|
-
require('./chunk-
|
|
26
|
+
require('./chunk-GQYELPS3.js');
|
|
27
|
+
require('./chunk-F3CMU2DM.js');
|
|
28
|
+
require('./chunk-CXXGL43K.js');
|
|
30
29
|
require('./chunk-ITDY6AIZ.js');
|
|
31
30
|
require('./chunk-S6VGOPUY.js');
|
|
32
|
-
require('./chunk-
|
|
31
|
+
require('./chunk-MXQLW52B.js');
|
|
33
32
|
require('./chunk-Z4BLTVTB.js');
|
|
34
33
|
|
|
35
34
|
|
|
@@ -37,5 +36,5 @@ require('./chunk-Z4BLTVTB.js');
|
|
|
37
36
|
|
|
38
37
|
|
|
39
38
|
|
|
40
|
-
exports.ApprovalState =
|
|
39
|
+
exports.ApprovalState = _chunk7QOACSQUjs.ApprovalState; exports.CANCEL_RATE = _chunk7QOACSQUjs.CANCEL_RATE; exports.HARDFORK = _chunk7QOACSQUjs.HARDFORK; exports.SPEED_UP_RATE = _chunk7QOACSQUjs.SPEED_UP_RATE; exports.TransactionController = _chunk7QOACSQUjs.TransactionController;
|
|
41
40
|
//# sourceMappingURL=TransactionController.js.map
|
|
@@ -4,32 +4,31 @@ import {
|
|
|
4
4
|
HARDFORK,
|
|
5
5
|
SPEED_UP_RATE,
|
|
6
6
|
TransactionController
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-KG4UW4K4.mjs";
|
|
7
|
+
} from "./chunk-M6Q3DVMJ.mjs";
|
|
9
8
|
import "./chunk-NM6OYEPP.mjs";
|
|
10
9
|
import "./chunk-XKNFL657.mjs";
|
|
11
10
|
import "./chunk-XGRAHX6T.mjs";
|
|
12
11
|
import "./chunk-NHRBO3LU.mjs";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-BYBPZUHS.mjs";
|
|
13
|
+
import "./chunk-6XMG522E.mjs";
|
|
14
|
+
import "./chunk-KG4UW4K4.mjs";
|
|
15
|
+
import "./chunk-UVKK5JBJ.mjs";
|
|
16
16
|
import "./chunk-KFL2GGZC.mjs";
|
|
17
17
|
import "./chunk-Y7ENNK7L.mjs";
|
|
18
18
|
import "./chunk-ZQFMTLZJ.mjs";
|
|
19
|
-
import "./chunk-IZI7FQIN.mjs";
|
|
20
19
|
import "./chunk-JRQHIBG5.mjs";
|
|
21
|
-
import "./chunk-VEREDMI2.mjs";
|
|
22
20
|
import "./chunk-FRKQ3Z2L.mjs";
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-ZWKHTNLF.mjs";
|
|
21
|
+
import "./chunk-CSQPJCBP.mjs";
|
|
22
|
+
import "./chunk-PVO55HHW.mjs";
|
|
23
|
+
import "./chunk-Z4FIWEAJ.mjs";
|
|
27
24
|
import "./chunk-3D3SA6PY.mjs";
|
|
28
25
|
import "./chunk-J56A7UCK.mjs";
|
|
29
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-HXPG3DIX.mjs";
|
|
27
|
+
import "./chunk-IZI7FQIN.mjs";
|
|
28
|
+
import "./chunk-VEREDMI2.mjs";
|
|
30
29
|
import "./chunk-Z3HHSD5I.mjs";
|
|
31
30
|
import "./chunk-UQQWZT6C.mjs";
|
|
32
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-LADOJTK4.mjs";
|
|
33
32
|
import "./chunk-XUI43LEZ.mjs";
|
|
34
33
|
export {
|
|
35
34
|
ApprovalState,
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SimulationChainNotSupportedError,
|
|
3
|
-
SimulationError
|
|
4
|
-
} from "./chunk-HQSNKCXI.mjs";
|
|
5
1
|
import {
|
|
6
2
|
projectLogger
|
|
7
3
|
} from "./chunk-UQQWZT6C.mjs";
|
|
@@ -31,8 +27,7 @@ async function simulateTransactions(chainId, request) {
|
|
|
31
27
|
const responseJson = await response.json();
|
|
32
28
|
log("Received response", responseJson);
|
|
33
29
|
if (responseJson.error) {
|
|
34
|
-
|
|
35
|
-
throw new SimulationError(message, code);
|
|
30
|
+
throw responseJson.error;
|
|
36
31
|
}
|
|
37
32
|
return responseJson?.result;
|
|
38
33
|
}
|
|
@@ -42,7 +37,7 @@ async function getSimulationUrl(chainId) {
|
|
|
42
37
|
const network = networkData[chainIdDecimal];
|
|
43
38
|
if (!network?.confirmations) {
|
|
44
39
|
log("Chain is not supported", chainId);
|
|
45
|
-
throw new
|
|
40
|
+
throw new Error(`Chain is not supported: ${chainId}`);
|
|
46
41
|
}
|
|
47
42
|
return getUrl(network.network);
|
|
48
43
|
}
|
|
@@ -58,4 +53,4 @@ function getUrl(subdomain) {
|
|
|
58
53
|
export {
|
|
59
54
|
simulateTransactions
|
|
60
55
|
};
|
|
61
|
-
//# sourceMappingURL=chunk-
|
|
56
|
+
//# sourceMappingURL=chunk-6XMG522E.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/simulation-api.ts"],"sourcesContent":["import { convertHexToDecimal } from '@metamask/controller-utils';\nimport { createModuleLogger, type Hex } from '@metamask/utils';\n\nimport { projectLogger } from '../logger';\n\nconst log = createModuleLogger(projectLogger, 'simulation-api');\n\nconst RPC_METHOD = 'infura_simulateTransactions';\nconst BASE_URL = 'https://tx-sentinel-{0}.api.cx.metamask.io/';\nconst ENDPOINT_NETWORKS = 'networks';\n\n/** Single transaction to simulate in a simulation API request. */\nexport type SimulationRequestTransaction = {\n /** Data to send with the transaction. */\n data?: Hex;\n\n /** Sender of the transaction. */\n from: Hex;\n\n /** Gas limit for the transaction. */\n gas?: Hex;\n\n /** Maximum fee per gas for the transaction. */\n maxFeePerGas?: Hex;\n\n /** Maximum priority fee per gas for the transaction. */\n maxPriorityFeePerGas?: Hex;\n\n /** Recipient of the transaction. */\n to?: Hex;\n\n /** Value to send with the transaction. */\n value?: Hex;\n};\n\n/** Request to the simulation API to simulate transactions. */\nexport type SimulationRequest = {\n /**\n * Transactions to be sequentially simulated.\n * State changes impact subsequent transactions in the list.\n */\n transactions: SimulationRequestTransaction[];\n\n /**\n * Overrides to the state of the blockchain, keyed by smart contract address.\n */\n overrides?: {\n [address: Hex]: {\n /** Overrides to the storage slots for a smart contract account. */\n stateDiff: {\n [slot: Hex]: Hex;\n };\n };\n };\n\n /**\n * Whether to include call traces in the response.\n * Defaults to false.\n */\n withCallTrace?: boolean;\n\n /**\n * Whether to include event logs in the response.\n * Defaults to false.\n */\n withLogs?: boolean;\n};\n\n/** Raw event log emitted by a simulated transaction. */\nexport type SimulationResponseLog = {\n /** Address of the account that created the event. */\n address: Hex;\n\n /** Raw data in the event that is not indexed. */\n data: Hex;\n\n /** Raw indexed data from the event. */\n topics: Hex[];\n};\n\n/** Call trace of a single simulated transaction. */\nexport type SimulationResponseCallTrace = {\n /** Nested calls. */\n calls: SimulationResponseCallTrace[];\n\n /** Raw event logs created by the call. */\n logs: SimulationResponseLog[];\n};\n\n/**\n * Changes to the blockchain state.\n * Keyed by account address.\n */\nexport type SimulationResponseStateDiff = {\n [address: Hex]: {\n /** Native balance of the account. */\n balance?: Hex;\n\n /** Nonce of the account. */\n nonce?: Hex;\n\n /** Storage values per slot. */\n storage?: {\n [slot: Hex]: Hex;\n };\n };\n};\n\n/** Response from the simulation API for a single transaction. */\nexport type SimulationResponseTransaction = {\n /** An error message indicating the transaction could not be simulated. */\n error?: string;\n\n /** Return value of the transaction, such as the balance if calling balanceOf. */\n return: Hex;\n\n /** Hierarchy of call data including nested calls and logs. */\n callTrace?: SimulationResponseCallTrace;\n\n /** Changes to the blockchain state. */\n stateDiff?: {\n /** Initial blockchain state before the transaction. */\n pre?: SimulationResponseStateDiff;\n\n /** Updated blockchain state after the transaction. */\n post?: SimulationResponseStateDiff;\n };\n};\n\n/** Response from the simulation API. */\nexport type SimulationResponse = {\n /** Simulation data for each transaction in the request. */\n transactions: SimulationResponseTransaction[];\n};\n\n/** Data for a network supported by the Simulation API. */\ntype SimulationNetwork = {\n /** Subdomain of the API for the network. */\n network: string;\n\n /** Whether the network supports confirmation simulations. */\n confirmations: boolean;\n};\n\n/** Response from the simulation API containing supported networks. */\ntype SimulationNetworkResponse = {\n [chainIdDecimal: string]: SimulationNetwork;\n};\n\nlet requestIdCounter = 0;\n\n/**\n * Simulate transactions using the transaction simulation API.\n * @param chainId - The chain ID to simulate transactions on.\n * @param request - The request to simulate transactions.\n */\nexport async function simulateTransactions(\n chainId: Hex,\n request: SimulationRequest,\n): Promise<SimulationResponse> {\n const url = await getSimulationUrl(chainId);\n\n log('Sending request', url, request);\n\n const requestId = requestIdCounter;\n requestIdCounter += 1;\n\n const response = await fetch(url, {\n method: 'POST',\n body: JSON.stringify({\n id: String(requestId),\n jsonrpc: '2.0',\n method: RPC_METHOD,\n params: [request],\n }),\n });\n\n const responseJson = await response.json();\n\n log('Received response', responseJson);\n\n if (responseJson.error) {\n throw responseJson.error;\n }\n\n return responseJson?.result;\n}\n\n/**\n * Get the URL for the transaction simulation API.\n * @param chainId - The chain ID to get the URL for.\n * @returns The URL for the transaction simulation API.\n */\nasync function getSimulationUrl(chainId: Hex): Promise<string> {\n const networkData = await getNetworkData();\n const chainIdDecimal = convertHexToDecimal(chainId);\n const network = networkData[chainIdDecimal];\n\n if (!network?.confirmations) {\n log('Chain is not supported', chainId);\n throw new Error(`Chain is not supported: ${chainId}`);\n }\n\n return getUrl(network.network);\n}\n\n/**\n * Retrieve the supported network data from the simulation API.\n */\nasync function getNetworkData(): Promise<SimulationNetworkResponse> {\n const url = `${getUrl('ethereum-mainnet')}${ENDPOINT_NETWORKS}`;\n const response = await fetch(url);\n return response.json();\n}\n\n/**\n * Generate the URL for the specified subdomain in the simulation API.\n * @param subdomain - The subdomain to generate the URL for.\n * @returns The URL for the transaction simulation API.\n */\nfunction getUrl(subdomain: string): string {\n return BASE_URL.replace('{0}', subdomain);\n}\n"],"mappings":";;;;;AAAA,SAAS,2BAA2B;AACpC,SAAS,0BAAoC;AAI7C,IAAM,MAAM,mBAAmB,eAAe,gBAAgB;AAE9D,IAAM,aAAa;AACnB,IAAM,WAAW;AACjB,IAAM,oBAAoB;AA4I1B,IAAI,mBAAmB;AAOvB,eAAsB,qBACpB,SACA,SAC6B;AAC7B,QAAM,MAAM,MAAM,iBAAiB,OAAO;AAE1C,MAAI,mBAAmB,KAAK,OAAO;AAEnC,QAAM,YAAY;AAClB,sBAAoB;AAEpB,QAAM,WAAW,MAAM,MAAM,KAAK;AAAA,IAChC,QAAQ;AAAA,IACR,MAAM,KAAK,UAAU;AAAA,MACnB,IAAI,OAAO,SAAS;AAAA,MACpB,SAAS;AAAA,MACT,QAAQ;AAAA,MACR,QAAQ,CAAC,OAAO;AAAA,IAClB,CAAC;AAAA,EACH,CAAC;AAED,QAAM,eAAe,MAAM,SAAS,KAAK;AAEzC,MAAI,qBAAqB,YAAY;AAErC,MAAI,aAAa,OAAO;AACtB,UAAM,aAAa;AAAA,EACrB;AAEA,SAAO,cAAc;AACvB;AAOA,eAAe,iBAAiB,SAA+B;AAC7D,QAAM,cAAc,MAAM,eAAe;AACzC,QAAM,iBAAiB,oBAAoB,OAAO;AAClD,QAAM,UAAU,YAAY,cAAc;AAE1C,MAAI,CAAC,SAAS,eAAe;AAC3B,QAAI,0BAA0B,OAAO;AACrC,UAAM,IAAI,MAAM,2BAA2B,OAAO,EAAE;AAAA,EACtD;AAEA,SAAO,OAAO,QAAQ,OAAO;AAC/B;AAKA,eAAe,iBAAqD;AAClE,QAAM,MAAM,GAAG,OAAO,kBAAkB,CAAC,GAAG,iBAAiB;AAC7D,QAAM,WAAW,MAAM,MAAM,GAAG;AAChC,SAAO,SAAS,KAAK;AACvB;AAOA,SAAS,OAAO,WAA2B;AACzC,SAAO,SAAS,QAAQ,OAAO,SAAS;AAC1C;","names":[]}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
|
-
var _chunkSD6CWFDFjs = require('./chunk-SD6CWFDF.js');
|
|
4
|
-
|
|
5
|
-
|
|
6
3
|
|
|
7
4
|
var _chunkVH47Q6TSjs = require('./chunk-VH47Q6TS.js');
|
|
8
5
|
|
|
@@ -20,10 +17,13 @@ var _chunkQP75SWIQjs = require('./chunk-QP75SWIQ.js');
|
|
|
20
17
|
var _chunkZNZEJDOEjs = require('./chunk-ZNZEJDOE.js');
|
|
21
18
|
|
|
22
19
|
|
|
23
|
-
var
|
|
20
|
+
var _chunkGC77BSQZjs = require('./chunk-GC77BSQZ.js');
|
|
24
21
|
|
|
25
22
|
|
|
26
|
-
var
|
|
23
|
+
var _chunkSD6CWFDFjs = require('./chunk-SD6CWFDF.js');
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
var _chunk7YLATOE4js = require('./chunk-7YLATOE4.js');
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
var _chunkR7NJVDWNjs = require('./chunk-R7NJVDWN.js');
|
|
@@ -35,22 +35,19 @@ var _chunkDTDTOMTBjs = require('./chunk-DTDTOMTB.js');
|
|
|
35
35
|
var _chunkNRWEI43Qjs = require('./chunk-NRWEI43Q.js');
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
var _chunkF3CMU2DMjs = require('./chunk-F3CMU2DM.js');
|
|
39
|
-
|
|
40
|
-
|
|
41
38
|
var _chunk5XBULBP2js = require('./chunk-5XBULBP2.js');
|
|
42
39
|
|
|
43
40
|
|
|
44
41
|
var _chunk7LXE4KHVjs = require('./chunk-7LXE4KHV.js');
|
|
45
42
|
|
|
46
43
|
|
|
47
|
-
var
|
|
44
|
+
var _chunkCWJBSWH3js = require('./chunk-CWJBSWH3.js');
|
|
48
45
|
|
|
49
46
|
|
|
50
|
-
var
|
|
47
|
+
var _chunkUS7NQPYEjs = require('./chunk-US7NQPYE.js');
|
|
51
48
|
|
|
52
49
|
|
|
53
|
-
var
|
|
50
|
+
var _chunkSSYRMQ63js = require('./chunk-SSYRMQ63.js');
|
|
54
51
|
|
|
55
52
|
|
|
56
53
|
|
|
@@ -69,6 +66,9 @@ var _chunk5OQ373JSjs = require('./chunk-5OQ373JS.js');
|
|
|
69
66
|
var _chunkUGFBA4GVjs = require('./chunk-UGFBA4GV.js');
|
|
70
67
|
|
|
71
68
|
|
|
69
|
+
var _chunkF3CMU2DMjs = require('./chunk-F3CMU2DM.js');
|
|
70
|
+
|
|
71
|
+
|
|
72
72
|
var _chunkS6VGOPUYjs = require('./chunk-S6VGOPUY.js');
|
|
73
73
|
|
|
74
74
|
|
|
@@ -300,7 +300,7 @@ var TransactionController = class extends _basecontroller.BaseController {
|
|
|
300
300
|
});
|
|
301
301
|
this.gasFeeFlows = _chunkZ4BLTVTBjs.__privateMethod.call(void 0, this, _getGasFeeFlows, getGasFeeFlows_fn).call(this);
|
|
302
302
|
this.layer1GasFeeFlows = _chunkZ4BLTVTBjs.__privateMethod.call(void 0, this, _getLayer1GasFeeFlows, getLayer1GasFeeFlows_fn).call(this);
|
|
303
|
-
const gasFeePoller = new (0,
|
|
303
|
+
const gasFeePoller = new (0, _chunk7YLATOE4js.GasFeePoller)({
|
|
304
304
|
// Default gas fee polling is not yet supported by the clients
|
|
305
305
|
gasFeeFlows: this.gasFeeFlows.slice(0, -1),
|
|
306
306
|
getEthQuery: (chainId, networkClientId) => _chunkZ4BLTVTBjs.__privateGet.call(void 0, this, _multichainTrackingHelper).getEthQuery({
|
|
@@ -504,11 +504,7 @@ var TransactionController = class extends _basecontroller.BaseController {
|
|
|
504
504
|
}
|
|
505
505
|
);
|
|
506
506
|
this.addMetadata(addedTransactionMeta);
|
|
507
|
-
|
|
508
|
-
_chunkZ4BLTVTBjs.__privateMethod.call(void 0, this, _updateSimulationData, updateSimulationData_fn).call(this, addedTransactionMeta);
|
|
509
|
-
} else {
|
|
510
|
-
_chunkS6VGOPUYjs.projectLogger.call(void 0, "Skipping simulation as approval not required");
|
|
511
|
-
}
|
|
507
|
+
_chunkZ4BLTVTBjs.__privateMethod.call(void 0, this, _updateSimulationData, updateSimulationData_fn).call(this, addedTransactionMeta);
|
|
512
508
|
this.messagingSystem.publish(
|
|
513
509
|
`${controllerName}:unapprovedTransactionAdded`,
|
|
514
510
|
addedTransactionMeta
|
|
@@ -1437,7 +1433,7 @@ var TransactionController = class extends _basecontroller.BaseController {
|
|
|
1437
1433
|
isCustomNetwork,
|
|
1438
1434
|
txMeta: transactionMeta
|
|
1439
1435
|
});
|
|
1440
|
-
await
|
|
1436
|
+
await _chunkSSYRMQ63js.updateGasFees.call(void 0, {
|
|
1441
1437
|
eip1559: isEIP1559Compatible,
|
|
1442
1438
|
ethQuery,
|
|
1443
1439
|
gasFeeFlows: this.gasFeeFlows,
|
|
@@ -2288,7 +2284,7 @@ getNonceTrackerPendingTransactions_fn = function(chainId, address) {
|
|
|
2288
2284
|
};
|
|
2289
2285
|
_getGasFeeFlows = new WeakSet();
|
|
2290
2286
|
getGasFeeFlows_fn = function() {
|
|
2291
|
-
return [new (0,
|
|
2287
|
+
return [new (0, _chunkCWJBSWH3js.LineaGasFeeFlow)(), new (0, _chunkUS7NQPYEjs.DefaultGasFeeFlow)()];
|
|
2292
2288
|
};
|
|
2293
2289
|
_getLayer1GasFeeFlows = new WeakSet();
|
|
2294
2290
|
getLayer1GasFeeFlows_fn = function() {
|
|
@@ -2351,14 +2347,14 @@ updateSimulationData_fn = async function(transactionMeta) {
|
|
|
2351
2347
|
const { from, to, value, data } = txParams;
|
|
2352
2348
|
let simulationData = {
|
|
2353
2349
|
error: {
|
|
2354
|
-
|
|
2355
|
-
|
|
2350
|
+
message: "Simulation disabled",
|
|
2351
|
+
isReverted: false
|
|
2356
2352
|
},
|
|
2357
2353
|
tokenBalanceChanges: []
|
|
2358
2354
|
};
|
|
2359
2355
|
if (_chunkZ4BLTVTBjs.__privateGet.call(void 0, this, _isSimulationEnabled).call(this)) {
|
|
2360
2356
|
_chunkZ4BLTVTBjs.__privateMethod.call(void 0, this, _updateTransactionInternal, updateTransactionInternal_fn).call(this, { ...transactionMeta, simulationData: void 0 }, { skipHistory: true });
|
|
2361
|
-
simulationData = await
|
|
2357
|
+
simulationData = await _chunkGC77BSQZjs.getSimulationData.call(void 0, {
|
|
2362
2358
|
chainId,
|
|
2363
2359
|
from,
|
|
2364
2360
|
to,
|
|
@@ -2389,4 +2385,4 @@ updateSimulationData_fn = async function(transactionMeta) {
|
|
|
2389
2385
|
|
|
2390
2386
|
|
|
2391
2387
|
exports.HARDFORK = HARDFORK; exports.CANCEL_RATE = CANCEL_RATE; exports.SPEED_UP_RATE = SPEED_UP_RATE; exports.ApprovalState = ApprovalState; exports.TransactionController = TransactionController;
|
|
2392
|
-
//# sourceMappingURL=chunk-
|
|
2388
|
+
//# sourceMappingURL=chunk-7QOACSQU.js.map
|