Removed memo input from powerup screen, added default value for destination input #1255

This commit is contained in:
Mustafa Buyukcelebi 2019-11-02 15:16:22 +03:00
parent 9bfc5d9d87
commit 908294a471

View File

@ -31,10 +31,10 @@ class TransferView extends Component {
super(props); super(props);
this.state = { this.state = {
from: props.currentAccountName, from: props.currentAccountName,
destination: '', destination: props.transferType === 'powerUp' ? props.currentAccountName : '',
amount: '', amount: '',
memo: '', memo: '',
isUsernameValid: false, isUsernameValid: props.transferType === 'powerUp' && props.currentAccountName ? true : false,
steemConnectTransfer: false, steemConnectTransfer: false,
isTransfering: false, isTransfering: false,
}; };
@ -217,22 +217,26 @@ class TransferView extends Component {
</TouchableOpacity> </TouchableOpacity>
)} )}
/> />
{transferType !== 'powerUp' && (
<TransferFormItem <TransferFormItem
label={intl.formatMessage({ id: 'transfer.memo' })} label={intl.formatMessage({ id: 'transfer.memo' })}
rightComponent={() => rightComponent={() =>
this._renderInput( this._renderInput({
intl.formatMessage({ id: 'transfer.memo_placeholder' }), placeholder: intl.formatMessage({ id: 'transfer.memo_placeholder' }),
'memo', state: 'memo',
'default', keyboardType: 'default',
true, isTextArea: true,
) })
} }
/> />
)}
{transferType !== 'powerUp' && (
<TransferFormItem <TransferFormItem
rightComponent={() => rightComponent={() =>
this._renderDescription(intl.formatMessage({ id: 'transfer.memo_desc' })) this._renderDescription(intl.formatMessage({ id: 'transfer.memo_desc' }))
} }
/> />
)}
</View> </View>
<View style={styles.bottomContent}> <View style={styles.bottomContent}>
<MainButton <MainButton