Skip to content
Merged
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
fix: reset native gas toggle when switching chains or tokens
  • Loading branch information
priyajeet committed Oct 8, 2025
commit ca677212b96a19c4d392c7e1abcfbc4ca6a36d34
5 changes: 5 additions & 0 deletions src/views/v3/Bridge/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import SwapInputs from 'views/v3/Bridge/SwapInputs';
import BridgeTitle from 'views/v3/Bridge/BridgeTitle';
import AmountValidationError from './AmountValidationError';
import TxHistory from '../TxHistory';
import { setToNativeToken } from 'store/relay';

export type BridgeProps = {
showHistory?: boolean;
Expand Down Expand Up @@ -289,13 +290,15 @@ function Bridge(props: BridgeProps) {
(value: Chain) => {
selectFromChain(dispatch, value, sendingWallet);
dispatch(clearToken());
dispatch(setToNativeToken(0));
},
[dispatch, sendingWallet],
);

const handleSourceTokenChange = useCallback(
(value: Token) => {
dispatch(setToken(value.tuple));
dispatch(setToNativeToken(0));
},
[dispatch],
);
Expand All @@ -305,13 +308,15 @@ function Bridge(props: BridgeProps) {
(value: Chain) => {
selectToChain(dispatch, value, receivingWallet);
dispatch(clearDestToken());
dispatch(setToNativeToken(0));
},
[dispatch, receivingWallet],
);

const handleDestTokenChange = useCallback(
(value: Token) => {
dispatch(setDestToken(value.tuple));
dispatch(setToNativeToken(0));
},
[dispatch],
);
Expand Down
Loading