Skip to content

Commit

Permalink
Merge pull request #107 from owl352/feat/addresses-fix
Browse files Browse the repository at this point in the history
TX `addresses` field changed to `address` (deprecated)
  • Loading branch information
pshenmic authored Sep 26, 2024
2 parents 7c6900c + 4a854b8 commit 99bd888
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions lib/services/dashd.js
Original file line number Diff line number Diff line change
Expand Up @@ -2253,6 +2253,8 @@ Dash.prototype.getDetailedTransaction = function(txid, callback) {
var address = null;
if (out.scriptPubKey && out.scriptPubKey.addresses && out.scriptPubKey.addresses.length === 1) {
address = out.scriptPubKey.addresses[0];
} else if(out.scriptPubKey.address){
address = out.scriptPubKey.address;
}
tx.outputs.push({
satoshis: out.valueSat,
Expand Down Expand Up @@ -2280,23 +2282,17 @@ Dash.prototype.getDetailedTransaction = function(txid, callback) {

if (result.proRegTx !== undefined) {
tx.proRegTx = result.proRegTx;
}
if (result.proUpServTx !== undefined) {
}else if (result.proUpServTx !== undefined) {
tx.proUpServTx = result.proUpServTx;
}
if (result.proUpRegTx !== undefined) {
}else if (result.proUpRegTx !== undefined) {
tx.proUpRegTx = result.proUpRegTx;
}
if (result.proUpRevTx !== undefined) {
}else if (result.proUpRevTx !== undefined) {
tx.proUpRevTx = result.proUpRevTx;
}
if (result.cbTx !== undefined) {
}else if (result.cbTx !== undefined) {
tx.cbTx = result.cbTx;
}
if (result.qcTx !== undefined) {
}else if (result.qcTx !== undefined) {
tx.qcTx = result.qcTx;
}
if (result.mnhfTx !== undefined) {
}else if (result.mnhfTx !== undefined) {
tx.mnhfTx = result.mnhfTx;
}
}
Expand Down

0 comments on commit 99bd888

Please sign in to comment.