Skip to content

Commit

Permalink
Clean amount input when a new QR code is read
Browse files Browse the repository at this point in the history
  • Loading branch information
v-almonacid committed May 5, 2021
1 parent 3219ac9 commit 851bdd2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/Send/SendScreenNavigator.js
Expand Up @@ -72,9 +72,15 @@ const SendScreenNavigator = () => (
}
} else {
setAddress(address, route)
// note: after upgrading to react-navigation v5.x, the
// send screen is not unmounted after a tx is sent. If a
// new QR code without an amount field is scanned, the
// previous value may still remain in state
setAmount('', route)
}
} else {
setAddress(stringQR, route)
setAmount('', route)
}
navigation.navigate(SEND_ROUTES.MAIN)
},
Expand Down

0 comments on commit 851bdd2

Please sign in to comment.