Skip to content

Commit

Permalink
Revert "mints: l1fee + value fix (#5162)"
Browse files Browse the repository at this point in the history
This reverts commit 8224e4c.
  • Loading branch information
jinchung committed Oct 27, 2023
1 parent 8224e4c commit f6760fe
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions src/screens/mints/MintSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -338,35 +338,18 @@ const MintSheet = () => {
return;
}
step.items?.forEach(async item => {
const value = multiply(
mintCollection.publicMintInfo?.price?.amount?.raw || '0',
quantity
);
// could add safety here if unable to calc gas limit
const tx = {
to: item.data?.to,
from: item.data?.from,
data: item.data?.data,
value,
value: multiply(price.amount || '0', quantity),
};

const gas = await estimateGas(tx, provider);

let l1GasFeeOptimism = null;
// add l1Fee for OP Chains
if (getNetworkObj(currentNetwork).gas.OptimismTxFee) {
l1GasFeeOptimism = await ethereumUtils.calculateL1FeeOptimism(
tx,
provider
);
}
if (gas) {
setGasError(false);
if (l1GasFeeOptimism) {
updateTxFee(gas, null, l1GasFeeOptimism);
} else {
updateTxFee(gas, null);
}
updateTxFee(gas, null);
}
});
});
Expand Down

0 comments on commit f6760fe

Please sign in to comment.