From 8dc80eadf32fb41681841cacb060e9e667bcbdd1 Mon Sep 17 00:00:00 2001 From: Mononaut Date: Wed, 22 Nov 2023 13:10:53 +0900 Subject: [PATCH 1/9] Fix health score when mempool was empty --- backend/src/api/audit.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/src/api/audit.ts b/backend/src/api/audit.ts index e78b2796f..5aa04637d 100644 --- a/backend/src/api/audit.ts +++ b/backend/src/api/audit.ts @@ -144,7 +144,12 @@ class Audit { const numCensored = Object.keys(isCensored).length; const numMatches = matches.length - 1; // adjust for coinbase tx - const score = numMatches > 0 ? (numMatches / (numMatches + numCensored)) : 0; + let score = 0; + if (numMatches <= 0 && numCensored <= 0) { + score = 1; + } else if (numMatches > 0) { + score = (numMatches / (numMatches + numCensored)); + } const similarity = projectedWeight ? matchedWeight / projectedWeight : 1; return { From 75cc84467640f55dbbeaf8b7e4e4727bc012806f Mon Sep 17 00:00:00 2001 From: Mononaut Date: Wed, 22 Nov 2023 19:53:22 +0900 Subject: [PATCH 2/9] actually fix empty mempool health score --- backend/src/api/audit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/api/audit.ts b/backend/src/api/audit.ts index 5aa04637d..0ddfc2cc2 100644 --- a/backend/src/api/audit.ts +++ b/backend/src/api/audit.ts @@ -9,7 +9,7 @@ class Audit { auditBlock(transactions: MempoolTransactionExtended[], projectedBlocks: MempoolBlockWithTransactions[], mempool: { [txId: string]: MempoolTransactionExtended }, useAccelerations: boolean = false) : { censored: string[], added: string[], fresh: string[], sigop: string[], fullrbf: string[], accelerated: string[], score: number, similarity: number } { if (!projectedBlocks?.[0]?.transactionIds || !mempool) { - return { censored: [], added: [], fresh: [], sigop: [], fullrbf: [], accelerated: [], score: 0, similarity: 1 }; + return { censored: [], added: [], fresh: [], sigop: [], fullrbf: [], accelerated: [], score: 1, similarity: 1 }; } const matches: string[] = []; // present in both mined block and template From e5d278873633b559b1469bb66d900bc4459ef5c7 Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Thu, 23 Nov 2023 10:45:16 +0900 Subject: [PATCH 3/9] [menu] force background color when menu is open --- frontend/src/app/components/menu/menu.component.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/app/components/menu/menu.component.scss b/frontend/src/app/components/menu/menu.component.scss index 8fe651e27..59b04e92c 100644 --- a/frontend/src/app/components/menu/menu.component.scss +++ b/frontend/src/app/components/menu/menu.component.scss @@ -29,6 +29,7 @@ margin-left: 0px; left: 0px; display: block; + background-color: #1d1f31; } .sidenav a, button{ From 8badacf123102212b578ff1747b8a98e319651b0 Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Thu, 23 Nov 2023 14:54:50 +0900 Subject: [PATCH 4/9] [accelerator] fix preview text wrap not working on safari/firefox [accelerator] polish accelerator preview --- .../accelerate-preview.component.html | 22 +++++++++---------- .../accelerate-preview.component.scss | 13 ++++++----- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html index 2869d02ae..980774d7c 100644 --- a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html +++ b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html @@ -40,7 +40,7 @@ - + Size in vbytes of this transaction and its unconfirmed ancestors @@ -53,7 +53,7 @@ - + Fees already paid by this transaction and its unconfirmed ancestors @@ -95,7 +95,7 @@ Next block market rate - + {{ estimate.targetFeeRate | number : '1.0-0' }} sat/vB @@ -109,7 +109,7 @@ sats - + @@ -129,7 +129,7 @@ sats - + @@ -141,7 +141,7 @@ sats - + @@ -158,11 +158,11 @@ sats - + - + If your tx is accelerated to {{ estimate.targetFeeRate | number : '1.0-0' }} sat/vB @@ -181,13 +181,13 @@ sats - + - + If your tx is accelerated to ~{{ ((estimate.txSummary.effectiveFee + userBid) / estimate.txSummary.effectiveVsize) | number : '1.0-0' }} sat/vB @@ -204,7 +204,7 @@ sats - + diff --git a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.scss b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.scss index 814b37e7a..2e2b19ee8 100644 --- a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.scss +++ b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.scss @@ -8,9 +8,6 @@ align-items: center; justify-content: center; - .fee { - font-size: 1.2em; - } .rate { font-size: 0.9em; .symbol { @@ -64,8 +61,6 @@ .table-accelerator { tr { - text-wrap: wrap; - td { padding-top: 0; padding-bottom: 0; @@ -89,6 +84,7 @@ } &.info { color: #6c757d; + white-space: initial; } &.amt { text-align: right; @@ -97,6 +93,9 @@ &.units { padding-left: 0.2em; white-space: nowrap; + display: flex; + justify-content: space-between; + align-items: center; } } } @@ -106,4 +105,8 @@ flex-direction: row; align-items: stretch; margin-top: 1em; +} + +.item { + white-space: initial; } \ No newline at end of file From 98e3c7b9cfff2d68c7ab4b0dc99fad00c321006b Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Thu, 23 Nov 2023 15:47:28 +0900 Subject: [PATCH 5/9] [accelerator] small align tweak --- .../accelerate-preview/accelerate-preview.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html index 980774d7c..bb4108914 100644 --- a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html +++ b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html @@ -37,7 +37,7 @@ Virtual size - + @@ -48,7 +48,7 @@ In-band fees - + {{ estimate.txSummary.effectiveFee | number : '1.0-0' }} sats From c11551de7b8d784a12183f0fab84d28a8b7373cd Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Thu, 23 Nov 2023 17:00:57 +0900 Subject: [PATCH 6/9] [accelerator] fix preview UX on mobile when there is an error/warning --- .../accelerate-preview/accelerate-preview.component.html | 8 +++++--- .../accelerate-preview/accelerate-preview.component.ts | 8 ++++---- .../components/mempool-error/mempool-error.component.html | 2 +- .../components/mempool-error/mempool-error.component.ts | 1 + 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html index bb4108914..2a075f1e2 100644 --- a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html +++ b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html @@ -1,14 +1,16 @@ +
-
+
Transaction has now been submitted to mining pools for acceleration.
+
-
- +
+
diff --git a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.ts b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.ts index 7215f9bfb..530977c71 100644 --- a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.ts +++ b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.ts @@ -1,5 +1,4 @@ -import { Component, OnInit, Input, OnDestroy, OnChanges, SimpleChanges, HostListener } from '@angular/core'; -import { Router } from '@angular/router'; +import { Component, OnInit, Input, OnDestroy, OnChanges, SimpleChanges, HostListener, ChangeDetectorRef } from '@angular/core'; import { ApiService } from '../../services/api.service'; import { Subscription, catchError, of, tap } from 'rxjs'; import { StorageService } from '../../services/storage.service'; @@ -63,7 +62,7 @@ export class AcceleratePreviewComponent implements OnInit, OnDestroy, OnChanges constructor( private apiService: ApiService, private storageService: StorageService, - private router: Router, + private cd: ChangeDetectorRef ) { } ngOnDestroy(): void { @@ -163,13 +162,14 @@ export class AcceleratePreviewComponent implements OnInit, OnDestroy, OnChanges scrollToPreview(id: string, position: ScrollLogicalPosition) { const acceleratePreviewAnchor = document.getElementById(id); if (acceleratePreviewAnchor) { + this.cd.markForCheck(); acceleratePreviewAnchor.scrollIntoView({ behavior: 'smooth', inline: position, block: position, }); } -} + } /** * Send acceleration request diff --git a/frontend/src/app/shared/components/mempool-error/mempool-error.component.html b/frontend/src/app/shared/components/mempool-error/mempool-error.component.html index 020b147a9..b8179e4c3 100644 --- a/frontend/src/app/shared/components/mempool-error/mempool-error.component.html +++ b/frontend/src/app/shared/components/mempool-error/mempool-error.component.html @@ -1,2 +1,2 @@ -
+
diff --git a/frontend/src/app/shared/components/mempool-error/mempool-error.component.ts b/frontend/src/app/shared/components/mempool-error/mempool-error.component.ts index 4071146ab..e89daaffd 100644 --- a/frontend/src/app/shared/components/mempool-error/mempool-error.component.ts +++ b/frontend/src/app/shared/components/mempool-error/mempool-error.component.ts @@ -33,6 +33,7 @@ export function isMempoolError(error: string) { }) export class MempoolErrorComponent implements OnInit { @Input() error: string; + @Input() alertClass = 'alert-danger'; errorContent: SafeHtml; constructor(private sanitizer: DomSanitizer) { } From 7f4fd83ad2779d3bb468a8c4467235a08c10dcaf Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Thu, 23 Nov 2023 18:40:25 +0900 Subject: [PATCH 7/9] [ui] fix testnets padding --- .../src/app/components/master-page/master-page.component.scss | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/src/app/components/master-page/master-page.component.scss b/frontend/src/app/components/master-page/master-page.component.scss index 6b2377f92..79f5e8a12 100644 --- a/frontend/src/app/components/master-page/master-page.component.scss +++ b/frontend/src/app/components/master-page/master-page.component.scss @@ -244,10 +244,9 @@ main { .sidenav { z-index: 1; background-color: transparent; - width: 225px; + width: 0px; height: calc(100vh - 65px); position: sticky; top: 65px; - margin-left: -225px; padding-bottom: 20px; } From 99fd4500e4f395d3118d4033caa967ec5e35c20b Mon Sep 17 00:00:00 2001 From: wiz Date: Thu, 23 Nov 2023 21:50:27 +0900 Subject: [PATCH 8/9] Fix broken sponsor links on About page --- frontend/src/app/components/about/about.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/components/about/about.component.html b/frontend/src/app/components/about/about.component.html index a56e172c8..a4cc51f90 100644 --- a/frontend/src/app/components/about/about.component.html +++ b/frontend/src/app/components/about/about.component.html @@ -36,14 +36,14 @@

If you're an individual...

- Become a Community Sponsor + Become a Community Sponsor

If you're a business...

- Become an Enterprise Sponsor + Become an Enterprise Sponsor From 5d5e9e8219f31766a27388e1d815ba0020081c64 Mon Sep 17 00:00:00 2001 From: wiz Date: Thu, 23 Nov 2023 22:23:06 +0900 Subject: [PATCH 9/9] Legal: update Privacy Policy 20231123 --- .../components/privacy-policy/privacy-policy.component.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/components/privacy-policy/privacy-policy.component.html b/frontend/src/app/components/privacy-policy/privacy-policy.component.html index fe4bd7f1e..d14b12bc3 100644 --- a/frontend/src/app/components/privacy-policy/privacy-policy.component.html +++ b/frontend/src/app/components/privacy-policy/privacy-policy.component.html @@ -5,7 +5,7 @@

Privacy Policy

-
Updated: November 18, 2021
+
Updated: November 23, 2023


@@ -59,7 +59,7 @@
    -
  1. If you provide your e-mail address, we may contact you regarding your account, billing purposess, or to update you about our services. We will not share this with any third-party.
  2. +
  3. If you provide your name, country, and/or e-mail address, we may use this information to manage your user account, for billing purposes, or to update you about our services. We will not share this with any third-party, except as detailed below if you sponsor The Mempool Open Source Project®, purchase a subscription to Mempool Enterprise®, or accelerate transactions using Mempool Accelerator™.
  4. If you connect your Twitter account, we may store your Twitter identity, e-mail address, and profile photo. We may publicly display your profile photo or link to your profile on our website, if you sponsor The Mempool Open Source Project, claim your Lightning node, or other such use cases.
  5. @@ -67,7 +67,7 @@
  6. If you make a Bitcoin or Liquid payment, we will process your payment using our self-hosted BTCPay Server instance and not share these details with any third-party.
  7. -
  8. If you accelerate transactions using Mempool Accelerator(tm), we will store the TXID of your transactions you accelerate with us. We share this information with our mining pool partners, as well as publicly display accelerated transaction details on our website and APIs.
  9. +
  10. If you accelerate transactions using Mempool Accelerator™, we will store the TXID of your transactions you accelerate with us. We share this information with our mining pool partners, as well as publicly display accelerated transaction details on our website and APIs.