Skip to content

Commit 9dd9068

Browse files
authored
Merge pull request #5 from zkLinkProtocol/feat/bnb
update legacy gas fee for bsc
2 parents f6e6780 + 3974986 commit 9dd9068

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/contexts/bridge.context.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,8 @@ const BridgeProvider: FC<PropsWithChildren> = (props) => {
728728
: BigNumber.from(300000);
729729

730730
const { gasPrice, maxFeePerGas } = await from.provider.getFeeData();
731-
if (maxFeePerGas) {
731+
if (from.key !== "ethereum" && maxFeePerGas) {
732+
//special case for bsc
732733
return { data: { gasLimit, maxFeePerGas }, type: "eip-1559" };
733734
} else {
734735
const legacyGasPrice = gasPrice || (await from.provider.getGasPrice());
@@ -775,9 +776,9 @@ const BridgeProvider: FC<PropsWithChildren> = (props) => {
775776
: (await estimateBridgeGas({ destinationAddress, from, to, token, tokenSpendPermission }))
776777
.data),
777778
};
778-
if (overrides.maxFeePerGas) {
779-
overrides.maxFeePerGas = Number(overrides.maxFeePerGas?.toString()) * 2;
780-
}
779+
// if (overrides.maxFeePerGas) {
780+
// overrides.maxFeePerGas = Number(overrides.maxFeePerGas?.toString()) * 2;
781+
// }
781782
const executeBridge = async () => {
782783
const permitData =
783784
tokenSpendPermission.type === "permit"

0 commit comments

Comments
 (0)