Skip to content

Commit b346e66

Browse files
authored
Merge pull request #11357 from brave/reset-input-value-when-network-is-changed
Reset input value when network is changed
2 parents c496e32 + 2a8c5f7 commit b346e66

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

components/brave_wallet_ui/components/buy-send-swap/tabs/send-tab.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ function SendTab (props: Props) {
6565
const onClickSelectNetwork = (network: EthereumChain) => () => {
6666
onSelectNetwork(network)
6767
setSendView('send')
68+
69+
// Reset amount to 0
70+
onSetSendAmount('0')
6871
}
6972

7073
const onClickSelectAccount = (account: UserAccountType) => () => {

components/brave_wallet_ui/stories/mock-data/mock-networks.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,16 @@ export const mockNetworks: EthereumChain[] = [
1313
decimals: 18,
1414
iconUrls: [ETHIconUrl],
1515
isEip1559: true
16+
},
17+
{
18+
chainId: '0x3',
19+
chainName: 'Ethereum Testnet Ropsten',
20+
rpcUrls: ['https://ropsten.infura.io/v3/', 'wss://ropsten.infura.io/ws/v3/'],
21+
blockExplorerUrls: ['https://ropsten.etherscan.io/'],
22+
symbol: 'ROP',
23+
symbolName: 'Ropsten Ether',
24+
decimals: 18,
25+
iconUrls: [ETHIconUrl],
26+
isEip1559: true
1627
}
1728
]

0 commit comments

Comments
 (0)