Skip to content

Commit

Permalink
Merge pull request #107 from terraswap/fix/empty-screen
Browse files Browse the repository at this point in the history
fix: stop drawing a screen while getting gas from undefined fee
  • Loading branch information
JoowonYun authored May 31, 2022
2 parents 54322e0 + 11c9b8c commit 46fbf4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/forms/SwapForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -827,8 +827,8 @@ const SwapForm = ({ type, tabs }: { type: Type; tabs: TabViewProps }) => {
])
useEffect(() => {
setValue(Key.gasPrice, gasPrice || "")
setValue(Key.feeValue, gasPrice ? ceil(times(fee.gas, gasPrice)) : "")
}, [fee.gas, gasPrice, setValue])
setValue(Key.feeValue, gasPrice ? ceil(times(fee?.gas, gasPrice)) : "")
}, [fee?.gas, gasPrice, setValue])

useEffect(() => {
setValue(Key.feeValue, ceil(times(fee?.gas, gasPrice)) || "")
Expand Down

0 comments on commit 46fbf4e

Please sign in to comment.