Merge branch 'master' of github.com:BlueWallet/BlueWallet

This commit is contained in:
Overtorment 2019-12-22 12:37:58 +00:00
commit d75ce20d99
2 changed files with 9 additions and 1 deletions

View file

@ -47,6 +47,9 @@ export class AbstractWallet {
* @returns {string}
*/
getLabel() {
if (this.label.trim().length === 0) {
return 'Wallet';
}
return this.label;
}

View file

@ -157,7 +157,12 @@ export default class WalletDetails extends Component {
<TextInput
placeholder={loc.send.details.note_placeholder}
value={this.state.walletName}
onChangeText={text => this.setState({ walletName: text })}
onChangeText={text => {
if (text.trim().length === 0) {
text = this.state.wallet.getLabel();
}
this.setState({ walletName: text });
}}
numberOfLines={1}
style={{ flex: 1, marginHorizontal: 8, minHeight: 33 }}
editable={!this.state.isLoading}