diff --git a/frontend/src/app/components/tracker/tracker.component.ts b/frontend/src/app/components/tracker/tracker.component.ts index 22703b536..f23b1017a 100644 --- a/frontend/src/app/components/tracker/tracker.component.ts +++ b/frontend/src/app/components/tracker/tracker.component.ts @@ -32,7 +32,6 @@ import { TrackerStage } from '@components/tracker/tracker-bar.component'; import { MiningService, MiningStats } from '@app/services/mining.service'; import { ETA, EtaService } from '@app/services/eta.service'; import { getTransactionFlags, getUnacceleratedFeeRate } from '@app/shared/transaction.utils'; -import { RelativeUrlPipe } from '@app/shared/pipes/relative-url/relative-url.pipe'; import { StorageService } from '@app/services/storage.service'; @@ -156,9 +155,9 @@ export class TrackerComponent implements OnInit, OnDestroy { ngOnInit() { this.onResize(); - // Accelerator referral code - const urlParams = new URLSearchParams(window.location.search); - this.referralCode = urlParams.get('referralCode') ?? this.storageService.getValue('referralCode') ?? undefined; + // Accelerator referral code in fragment + const fragmentsParams = new URLSearchParams(window.location.hash); + this.referralCode = fragmentsParams.get('referralCode') ?? this.storageService.getValue('referralCode') ?? undefined; this.storageService.setValue('referralCode', this.referralCode); this.acceleratorAvailable = this.stateService.env.OFFICIAL_MEMPOOL_SPACE && this.stateService.env.ACCELERATOR && this.stateService.network === ''; diff --git a/frontend/src/app/components/transaction/transaction.component.ts b/frontend/src/app/components/transaction/transaction.component.ts index af829c785..94ba5c107 100644 --- a/frontend/src/app/components/transaction/transaction.component.ts +++ b/frontend/src/app/components/transaction/transaction.component.ts @@ -211,7 +211,8 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy { this.forceAccelerationSummary = !!urlParams.get('cash_request_id'); // Accelerator referral code - this.referralCode = urlParams.get('referralCode') ?? this.storageService.getValue('referralCode') ?? undefined; + const fragmentsParams = new URLSearchParams(window.location.hash); + this.referralCode = fragmentsParams.get('referralCode') ?? this.storageService.getValue('referralCode') ?? undefined; this.storageService.setValue('referralCode', this.referralCode); this.hideAccelerationSummary = this.stateService.isMempoolSpaceBuild ? this.storageService.getValue('hide-accelerator-pref') == 'true' : true;