Skip to content

Commit 2387014

Browse files
feat: reset sell amount to 0 on Tx broadcast
1 parent e1b3dd5 commit 2387014

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/components/MultiHopTrade/components/TradeConfirm/hooks/useTradeExecution.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import {
3838
selectPortfolioAccountMetadataByAccountId,
3939
} from '@/state/slices/selectors'
4040
import { swapSlice } from '@/state/slices/swapSlice/swapSlice'
41+
import { tradeInput } from '@/state/slices/tradeInputSlice/tradeInputSlice'
4142
import {
4243
selectActiveQuote,
4344
selectActiveSwapperName,
@@ -169,6 +170,7 @@ export const useTradeExecution = (
169170
dispatch(
170171
tradeQuoteSlice.actions.setSwapSellTxHash({ hopIndex, sellTxHash, id: confirmedTradeId }),
171172
)
173+
dispatch(tradeInput.actions.setSellAmountCryptoPrecision('0'))
172174

173175
const swap = activeSwapId ? swapsById[activeSwapId] : undefined
174176
if (swap) {

0 commit comments

Comments
 (0)