apiv2 code updates

This commit is contained in:
Oliver Eggert
2024-11-09 17:13:13 -08:00
parent 3eb9131cbc
commit b3632c4b85
18 changed files with 39 additions and 65 deletions

View File

@@ -51,8 +51,8 @@ function CountXRPReceived(tx, address) {
console.log("Transaction failed.")
return
}
if (tx.transaction.TransactionType === "Payment") {
if (tx.transaction.Destination !== address) {
if (tx.tx_json.TransactionType === "Payment") {
if (tx.tx_json.Destination !== address) {
console.log("Not the destination of this payment.")
return
}
@@ -67,10 +67,10 @@ function CountXRPReceived(tx, address) {
}
} else if (["PaymentChannelClaim", "PaymentChannelFund", "OfferCreate",
"CheckCash", "EscrowFinish"].includes(
tx.transaction.TransactionType)) {
tx.tx_json.TransactionType)) {
CountXRPDifference(tx.meta.AffectedNodes, address)
} else {
console.log("Not a currency-delivering transaction type (" +
tx.transaction.TransactionType + ").")
tx.tx_json.TransactionType + ").")
}
}