Merge branch 'master' into orangesurf/2024-07-19
This commit is contained in:
		
						commit
						301f1821ae
					
				| @ -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() { | ||||
|  | ||||
| @ -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(); | ||||
|     }); | ||||
|  | ||||
| @ -181,4 +181,17 @@ export function uncompressDeltaChange(delta: MempoolBlockDeltaCompressed): Mempo | ||||
|       acc: !!tx[3], | ||||
|     })) | ||||
|   }; | ||||
| } | ||||
| } | ||||
| 
 | ||||
| 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); | ||||
| } | ||||
|  | ||||
| @ -1056,16 +1056,56 @@ | ||||
|           <context context-type="linenumber">91</context> | ||||
|         </context-group> | ||||
|       </trans-unit> | ||||
|       <trans-unit id="1bc4a5de56ea48a832e32294c124009867b478d0" datatype="html"> | ||||
|         <source>First seen</source> | ||||
|       <trans-unit id="65d447765db0bf3390e9b3ecce142bf34bb602a3" datatype="html"> | ||||
|         <source>Mined</source> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/acceleration-timeline/acceleration-timeline.component.html</context> | ||||
|           <context context-type="linenumber">26</context> | ||||
|           <context context-type="linenumber">31</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/acceleration-timeline/acceleration-timeline.component.html</context> | ||||
|           <context context-type="linenumber">120</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/custom-dashboard/custom-dashboard.component.html</context> | ||||
|           <context context-type="linenumber">121</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/custom-dashboard/custom-dashboard.component.html</context> | ||||
|           <context context-type="linenumber">154</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/pool/pool.component.html</context> | ||||
|           <context context-type="linenumber">183</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/pool/pool.component.html</context> | ||||
|           <context context-type="linenumber">245</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/rbf-list/rbf-list.component.html</context> | ||||
|           <context context-type="linenumber">23</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/rbf-timeline/rbf-timeline-tooltip.component.html</context> | ||||
|           <context context-type="linenumber">38</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/dashboard/dashboard.component.html</context> | ||||
|           <context context-type="linenumber">86</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/dashboard/dashboard.component.html</context> | ||||
|           <context context-type="linenumber">106</context> | ||||
|         </context-group> | ||||
|         <note priority="1" from="description">transaction.rbf.mined</note> | ||||
|       </trans-unit> | ||||
|       <trans-unit id="1bc4a5de56ea48a832e32294c124009867b478d0" datatype="html"> | ||||
|         <source>First seen</source> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/acceleration-timeline/acceleration-timeline.component.html</context> | ||||
|           <context context-type="linenumber">64</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/block-overview-tooltip/block-overview-tooltip.component.html</context> | ||||
|           <context context-type="linenumber">20</context> | ||||
| @ -1125,11 +1165,11 @@ | ||||
|         <source>Accelerated</source> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/acceleration-timeline/acceleration-timeline.component.html</context> | ||||
|           <context context-type="linenumber">40</context> | ||||
|           <context context-type="linenumber">90</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/acceleration-timeline/acceleration-timeline.component.html</context> | ||||
|           <context context-type="linenumber">136</context> | ||||
|           <context context-type="linenumber">94</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/block-overview-tooltip/block-overview-tooltip.component.html</context> | ||||
| @ -1149,50 +1189,6 @@ | ||||
|         </context-group> | ||||
|         <note priority="1" from="description">transaction.audit.accelerated</note> | ||||
|       </trans-unit> | ||||
|       <trans-unit id="65d447765db0bf3390e9b3ecce142bf34bb602a3" datatype="html"> | ||||
|         <source>Mined</source> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/acceleration-timeline/acceleration-timeline.component.html</context> | ||||
|           <context context-type="linenumber">53</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/acceleration-timeline/acceleration-timeline.component.html</context> | ||||
|           <context context-type="linenumber">93</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/custom-dashboard/custom-dashboard.component.html</context> | ||||
|           <context context-type="linenumber">121</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/custom-dashboard/custom-dashboard.component.html</context> | ||||
|           <context context-type="linenumber">154</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/pool/pool.component.html</context> | ||||
|           <context context-type="linenumber">183</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/pool/pool.component.html</context> | ||||
|           <context context-type="linenumber">245</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/rbf-list/rbf-list.component.html</context> | ||||
|           <context context-type="linenumber">23</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/rbf-timeline/rbf-timeline-tooltip.component.html</context> | ||||
|           <context context-type="linenumber">38</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/dashboard/dashboard.component.html</context> | ||||
|           <context context-type="linenumber">86</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/dashboard/dashboard.component.html</context> | ||||
|           <context context-type="linenumber">106</context> | ||||
|         </context-group> | ||||
|         <note priority="1" from="description">transaction.rbf.mined</note> | ||||
|       </trans-unit> | ||||
|       <trans-unit id="bcf34abc2d9ed8f45a2f65dd464c46694e9a181e" datatype="html"> | ||||
|         <source>Acceleration Fees</source> | ||||
|         <context-group purpose="location"> | ||||
| @ -1201,7 +1197,7 @@ | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/acceleration/acceleration-fees-graph/acceleration-fees-graph.component.ts</context> | ||||
|           <context context-type="linenumber">74</context> | ||||
|           <context context-type="linenumber">77</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/graphs/graphs.component.html</context> | ||||
| @ -1213,14 +1209,14 @@ | ||||
|         <source>No accelerated transaction for this timeframe</source> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/acceleration/acceleration-fees-graph/acceleration-fees-graph.component.ts</context> | ||||
|           <context context-type="linenumber">130</context> | ||||
|           <context context-type="linenumber">133</context> | ||||
|         </context-group> | ||||
|       </trans-unit> | ||||
|       <trans-unit id="4793828002882320882" datatype="html"> | ||||
|         <source>At block: <x id="PH" equiv-text="ticks[0].data[2]"/></source> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/acceleration/acceleration-fees-graph/acceleration-fees-graph.component.ts</context> | ||||
|           <context context-type="linenumber">174</context> | ||||
|           <context context-type="linenumber">177</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.ts</context> | ||||
| @ -1239,7 +1235,7 @@ | ||||
|         <source>Around block: <x id="PH" equiv-text="ticks[0].data[2]"/></source> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/acceleration/acceleration-fees-graph/acceleration-fees-graph.component.ts</context> | ||||
|           <context context-type="linenumber">176</context> | ||||
|           <context context-type="linenumber">179</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.ts</context> | ||||
| @ -1669,7 +1665,7 @@ | ||||
|         <source>Accelerated by</source> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/acceleration/active-acceleration-box/active-acceleration-box.component.html</context> | ||||
|           <context context-type="linenumber">25</context> | ||||
|           <context context-type="linenumber">30</context> | ||||
|         </context-group> | ||||
|         <note priority="1" from="description">Accelerated to hashrate</note> | ||||
|         <note priority="1" from="meaning">transaction.accelerated-by-hashrate</note> | ||||
| @ -1678,7 +1674,7 @@ | ||||
|         <source><x id="INTERPOLATION" equiv-text="{{ acceleratedByPercentage }}"/> <x id="START_TAG_SPAN" ctype="x-span" equiv-text="<span class="symbol hashrate-label">"/>of hashrate<x id="CLOSE_TAG_SPAN" ctype="x-span" equiv-text="</span>"/></source> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/acceleration/active-acceleration-box/active-acceleration-box.component.html</context> | ||||
|           <context context-type="linenumber">27</context> | ||||
|           <context context-type="linenumber">32</context> | ||||
|         </context-group> | ||||
|         <note priority="1" from="description">accelerator.x-of-hash-rate</note> | ||||
|       </trans-unit> | ||||
| @ -1686,7 +1682,7 @@ | ||||
|         <source>not accelerating</source> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/acceleration/active-acceleration-box/active-acceleration-box.component.ts</context> | ||||
|           <context context-type="linenumber">83</context> | ||||
|           <context context-type="linenumber">85</context> | ||||
|         </context-group> | ||||
|       </trans-unit> | ||||
|       <trans-unit id="3590f5c3ef2810f637316edb8aaa86b8e907f152" datatype="html"> | ||||
| @ -2030,8 +2026,8 @@ | ||||
|         </context-group> | ||||
|         <note priority="1" from="description">address.error.loading-address-data</note> | ||||
|       </trans-unit> | ||||
|       <trans-unit id="49cef95661d86f4341788ce40068d58801adc6e6" datatype="html"> | ||||
|         <source><x id="START_ITALIC_TEXT" ctype="x-i" equiv-text="There many transactions on this address, more than your backend can handle. See more on <a href="/d"/>There many transactions on this address, more than your backend can handle. See more on <x id="START_LINK" ctype="x-a" equiv-text="<a href="/docs/faq#address-lookup-issues">"/>setting up a stronger backend<x id="CLOSE_LINK" ctype="x-a" equiv-text="</a>"/>.<x id="CLOSE_ITALIC_TEXT" ctype="x-i" equiv-text="</i>"/><x id="LINE_BREAK" ctype="lb"/><x id="LINE_BREAK" ctype="lb"/> Consider viewing this address on the official Mempool website instead: </source> | ||||
|       <trans-unit id="9eb81e2576ffe4e8fb0a303e203040b6ab23cc22" datatype="html"> | ||||
|         <source><x id="START_ITALIC_TEXT" ctype="x-i" equiv-text="There are too many transactions on this address, more than your backend can handle. See more on <"/>There are too many transactions on this address, more than your backend can handle. See more on <x id="START_LINK" ctype="x-a" equiv-text="<a href="/docs/faq#address-lookup-issues">"/>setting up a stronger backend<x id="CLOSE_LINK" ctype="x-a" equiv-text="</a>"/>.<x id="CLOSE_ITALIC_TEXT" ctype="x-i" equiv-text="</i>"/><x id="LINE_BREAK" ctype="lb"/><x id="LINE_BREAK" ctype="lb"/> Consider viewing this address on the official Mempool website instead: </source> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/address/address.component.html</context> | ||||
|           <context context-type="linenumber">204,207</context> | ||||
| @ -6572,7 +6568,7 @@ | ||||
|         <source>Your transaction has been accelerated</source> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/tracker/tracker.component.html</context> | ||||
|           <context context-type="linenumber">141</context> | ||||
|           <context context-type="linenumber">143</context> | ||||
|         </context-group> | ||||
|         <note priority="1" from="description">tracker.explain.accelerated</note> | ||||
|       </trans-unit> | ||||
| @ -6580,7 +6576,7 @@ | ||||
|         <source>Waiting for your transaction to appear in the mempool</source> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/tracker/tracker.component.html</context> | ||||
|           <context context-type="linenumber">148</context> | ||||
|           <context context-type="linenumber">150</context> | ||||
|         </context-group> | ||||
|         <note priority="1" from="description">tracker.explain.waiting</note> | ||||
|       </trans-unit> | ||||
| @ -6588,7 +6584,7 @@ | ||||
|         <source>Your transaction is in the mempool, but it will not be confirmed for some time.</source> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/tracker/tracker.component.html</context> | ||||
|           <context context-type="linenumber">154</context> | ||||
|           <context context-type="linenumber">156</context> | ||||
|         </context-group> | ||||
|         <note priority="1" from="description">tracker.explain.pending</note> | ||||
|       </trans-unit> | ||||
| @ -6596,7 +6592,7 @@ | ||||
|         <source>Your transaction is near the top of the mempool, and is expected to confirm soon.</source> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/tracker/tracker.component.html</context> | ||||
|           <context context-type="linenumber">160</context> | ||||
|           <context context-type="linenumber">162</context> | ||||
|         </context-group> | ||||
|         <note priority="1" from="description">tracker.explain.soon</note> | ||||
|       </trans-unit> | ||||
| @ -6604,7 +6600,7 @@ | ||||
|         <source>Your transaction is expected to confirm in the next block</source> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/tracker/tracker.component.html</context> | ||||
|           <context context-type="linenumber">166</context> | ||||
|           <context context-type="linenumber">168</context> | ||||
|         </context-group> | ||||
|         <note priority="1" from="description">tracker.explain.next-block</note> | ||||
|       </trans-unit> | ||||
| @ -6612,7 +6608,7 @@ | ||||
|         <source>Your transaction is confirmed!</source> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/tracker/tracker.component.html</context> | ||||
|           <context context-type="linenumber">172</context> | ||||
|           <context context-type="linenumber">174</context> | ||||
|         </context-group> | ||||
|         <note priority="1" from="description">tracker.explain.confirmed</note> | ||||
|       </trans-unit> | ||||
| @ -6620,7 +6616,7 @@ | ||||
|         <source>Your transaction has been replaced by a newer version!</source> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/tracker/tracker.component.html</context> | ||||
|           <context context-type="linenumber">178</context> | ||||
|           <context context-type="linenumber">180</context> | ||||
|         </context-group> | ||||
|         <note priority="1" from="description">tracker.explain.replaced</note> | ||||
|       </trans-unit> | ||||
| @ -6628,7 +6624,7 @@ | ||||
|         <source>See more details</source> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/tracker/tracker.component.html</context> | ||||
|           <context context-type="linenumber">186</context> | ||||
|           <context context-type="linenumber">189</context> | ||||
|         </context-group> | ||||
|         <note priority="1" from="description">accelerator.show-more-details</note> | ||||
|       </trans-unit> | ||||
| @ -6644,7 +6640,7 @@ | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/transaction/transaction.component.ts</context> | ||||
|           <context context-type="linenumber">497</context> | ||||
|           <context context-type="linenumber">498</context> | ||||
|         </context-group> | ||||
|       </trans-unit> | ||||
|       <trans-unit id="meta.description.bitcoin.transaction" datatype="html"> | ||||
| @ -6659,7 +6655,7 @@ | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/transaction/transaction.component.ts</context> | ||||
|           <context context-type="linenumber">501</context> | ||||
|           <context context-type="linenumber">502</context> | ||||
|         </context-group> | ||||
|       </trans-unit> | ||||
|       <trans-unit id="7e06b8dd9f29261827018351cd71efe1c87839de" datatype="html"> | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user