From c4debdd1f93925be3e594455ccbc8a20ae66b652 Mon Sep 17 00:00:00 2001 From: nymkappa Date: Thu, 25 Jun 2026 19:12:25 +0800 Subject: [PATCH 1/3] [accelerator] update checkout component and documentation --- .../accelerate-checkout.component.html | 133 ++++++++---------- .../accelerate-checkout.component.scss | 4 + .../accelerate-checkout.component.ts | 31 ++-- .../accelerate-fee-graph.component.ts | 3 +- .../src/app/docs/api-docs/api-docs-data.ts | 14 +- 5 files changed, 91 insertions(+), 94 deletions(-) diff --git a/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.html b/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.html index e042b83f7..54fe158db 100644 --- a/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.html +++ b/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.html @@ -32,7 +32,6 @@ - @if (hasAccessToBalanceMode) { + @if (estimate.isProUser) { Next block market rate @@ -187,7 +186,7 @@ - + Estimated acceleration cost ~{{ estimate.targetFeeRate | number : '1.0-0' }} sat/vB @@ -208,7 +207,7 @@ - @if (hasAccessToBalanceMode) { + @if (estimate.isProUser) { Maximum acceleration cost } @else { Acceleration cost @@ -222,14 +221,14 @@ sats - + - + Available balance @@ -371,63 +370,69 @@
Payment to mempool.space for acceleration of txid {{ tx.txid.substr(0, 10) }}..{{ tx.txid.substr(-10) }}
- @if (canPayWithBalance || !(canPayWithBitcoin || canPayWithCashapp || canPayWithApplePay || canPayWithGooglePay)) { -
+
+ @if (canPayWithCashapp || canPayWithApplePay || canPayWithGooglePay || canPayWithCardOnFile) {
-

Your account will be debited no more than {{ cost | number }} sats

-
- -
+

Pay  with

+ @if (canPayWithCashapp) { + + } + @if (canPayWithApplePay) { + @if (canPayWithCashapp) { } +
+ +
+ } + @if (canPayWithGooglePay) { + @if (canPayWithCashapp || canPayWithApplePay) { } +
+ +
+ } + @if (canPayWithCardOnFile) { + @if (canPayWithCashapp || canPayWithApplePay || canPayWithGooglePay) { } +
+ @if (isValidCardBrand(estimate?.availablePaymentMethods?.cardOnFile?.card?.brand)) { + + } @else { + + } + {{ estimate?.availablePaymentMethods?.cardOnFile?.card?.last_4 }} +
+ }
-
- } @else { -
- @if (canPayWithCashapp || canPayWithApplePay || canPayWithGooglePay || canPayWithCardOnFile) { -
-

Pay  with

- @if (canPayWithCashapp) { - - } - @if (canPayWithApplePay) { - @if (canPayWithCashapp) { } -
- + } + @if (((canPayWithBalance || canPayWithBitcoin) && (canPayWithCashapp || canPayWithApplePay || canPayWithGooglePay || canPayWithCardOnFile))) { +
+ —— OR —— +
+ } + @if (canPayWithBalance || canPayWithBitcoin) { +
+ @if (canPayWithBalance) { +

+ @if (estimate.isProUser) { + Your account will be debited no more than + } @else { + Use accelerator credits for + } +  {{ cost | number }} sats +

+
+
+ + Pay
- } - @if (canPayWithGooglePay) { - @if (canPayWithCashapp || canPayWithApplePay) { } -
- -
- } - @if (canPayWithCardOnFile) { - @if (canPayWithCashapp || canPayWithApplePay || canPayWithGooglePay) { } -
- @if (['VISA', 'MASTERCARD', 'JCB', 'DISCOVER', 'DISCOVER_DINERS', 'AMERICAN_EXPRESS'].includes(estimate?.availablePaymentMethods?.cardOnFile?.card?.brand)) { - - } @else { - - } - {{ estimate?.availablePaymentMethods?.cardOnFile?.card?.last_4 }} -
- } -
- } - @if ((canPayWithBitcoin && (canPayWithCashapp || canPayWithApplePay || canPayWithGooglePay || canPayWithCardOnFile))) { -
- —— OR —— -
- } - @if (canPayWithBitcoin) { -
+
+ } @else {

Pay {{ ((invoice?.btcDue * 100_000_000) || cost) | number }} sats with

-
- } -
- } + } +
+ } +
@@ -510,7 +515,7 @@
} @else if (step === 'cardonfile') {
- @if (['VISA', 'MASTERCARD', 'JCB', 'DISCOVER', 'DISCOVER_DINERS', 'AMERICAN_EXPRESS'].includes(estimate?.availablePaymentMethods?.cardOnFile?.card?.brand)) { + @if (isValidCardBrand(estimate?.availablePaymentMethods?.cardOnFile?.card?.brand)) { } @else { @@ -637,20 +642,6 @@
- - @if (hasAccessToBalanceMode) { - - } @else { - - } - - Your transaction will be prioritized by up to {{ i | number : '1.1-1' }}% of miners. diff --git a/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.scss b/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.scss index cc4edfb2b..ca0b07b63 100644 --- a/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.scss +++ b/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.scss @@ -26,6 +26,10 @@ hr { cursor: pointer; } +.purple-filter { + filter: brightness(0) saturate(100%) invert(30%) sepia(90%) saturate(5000%) hue-rotate(260deg); +} + .default-slot:not(:only-child) { display: none; } diff --git a/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.ts b/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.ts index 4dff9ea38..6bd8e8c32 100644 --- a/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.ts +++ b/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.ts @@ -18,7 +18,7 @@ import { ThemeService } from '../../services/theme.service'; export type PaymentMethod = 'balance' | 'bitcoin' | 'cashapp' | 'applePay' | 'googlePay' | 'cardOnFile'; export type AccelerationEstimate = { - hasAccess: boolean; + isProUser: boolean; txSummary: TxSummary; nextBlockFee: number; targetFeeRate: number; @@ -324,11 +324,6 @@ export class AccelerateCheckout implements OnInit, OnDestroy { } return; } - if (this.estimate.hasAccess === true && this.estimate.userBalance <= 0) { - if (this.isLoggedIn()) { - this.quoteError = `not_enough_balance`; - } - } if (this.estimate.unavailable) { this.quoteError = `temporarily_unavailable`; } @@ -973,6 +968,10 @@ export class AccelerateCheckout implements OnInit, OnDestroy { return this.auth !== null; } + isValidCardBrand(brand: string | undefined): boolean { + return !!brand && ['VISA', 'MASTERCARD', 'JCB', 'DISCOVER', 'DISCOVER_DINERS', 'AMERICAN_EXPRESS'].includes(brand); + } + /** * UI events */ @@ -1010,15 +1009,19 @@ export class AccelerateCheckout implements OnInit, OnDestroy { return !!this.estimate?.availablePaymentMethods?.googlePay; } - get couldPayWithBalance(): boolean { - if (!this.hasAccessToBalanceMode) { + get couldPayWithCardOnFile(): boolean { + if (!this.cardOnFileEnabled || (!this.isProdDomain && !isDevMode())) { return false; } - return !!this.estimate?.availablePaymentMethods?.balance; + return this.isLoggedIn() && !!this.estimate?.availablePaymentMethods?.cardOnFile; + } + + get couldPayWithBalance(): boolean { + return this.isLoggedIn() && !!this.estimate?.availablePaymentMethods?.balance; } get couldPay(): boolean { - return this.couldPayWithBalance || this.couldPayWithBitcoin || this.couldPayWithCashapp || this.couldPayWithApplePay || this.couldPayWithGooglePay; + return this.couldPayWithBalance || this.couldPayWithBitcoin || this.couldPayWithCashapp || this.couldPayWithApplePay || this.couldPayWithGooglePay || this.couldPayWithCardOnFile; } get canOnlyPayWithBitcoin(): boolean { @@ -1095,7 +1098,7 @@ export class AccelerateCheckout implements OnInit, OnDestroy { } get canPayWithBalance(): boolean { - if (!this.hasAccessToBalanceMode) { + if (!this.canUseBalance) { return false; } const paymentMethod = this.estimate?.availablePaymentMethods?.balance; @@ -1103,11 +1106,11 @@ export class AccelerateCheckout implements OnInit, OnDestroy { } get canPay(): boolean { - return this.canPayWithBalance || this.canPayWithBitcoin || this.canPayWithCashapp || this.canPayWithApplePay || this.canPayWithGooglePay; + return this.canPayWithBalance || this.canPayWithBitcoin || this.canPayWithCashapp || this.canPayWithApplePay || this.canPayWithGooglePay || this.canPayWithCardOnFile; } - get hasAccessToBalanceMode(): boolean { - return this.isLoggedIn() && this.estimate?.hasAccess; + get canUseBalance(): boolean { + return this.isLoggedIn() && this.estimate?.userBalance > 0; } get timeSincePaid(): number { diff --git a/frontend/src/app/components/accelerate-checkout/accelerate-fee-graph.component.ts b/frontend/src/app/components/accelerate-checkout/accelerate-fee-graph.component.ts index 86b075f1b..92e045cb5 100644 --- a/frontend/src/app/components/accelerate-checkout/accelerate-fee-graph.component.ts +++ b/frontend/src/app/components/accelerate-checkout/accelerate-fee-graph.component.ts @@ -22,7 +22,6 @@ interface GraphBar { export class AccelerateFeeGraphComponent implements OnInit, AfterViewInit, OnChanges, OnDestroy { @Input() tx: Transaction; @Input() estimate: AccelerationEstimate; - @Input() showEstimate = false; @Input() maxRateOptions: RateOption[] = []; @Input() maxRateIndex: number = 0; @Output() setUserBid = new EventEmitter<{ fee: number, index: number }>(); @@ -89,7 +88,7 @@ export class AccelerateFeeGraphComponent implements OnInit, AfterViewInit, OnCha rate: option.rate, height: lastHeight, class: 'max', - label: this.showEstimate ? $localize`maximum` : $localize`:@@b484583f0ce10f3341ab36750d05271d9d22c9a1:Accelerated`.toLowerCase(), + label: this.estimate.isProUser ? $localize`maximum` : $localize`:@@b484583f0ce10f3341ab36750d05271d9d22c9a1:Accelerated`.toLowerCase(), active: option.index === this.maxRateIndex, rateIndex: option.index, fee: option.fee, diff --git a/frontend/src/app/docs/api-docs/api-docs-data.ts b/frontend/src/app/docs/api-docs/api-docs-data.ts index 48af8f6d7..7544fd406 100644 --- a/frontend/src/app/docs/api-docs/api-docs-data.ts +++ b/frontend/src/app/docs/api-docs/api-docs-data.ts @@ -12015,7 +12015,7 @@ export const restApiDocsData = [ "fee": 12500 } ], - "hasAccess": false, + "isProUser": false, "availablePaymentMethods": { "bitcoin": { "enabled": true, @@ -12259,7 +12259,7 @@ export const restApiDocsData = [ category: 'accelerator-private', httpRequestMethod: 'POST', fragment: 'accelerator-top-up', - title: 'POST Top-up Accelerator (Pro)', + title: 'POST Top-up Accelerator Credits', description: { default: '

Generate a bitcoin invoice to top-up your accelerator credits. Minimum is 1,000,000 sats.

' }, @@ -12299,7 +12299,7 @@ export const restApiDocsData = [ category: 'accelerator-private', httpRequestMethod: 'GET', fragment: 'accelerator-top-up-history', - title: 'GET Top-up History (Pro)', + title: 'GET Credits Top-up History', description: { default: '

Returns a list of top ups the user has made as prepayment for the accelerator service.

' }, @@ -12347,9 +12347,9 @@ export const restApiDocsData = [ category: 'accelerator-private', httpRequestMethod: 'GET', fragment: 'accelerator-balance', - title: 'GET Available Balance (Pro)', + title: 'GET Available Credit Balance', description: { - default: '

Returns the user\'s currently available balance, currently locked funds, and total fees paid so far.

' + default: '

Returns the user\'s currently available accelerator credit balance, locked funds, and total fees paid so far.

' }, urlString: '/v1/services/accelerator/balance', showConditions: [''], @@ -12381,9 +12381,9 @@ export const restApiDocsData = [ category: 'accelerator-private', httpRequestMethod: 'POST', fragment: 'accelerator-accelerate', - title: 'POST Accelerate A Transaction (Pro)', + title: 'POST Accelerate A Transaction', description: { - default: '

Sends a request to accelerate a transaction.

' + default: '

Sends a request to accelerate a transaction using accelerator credits.

' }, urlString: '/v1/services/accelerator/accelerate', showConditions: [''], From 365eab002384f0bf2995b71eed059486954be45a Mon Sep 17 00:00:00 2001 From: nymkappa Date: Wed, 1 Jul 2026 10:38:53 +0900 Subject: [PATCH 2/3] [misc] fix log typo --- backend/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/index.ts b/backend/src/index.ts index 3b2296091..bb93ebff8 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -164,7 +164,7 @@ class Server { await poolsUpdater.updatePoolsJson(); // Needs to be done before loading the disk cache because we sometimes wipe it if (config.DATABASE.ENABLED === true && config.MEMPOOL.ENABLED && ['mainnet', 'testnet', 'signet', 'testnet4', 'regtest'].includes(config.MEMPOOL.NETWORK) && !poolsUpdater.currentSha) { - logger.err(`Failed to retreive pools-v2.json sha, cannot run block indexing. Please make sure you've set valid urls in your mempool-config.json::MEMPOOL::POOLS_JSON_URL and mempool-config.json::MEMPOOL::POOLS_JSON_TREE_UR, aborting now`); + logger.err(`Failed to retrieve pools-v2.json sha, cannot run block indexing. Please make sure you've set valid urls in your mempool-config.json::MEMPOOL::POOLS_JSON_URL and mempool-config.json::MEMPOOL::POOLS_JSON_TREE_UR, aborting now`); return process.exit(1); } From 8a9904dbe694c17d353a6f40bf7d1f1def59c70b Mon Sep 17 00:00:00 2001 From: wiz Date: Wed, 1 Jul 2026 15:09:30 +0900 Subject: [PATCH 3/3] ops: Enable -DWITH_ZMQ=ON when building Bitcoin Core --- production/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/production/install b/production/install index d97fd39d7..dcce38e1c 100755 --- a/production/install +++ b/production/install @@ -1162,7 +1162,7 @@ if [ "${BITCOIN_INSTALL}" = ON ];then # use cmake if > v28 if [ "${BITCOIN_LATEST_RELEASE:1:2}" -gt "28" ];then - osSudo "${BITCOIN_USER}" sh -c "cd ${BITCOIN_REPO_NAME} && cmake -B build -DWITH_GUI=OFF -DENABLE_IPC=OFF -DENABLE_WALLET=OFF -DBUILD_BITCOIN_TESTS=OFF" + osSudo "${BITCOIN_USER}" sh -c "cd ${BITCOIN_REPO_NAME} && cmake -B build -DWITH_GUI=OFF -DWITH_ZMQ=ON -DENABLE_IPC=OFF -DENABLE_WALLET=OFF -DBUILD_BITCOIN_TESTS=OFF" osSudo "${BITCOIN_USER}" sh -c "cd ${BITCOIN_REPO_NAME} && cmake --build build -j${NPROC}" echo "[*] Installing Bitcoin binaries into OS"