@Override
public void onClick(View v) {
String accountId = null;
for (WalletAccount account : accounts) {
if (account.getTransaction(txId) != null) {
accountId = account.getId();
break;
}
}
if (accountId != null && txId != null) {
Intent intent = new Intent(getActivity(), TransactionDetailsActivity.class);
intent.putExtra(Constants.ARG_ACCOUNT_ID, accountId);
intent.putExtra(Constants.ARG_TRANSACTION_ID, txId);
startActivity(intent);
} else {
if (Constants.COINS_BLOCK_EXPLORERS.containsKey(withdrawType)) {
String url = String.format(Constants.COINS_BLOCK_EXPLORERS.get(withdrawType), txId);
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
} else {
Toast.makeText(getActivity(), R.string.error_generic,
Toast.LENGTH_SHORT).show();
}
}
}
});