fixed from user account change loophole causing same user names selection

This commit is contained in:
Sadaqat Ali 2022-02-15 12:40:41 +05:00
parent 3300c1ec2f
commit d5bdf24905

View File

@ -158,8 +158,16 @@ class DelegateScreen extends Component {
};
_handleOnDropdownChange = (value) => {
const { fetchBalance } = this.props;
const { fetchBalance, intl } = this.props;
const { destination } = this.state;
if (value === destination) {
Alert.alert(
intl.formatMessage({ id: 'transfer.username_alert' }),
intl.formatMessage({ id: 'transfer.username_alert_detail' }),
);
this.setState({ step: 1, destination: '' });
return;
}
fetchBalance(value);
this.setState({ from: value, amount: 0 });
};