Esempio n. 1
0
  public void onMakeTransaction(Address toAddress, Value amount, @Nullable TxMessage txMessage) {
    Intent intent = new Intent(getActivity(), SignTransactionActivity.class);

    // Decide if emptying wallet or not
    if (canCompare(lastBalance, amount) && amount.compareTo(lastBalance) == 0) {
      intent.putExtra(Constants.ARG_EMPTY_WALLET, true);
    } else {
      intent.putExtra(Constants.ARG_SEND_VALUE, amount);
    }
    intent.putExtra(Constants.ARG_ACCOUNT_ID, pocket.getId());
    intent.putExtra(Constants.ARG_SEND_TO_ADDRESS, toAddress);
    if (txMessage != null) intent.putExtra(Constants.ARG_TX_MESSAGE, txMessage);

    startActivityForResult(intent, SIGN_TRANSACTION);
    state = State.INPUT;
  }