mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-18 19:25:48 +00:00
Generate transaction hash in account_tx automatic binary handling
This commit is contained in:
@@ -1016,6 +1016,7 @@ Remote.prototype.requestAccountTx = function(options, callback) {
|
||||
tx.meta = new SerializedObject(transaction.meta).to_json();
|
||||
tx.tx = new SerializedObject(transaction.tx_blob).to_json();
|
||||
tx.tx.ledger_index = transaction.ledger_index;
|
||||
tx.tx.hash = Transaction.from_json(tx.tx).hash();
|
||||
return tx;
|
||||
};
|
||||
|
||||
@@ -1032,12 +1033,14 @@ Remote.prototype.requestAccountTx = function(options, callback) {
|
||||
self.removeAllListeners('success');
|
||||
|
||||
self.once('success', function(res) {
|
||||
res.transactions = res.transactions.filter(fn);
|
||||
|
||||
if (options.binary) {
|
||||
res.transactions = res.transactions.map(parseBinary);
|
||||
}
|
||||
|
||||
if (fn !== Boolean) {
|
||||
res.transactions = res.transactions.filter(fn);
|
||||
}
|
||||
|
||||
if (typeof options.map === 'function') {
|
||||
res.transactions = res.transactions.map(options.map);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user