diff --git a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.ts b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.ts index f2224841a..d8ebb3830 100644 --- a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.ts +++ b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.ts @@ -4,6 +4,7 @@ import { Subscription, catchError, of, tap } from 'rxjs'; import { StorageService } from '../../services/storage.service'; import { Transaction } from '../../interfaces/electrs.interface'; import { nextRoundNumber } from '../../shared/common.utils'; +import { AudioService } from '../../services/audio.service'; export type AccelerationEstimate = { txSummary: TxSummary; @@ -63,6 +64,7 @@ export class AcceleratePreviewComponent implements OnInit, OnDestroy, OnChanges constructor( private apiService: ApiService, private storageService: StorageService, + private audioService: AudioService, private cd: ChangeDetectorRef ) { } @@ -186,6 +188,7 @@ export class AcceleratePreviewComponent implements OnInit, OnDestroy, OnChanges this.userBid ).subscribe({ next: () => { + this.audioService.playSound('ascend-chime-cartoon'); this.showSuccess = true; this.scrollToPreviewWithTimeout('successAlert', 'center'); this.estimateSubscription.unsubscribe(); diff --git a/frontend/src/app/components/transaction/transaction.component.ts b/frontend/src/app/components/transaction/transaction.component.ts index ae3a950bd..1ee8a3ad6 100644 --- a/frontend/src/app/components/transaction/transaction.component.ts +++ b/frontend/src/app/components/transaction/transaction.component.ts @@ -439,7 +439,11 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy { block_time: block.timestamp, }; this.stateService.markBlock$.next({ blockHeight: block.height }); - this.audioService.playSound('magic'); + if (this.tx.acceleration || (this.accelerationInfo && ['accelerating', 'mined', 'completed'].includes(this.accelerationInfo.status))) { + this.audioService.playSound('wind-chimes-harp-ascend'); + } else { + this.audioService.playSound('magic'); + } this.fetchAcceleration$.next(block.id); } }); diff --git a/frontend/src/app/services/audio.service.ts b/frontend/src/app/services/audio.service.ts index a0b27d168..5b5ffbf07 100644 --- a/frontend/src/app/services/audio.service.ts +++ b/frontend/src/app/services/audio.service.ts @@ -13,7 +13,7 @@ export class AudioService { } catch (e) {} } - public playSound(name: 'magic' | 'chime' | 'cha-ching' | 'bright-harmony') { + public playSound(name: 'magic' | 'chime' | 'cha-ching' | 'bright-harmony' | 'wind-chimes-harp-ascend' | 'ascend-chime-cartoon') { if (this.isPlaying || !this.audio) { return; } diff --git a/frontend/src/resources/sounds/ascend-chime-cartoon.mp3 b/frontend/src/resources/sounds/ascend-chime-cartoon.mp3 new file mode 100644 index 000000000..614274324 Binary files /dev/null and b/frontend/src/resources/sounds/ascend-chime-cartoon.mp3 differ diff --git a/frontend/src/resources/sounds/wind-chimes-harp-ascend.mp3 b/frontend/src/resources/sounds/wind-chimes-harp-ascend.mp3 new file mode 100644 index 000000000..fd3f60b66 Binary files /dev/null and b/frontend/src/resources/sounds/wind-chimes-harp-ascend.mp3 differ