From 9c2d010516a1eb9ff23a43473a71f385f7296548 Mon Sep 17 00:00:00 2001 From: softsimon Date: Sun, 21 Jul 2024 23:55:28 +0800 Subject: [PATCH] rename to insecureRandomUUID --- .../accelerate-checkout/accelerate-checkout.component.ts | 4 ++-- frontend/src/app/shared/common.utils.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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 e5e44d2d6..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, simpleRandomUUID } 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 = simpleRandomUUID(); + this.accelerationUUID = insecureRandomUUID(); } ngOnInit() { diff --git a/frontend/src/app/shared/common.utils.ts b/frontend/src/app/shared/common.utils.ts index 3e2a2e749..e22754d27 100644 --- a/frontend/src/app/shared/common.utils.ts +++ b/frontend/src/app/shared/common.utils.ts @@ -183,7 +183,7 @@ export function uncompressDeltaChange(delta: MempoolBlockDeltaCompressed): Mempo }; } -export function simpleRandomUUID(): string { +export function insecureRandomUUID(): string { const hexDigits = '0123456789abcdef'; const uuidLengths = [8, 4, 4, 4, 12]; let uuid = '';