mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-22 17:33:23 +01:00
Fix for wrong type being assigned to the transaction (#18818)
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
This commit is contained in:
parent
17e17e83cc
commit
e0919d529e
@ -1983,6 +1983,10 @@ export default class MetamaskController extends EventEmitter {
|
||||
this.networkController.upsertNetworkConfiguration.bind(
|
||||
this.networkController,
|
||||
),
|
||||
getCurrentNetworkEIP1559Compatibility:
|
||||
this.networkController.getEIP1559Compatibility.bind(
|
||||
this.networkController,
|
||||
),
|
||||
// PreferencesController
|
||||
setSelectedAddress: preferencesController.setSelectedAddress.bind(
|
||||
preferencesController,
|
||||
|
@ -55,6 +55,7 @@ import {
|
||||
showModal,
|
||||
addUnapprovedTransactionAndRouteToConfirmationPage,
|
||||
updateTransactionSendFlowHistory,
|
||||
getCurrentNetworkEIP1559Compatibility,
|
||||
} from '../../store/actions';
|
||||
import { setCustomGasLimit } from '../gas/gas.duck';
|
||||
import {
|
||||
@ -589,7 +590,10 @@ export const initializeSendState = createAsyncThunk(
|
||||
const state = thunkApi.getState();
|
||||
const isNonStandardEthChain = getIsNonStandardEthChain(state);
|
||||
const chainId = getCurrentChainId(state);
|
||||
const eip1559support = checkNetworkAndAccountSupports1559(state);
|
||||
let eip1559support = checkNetworkAndAccountSupports1559(state);
|
||||
if (eip1559support === undefined) {
|
||||
eip1559support = await getCurrentNetworkEIP1559Compatibility();
|
||||
}
|
||||
const account = getSelectedAccount(state);
|
||||
const { send: sendState, metamask } = state;
|
||||
const draftTransaction =
|
||||
|
@ -4650,3 +4650,17 @@ export function requestUserApproval({
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export async function getCurrentNetworkEIP1559Compatibility(): Promise<
|
||||
boolean | undefined
|
||||
> {
|
||||
let networkEIP1559Compatibility;
|
||||
try {
|
||||
networkEIP1559Compatibility = await submitRequestToBackground<boolean>(
|
||||
'getCurrentNetworkEIP1559Compatibility',
|
||||
);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
return networkEIP1559Compatibility;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user