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 49b12bbee..2512191b9 100644 --- a/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.ts +++ b/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit, OnDestroy, Output, EventEmitter, Input, ChangeDetectorRef, SimpleChanges, HostListener } from '@angular/core'; import { Subscription, tap, of, catchError, Observable, switchMap } from 'rxjs'; import { ServicesApiServices } from '../../services/services-api.service'; -import { nextRoundNumber } from '../../shared/common.utils'; +import { nextRoundNumber, insecureRandomUUID } from '../../shared/common.utils'; import { StateService } from '../../services/state.service'; import { AudioService } from '../../services/audio.service'; import { ETA, EtaService } from '../../services/eta.service'; @@ -130,7 +130,7 @@ export class AccelerateCheckout implements OnInit, OnDestroy { private authService: AuthServiceMempool, private enterpriseService: EnterpriseService, ) { - this.accelerationUUID = window.crypto.randomUUID(); + this.accelerationUUID = insecureRandomUUID(); } ngOnInit() { diff --git a/frontend/src/app/components/bitcoin-invoice/bitcoin-invoice.component.ts b/frontend/src/app/components/bitcoin-invoice/bitcoin-invoice.component.ts index 79584b3d8..067061678 100644 --- a/frontend/src/app/components/bitcoin-invoice/bitcoin-invoice.component.ts +++ b/frontend/src/app/components/bitcoin-invoice/bitcoin-invoice.component.ts @@ -3,7 +3,7 @@ import { FormBuilder, FormGroup } from '@angular/forms'; import { DomSanitizer, SafeUrl } from '@angular/platform-browser'; import { ActivatedRoute } from '@angular/router'; import { Subscription, of, timer } from 'rxjs'; -import { retry, switchMap, tap } from 'rxjs/operators'; +import { filter, repeat, retry, switchMap, take, tap } from 'rxjs/operators'; import { ServicesApiServices } from '../../services/services-api.service'; @Component({ @@ -73,11 +73,11 @@ export class BitcoinInvoiceComponent implements OnInit, OnChanges, OnDestroy { this.paymentStatus = 4; } this.paymentStatusSubscription = this.apiService.getPaymentStatus$(this.invoice.btcpayInvoiceId).pipe( - retry({ delay: () => timer(2000)}) - ).subscribe((response) => { - if (response.status === 204 || response.status === 404) { - return; - } + retry({ delay: () => timer(2000)}), + repeat({delay: 2000}), + filter((response) => response.status !== 204 && response.status !== 404), + take(1), + ).subscribe(() => { this.paymentStatus = 3; this.completed.emit(); }); diff --git a/frontend/src/app/shared/common.utils.ts b/frontend/src/app/shared/common.utils.ts index 28e510e14..e22754d27 100644 --- a/frontend/src/app/shared/common.utils.ts +++ b/frontend/src/app/shared/common.utils.ts @@ -181,4 +181,17 @@ export function uncompressDeltaChange(delta: MempoolBlockDeltaCompressed): Mempo acc: !!tx[3], })) }; -} \ No newline at end of file +} + +export function insecureRandomUUID(): string { + const hexDigits = '0123456789abcdef'; + const uuidLengths = [8, 4, 4, 4, 12]; + let uuid = ''; + for (const length of uuidLengths) { + for (let i = 0; i < length; i++) { + uuid += hexDigits[Math.floor(Math.random() * 16)]; + } + uuid += '-'; + } + return uuid.slice(0, -1); +} diff --git a/frontend/src/locale/messages.xlf b/frontend/src/locale/messages.xlf index 60113a7ed..0f9432320 100644 --- a/frontend/src/locale/messages.xlf +++ b/frontend/src/locale/messages.xlf @@ -1056,16 +1056,56 @@ 91 - - First seen + + Mined src/app/components/acceleration-timeline/acceleration-timeline.component.html - 26 + 31 src/app/components/acceleration-timeline/acceleration-timeline.component.html 120 + + src/app/components/custom-dashboard/custom-dashboard.component.html + 121 + + + src/app/components/custom-dashboard/custom-dashboard.component.html + 154 + + + src/app/components/pool/pool.component.html + 183 + + + src/app/components/pool/pool.component.html + 245 + + + src/app/components/rbf-list/rbf-list.component.html + 23 + + + src/app/components/rbf-timeline/rbf-timeline-tooltip.component.html + 38 + + + src/app/dashboard/dashboard.component.html + 86 + + + src/app/dashboard/dashboard.component.html + 106 + + transaction.rbf.mined + + + First seen + + src/app/components/acceleration-timeline/acceleration-timeline.component.html + 64 + src/app/components/block-overview-tooltip/block-overview-tooltip.component.html 20 @@ -1125,11 +1165,11 @@ Accelerated src/app/components/acceleration-timeline/acceleration-timeline.component.html - 40 + 90 src/app/components/acceleration-timeline/acceleration-timeline.component.html - 136 + 94 src/app/components/block-overview-tooltip/block-overview-tooltip.component.html @@ -1149,50 +1189,6 @@ transaction.audit.accelerated - - Mined - - src/app/components/acceleration-timeline/acceleration-timeline.component.html - 53 - - - src/app/components/acceleration-timeline/acceleration-timeline.component.html - 93 - - - src/app/components/custom-dashboard/custom-dashboard.component.html - 121 - - - src/app/components/custom-dashboard/custom-dashboard.component.html - 154 - - - src/app/components/pool/pool.component.html - 183 - - - src/app/components/pool/pool.component.html - 245 - - - src/app/components/rbf-list/rbf-list.component.html - 23 - - - src/app/components/rbf-timeline/rbf-timeline-tooltip.component.html - 38 - - - src/app/dashboard/dashboard.component.html - 86 - - - src/app/dashboard/dashboard.component.html - 106 - - transaction.rbf.mined - Acceleration Fees @@ -1201,7 +1197,7 @@ src/app/components/acceleration/acceleration-fees-graph/acceleration-fees-graph.component.ts - 74 + 77 src/app/components/graphs/graphs.component.html @@ -1213,14 +1209,14 @@ No accelerated transaction for this timeframe src/app/components/acceleration/acceleration-fees-graph/acceleration-fees-graph.component.ts - 130 + 133 At block: src/app/components/acceleration/acceleration-fees-graph/acceleration-fees-graph.component.ts - 174 + 177 src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.ts @@ -1239,7 +1235,7 @@ Around block: src/app/components/acceleration/acceleration-fees-graph/acceleration-fees-graph.component.ts - 176 + 179 src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.ts @@ -1669,7 +1665,7 @@ Accelerated by src/app/components/acceleration/active-acceleration-box/active-acceleration-box.component.html - 25 + 30 Accelerated to hashrate transaction.accelerated-by-hashrate @@ -1678,7 +1674,7 @@ of hashrate src/app/components/acceleration/active-acceleration-box/active-acceleration-box.component.html - 27 + 32 accelerator.x-of-hash-rate @@ -1686,7 +1682,7 @@ not accelerating src/app/components/acceleration/active-acceleration-box/active-acceleration-box.component.ts - 83 + 85 @@ -2030,8 +2026,8 @@ address.error.loading-address-data - - There many transactions on this address, more than your backend can handle. See more on setting up a stronger backend. Consider viewing this address on the official Mempool website instead: + + There are too many transactions on this address, more than your backend can handle. See more on setting up a stronger backend. Consider viewing this address on the official Mempool website instead: src/app/components/address/address.component.html 204,207 @@ -6572,7 +6568,7 @@ Your transaction has been accelerated src/app/components/tracker/tracker.component.html - 141 + 143 tracker.explain.accelerated @@ -6580,7 +6576,7 @@ Waiting for your transaction to appear in the mempool src/app/components/tracker/tracker.component.html - 148 + 150 tracker.explain.waiting @@ -6588,7 +6584,7 @@ Your transaction is in the mempool, but it will not be confirmed for some time. src/app/components/tracker/tracker.component.html - 154 + 156 tracker.explain.pending @@ -6596,7 +6592,7 @@ Your transaction is near the top of the mempool, and is expected to confirm soon. src/app/components/tracker/tracker.component.html - 160 + 162 tracker.explain.soon @@ -6604,7 +6600,7 @@ Your transaction is expected to confirm in the next block src/app/components/tracker/tracker.component.html - 166 + 168 tracker.explain.next-block @@ -6612,7 +6608,7 @@ Your transaction is confirmed! src/app/components/tracker/tracker.component.html - 172 + 174 tracker.explain.confirmed @@ -6620,7 +6616,7 @@ Your transaction has been replaced by a newer version! src/app/components/tracker/tracker.component.html - 178 + 180 tracker.explain.replaced @@ -6628,7 +6624,7 @@ See more details src/app/components/tracker/tracker.component.html - 186 + 189 accelerator.show-more-details @@ -6644,7 +6640,7 @@ src/app/components/transaction/transaction.component.ts - 497 + 498 @@ -6659,7 +6655,7 @@ src/app/components/transaction/transaction.component.ts - 501 + 502