Electrum: Sort address transactions correctly by confirmed and unconfirmed.

This commit is contained in:
softsimon 2021-01-10 17:40:05 +07:00
parent 78bd79656d
commit ee915b49ee

View File

@ -126,7 +126,7 @@ class BitcoindElectrsApi extends BitcoinApi implements AbstractBitcoinApi {
const transactions: IEsploraApi.Transaction[] = []; const transactions: IEsploraApi.Transaction[] = [];
const history = await this.$getScriptHashHistory(addressInfo.scriptPubKey); const history = await this.$getScriptHashHistory(addressInfo.scriptPubKey);
history.reverse(); history.sort((a, b) => (b.height || 9999999) - (a.height || 9999999));
let startingIndex = 0; let startingIndex = 0;
if (lastSeenTxId) { if (lastSeenTxId) {