Update custom address widgets on new block transactions

This commit is contained in:
Mononaut
2024-04-26 23:57:47 +00:00
parent 1de028840e
commit d49485c363
2 changed files with 44 additions and 10 deletions

View File

@@ -88,7 +88,7 @@ export class AddressGraphComponent implements OnChanges {
}
prepareChartOptions(summary): void {
let total = (this.stats.funded_txo_sum - this.stats.spent_txo_sum); // + (summary[0]?.value || 0);
let total = (this.stats.funded_txo_sum - this.stats.spent_txo_sum);
this.data = summary.map(d => {
const balance = total;
total -= d.value;
@@ -102,13 +102,6 @@ export class AddressGraphComponent implements OnChanges {
this.data.push(
{value: [now, this.stats.funded_txo_sum - this.stats.spent_txo_sum], symbol: 'none', tooltip: { show: false }}
);
// [now, this.stats.funded_txo_sum - this.stats.spent_txo_sum, {
// txid: null,
// height: null,
// value: this.stats.funded_txo_sum - this.stats.spent_txo_sum,
// time: Math.floor(now / 1000),
// }]);
}
const maxValue = this.data.reduce((acc, d) => Math.max(acc, Math.abs(d[1] || d.value[1])), 0);