public boolean isNativeIssuer() { return equals(XRP_ISSUER); }
private boolean isHighAccount(AccountID account) { return highAccount().equals(account); } private boolean isLowAccount(AccountID account) {
private boolean isLowAccount(AccountID account) { return lowAccount().equals(account); }
public PaymentFlow destination(final AccountID id) { if (dest == null || !dest.equals(id)) { requestAccountInfo(id); dest = id; makePathFindRequestIfCan(); } return this; }
public boolean equals(Amount amt) { return equalValue(amt) && currency.equals(amt.currency) && (isNative() || issuer.equals(amt.issuer)); }
public boolean sellingOwnFunds() { return account().equals(takerGets().issuer()); }
public PaymentFlow source(final Account account) { AccountID id = account.id(); if (src == null|| !src.equals(id)) { requestAccountInfo(id); srcAccount = account; src = srcAccount.id(); makePathFindRequestIfCan(); } return this; }
private Alternatives constructAlternatives(JSONArray alternatives, Alternatives prior) { Alternatives alts; if (alternatives == null) { alts = new Alternatives(); } else { alts = new Alternatives(alternatives, prior); } if (destinationAmount.isNative() && !src.equals(dest) && srcCanSendNative(destinationAmount)) { injectNativeAlternative(alts, prior); } return alts; }
public Hash256 fundingSource() { Amount takerGets = takerGets(); if (account().equals(takerGets.issuer())) { return null; } else if (takerGets.isNative()) { return Index.accountRoot(account()); } else { return lineIndex(takerGets); } }
public void notifyTransactionResult(TransactionResult tr) { if (!tr.validated || !(tr.initiatingAccount().equals(accountID))) { return; } UInt32 txnSequence = tr.txn.get(UInt32.Sequence); seenValidatedSequences.add(txnSequence.longValue()); ManagedTxn txn = submittedTransactionForHash(tr.hash); if (txn != null) { finalizeTxnAndRemoveFromQueue(txn); failedTransactions.remove(txn); txn.emit(ManagedTxn.OnTransactionValidated.class, tr); } else { // TODO Check for transaction malleability, by computing a signing hash // preempt the terPRE_SEQ resubmitFirstTransactionWithTakenSequence(txnSequence); // Some transactions are waiting on this event before resubmission emit(OnValidatedSequence.class, txnSequence.add(new UInt32(1))); } }
tr.initiatingAccount().equals(giveAwayAccount)) { Amount amount = tr.txn.get(Amount.Amount);