Closed aguycalled closed 2 years ago
Cudn't replicate, can send some steps? thanks!
Tried with both the mnemonic @aguycalled mentioned , cudnt be able to replicate on iOS and Android
The bug is in CardSelect
. defaultOption
is received in the component but not stored in the state.
const CardSelect = ({
text,
defaultOption,
options,
onSelect,
}: InputSelectProps) => {
const theme = useTheme();
const [selectedOption, setSelectedOption] = useState(defaultOption);
const styles = useStyleSheet(themedStyles);
const bottomSheet = useBottomSheet();
console.log('selectedOption', selectedOption, 'defaultOption', defaultOption)
....
outputs:
LOG selectedOption defaultOption TestToken account (100 TEST)
adding
useEffect(() => {
setSelectedOption(defaultOption)
}, [defaultOption]);
solves it
On the “send tokens” screen (after having said “send to someone” using TEST), the token I’m sending from isn’t selected by default