Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/transaction-pay-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Add Across submit support for post-quote Predict withdraw flows ([#8761](https://github.com/MetaMask/core/pull/8761))
- Add Across quote support for post-quote Predict withdraw flows ([#8760](https://github.com/MetaMask/core/pull/8760))

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ import { getAcrossDestination } from './across-actions';
import { hasUnsupportedTransactionAuthorizationList } from './authorization-list';
import { normalizeAcrossRequest } from './perps';
import { isAcrossQuoteRequest } from './requests';
import { getAcrossOrderedTransactions } from './transactions';
import {
getAcrossOrderedTransactions,
getOriginalTransactionGas,
} from './transactions';
import type {
AcrossAction,
AcrossActionRequestBody,
Expand Down Expand Up @@ -796,25 +799,6 @@ function combinePostQuoteGas(
};
}

function getOriginalTransactionGas(
transaction: TransactionMeta,
): number | undefined {
const nestedGas = transaction.nestedTransactions?.find((tx) => tx.gas)?.gas;
const rawGas = nestedGas ?? transaction.txParams.gas;

if (rawGas === undefined) {
return undefined;
}

const gas = new BigNumber(rawGas);

if (!gas.isFinite() || gas.isNaN() || !gas.isInteger() || gas.lte(0)) {
return undefined;
}

return gas.toNumber();
}

function calculateOriginalSourceNetworkCost({
gas,
messenger,
Expand Down
Loading
Loading