mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-02 11:15:35 +03:00
fixed already delegated amount not changing bug
This commit is contained in:
parent
af3ddfa5b5
commit
3442e12e24
@ -69,13 +69,6 @@ class DelegateScreen extends Component {
|
||||
this.amountTextInput = React.createRef();
|
||||
}
|
||||
|
||||
// Component Life Cycles
|
||||
componentDidUpdate = (prevProps, prevState) => {
|
||||
if (prevState.step !== this.state.step && this.state.step === 2) {
|
||||
this._fetchReceivedVestingShare();
|
||||
}
|
||||
};
|
||||
|
||||
// Component Functions
|
||||
_setState = (key, value) => {
|
||||
const { getAccountsWithUsername, balance } = this.props;
|
||||
@ -247,6 +240,7 @@ class DelegateScreen extends Component {
|
||||
return (
|
||||
<TouchableOpacity
|
||||
onPress={() => {
|
||||
this._fetchReceivedVestingShare();
|
||||
this.setState({ destination: username, usersResult: [], step: 2 });
|
||||
this.destinationTextInput.current?.blur();
|
||||
}}
|
||||
@ -279,7 +273,7 @@ class DelegateScreen extends Component {
|
||||
<TextInput
|
||||
style={[styles.input]}
|
||||
onChangeText={(value) => {
|
||||
this.setState({ destination: value });
|
||||
this.setState({ destination: value, step: 1 });
|
||||
this._handleOnAmountChange(state, value);
|
||||
}}
|
||||
value={this.state[state]}
|
||||
|
Loading…
Reference in New Issue
Block a user