mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-22 23:08:07 +01:00
Merge branch 'master' of github.com:BlueWallet/BlueWallet
This commit is contained in:
commit
d75ce20d99
2 changed files with 9 additions and 1 deletions
|
@ -47,6 +47,9 @@ export class AbstractWallet {
|
|||
* @returns {string}
|
||||
*/
|
||||
getLabel() {
|
||||
if (this.label.trim().length === 0) {
|
||||
return 'Wallet';
|
||||
}
|
||||
return this.label;
|
||||
}
|
||||
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Add table
Reference in a new issue