From 1eefdfc7cae41b790ab584b5394f2afccbd9851e Mon Sep 17 00:00:00 2001 From: Uncle Fatso Date: Mon, 11 May 2026 14:17:47 +0300 Subject: [PATCH] another one try to fix the metamask inner state Signed-off-by: Uncle Fatso --- package.json | 2 +- src/hooks/helpers.js | 17 +---------------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index 486687e..59d3ff1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ghost-dao-interface", "private": true, - "version": "0.7.45", + "version": "0.7.46", "type": "module", "scripts": { "dev": "vite", diff --git a/src/hooks/helpers.js b/src/hooks/helpers.js index aea87d4..c3a1651 100644 --- a/src/hooks/helpers.js +++ b/src/hooks/helpers.js @@ -9,7 +9,6 @@ import { FTSO_DAI_LP_ADDRESSES, WETH_ADDRESSES, } from "../constants/addresses"; -import { isNetworkLegacyType } from "../constants"; import { config } from "../config"; import { tokenNameConverter } from "../helpers/tokenConverter"; @@ -207,17 +206,6 @@ export const getTokenPurchaseLink = (chainId, tokenAddress, chainName) => { return purchaseUrl; } -const sanitizeTransactionRequest = (request, isLegacy) => { - const finalRequest = { ...request }; - if (isLegacy) { - delete finalRequest.maxFeePerGas; - delete finalRequest.maxPriorityFeePerGas; - } else { - delete finalRequest.gasPrice; - } - return finalRequest; -} - export const executeOnChainTransaction = async ({ chainId, abi, @@ -229,7 +217,6 @@ export const executeOnChainTransaction = async ({ value }) => { try { - const isLegacy = isNetworkLegacyType(chainId); const { request } = await simulateContract(config, { abi, address, @@ -238,11 +225,9 @@ export const executeOnChainTransaction = async ({ account, chainId, value, - type: isLegacy ? 'legacy' : 'eip1559', }); - const finalRequest = sanitizeTransactionRequest(request, isLegacy); - const txHash = await writeContract(config, { ...finalRequest }); + const txHash = await writeContract(config, request); await waitForTransactionReceipt(config, { hash: txHash, onReplaced: () => toast(messages.replacedMsg),