mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-20 03:42:10 +03:00
* prefill delegation amount input field with already delegated amount
This commit is contained in:
parent
b5aa293325
commit
501f93b754
@ -164,15 +164,18 @@ class DelegateScreen extends Component {
|
|||||||
const vest_shares = parseAsset(curShare.vesting_shares);
|
const vest_shares = parseAsset(curShare.vesting_shares);
|
||||||
this.setState({
|
this.setState({
|
||||||
delegatedHP: vestsToHp(vest_shares.amount, hivePerMVests).toFixed(3),
|
delegatedHP: vestsToHp(vest_shares.amount, hivePerMVests).toFixed(3),
|
||||||
|
hp: vestsToHp(vest_shares.amount, hivePerMVests).toFixed(3),
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.setState({
|
this.setState({
|
||||||
delegatedHP: 0,
|
delegatedHP: 0,
|
||||||
|
hp: 0,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.setState({
|
this.setState({
|
||||||
delegatedHP: 0,
|
delegatedHP: 0,
|
||||||
|
hp: 0,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@ -585,9 +588,9 @@ class DelegateScreen extends Component {
|
|||||||
<KeyboardAvoidingView
|
<KeyboardAvoidingView
|
||||||
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
||||||
style={styles.fillSpace}
|
style={styles.fillSpace}
|
||||||
keyboardShouldPersistTaps
|
keyboardShouldPersistTaps="always"
|
||||||
>
|
>
|
||||||
<ScrollView keyboardShouldPersistTaps contentContainerStyle={styles.grow}>
|
<ScrollView keyboardShouldPersistTaps="always" contentContainerStyle={styles.grow}>
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
{step >= 1 && _renderStepOne()}
|
{step >= 1 && _renderStepOne()}
|
||||||
{step >= 2 && _renderStepTwo()}
|
{step >= 2 && _renderStepTwo()}
|
||||||
|
Loading…
Reference in New Issue
Block a user