private void onAccountClick(
     final AdapterView<?> adapterView, final View view, final int pos, final long id) {
   final NacPublicKey account = (NacPublicKey) adapterView.getItemAtPosition(pos);
   Timber.d("Account selected: %s", account);
   final Intent data = new Intent().putExtra(EXTRA_STR_SELECTED_ACCOUNT, account.toHexStr());
   setResult(Activity.RESULT_OK, data);
   finish();
 }
Пример #2
0
 /**
  * Creates an Address from a public key.
  *
  * @param version First byte of network version
  * @param publicKey The public key.
  * @return An address object.
  */
 public static AddressValue fromPublicKey(byte version, @NonNull final NacPublicKey publicKey) {
   return new AddressValue(generateEncoded(version, publicKey.getRaw()));
 }
Пример #3
0
 /**
  * Creates an Address from a public key.
  *
  * @param publicKey The public key.
  * @return An address object.
  */
 public static AddressValue fromPublicKey(@NonNull final NacPublicKey publicKey) {
   return new AddressValue(
       generateEncoded(AppConstants.NETWORK_VERSION.get(), publicKey.getRaw()));
 }