use of de.schildbach.wallet.ui.AddressAndLabel in project bitcoin-wallet by bitcoin-wallet.
the class SendCoinsFragment method validateReceivingAddress.
private void validateReceivingAddress() {
try {
final String addressStr = receivingAddressView.getText().toString().trim();
if (!addressStr.isEmpty()) {
final Address address = Address.fromString(Constants.NETWORK_PARAMETERS, addressStr);
final String label = addressBookDao.resolveLabel(address.toString());
viewModel.validatedAddress = new AddressAndLabel(Constants.NETWORK_PARAMETERS, address.toString(), label);
receivingAddressView.setText(null);
log.info("Locked to valid address: {}", viewModel.validatedAddress);
}
} catch (final AddressFormatException x) {
// swallow
}
}
Aggregations