Add Sapling transaction support.
This commit is contained in:
parent
1ab4e2fd55
commit
1803cb983e
|
@ -2006,6 +2006,19 @@ Bitcoin.prototype.getDetailedTransaction = function(txid, callback) {
|
||||||
tx.nExpiryHeight = result.expiryheight;
|
tx.nExpiryHeight = result.expiryheight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sapling START
|
||||||
|
if (tx.fOverwintered && tx.version >= 4) {
|
||||||
|
tx.valueBalance = result.valueBalance;
|
||||||
|
tx.spendDescs = result.vShieldedSpend;
|
||||||
|
tx.outputDescs = result.vShieldedOutput;
|
||||||
|
if (result.bindingSig) {
|
||||||
|
tx.bindingSig = result.bindingSig;
|
||||||
|
}
|
||||||
|
// Update tx.feeSatoshis with custom explorer JSON field 'valueBalanceZat'
|
||||||
|
tx.feeSatoshis = tx.feeSatoshis + result.valueBalanceZat;
|
||||||
|
}
|
||||||
|
// Sapling END
|
||||||
|
|
||||||
self.transactionDetailedCache.set(txid, tx);
|
self.transactionDetailedCache.set(txid, tx);
|
||||||
done(null, tx);
|
done(null, tx);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue