Compare commits

..

5 Commits

3 changed files with 5 additions and 7 deletions

View File

@@ -664,11 +664,11 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
amount: costUSD.toFixed(2),
label: 'Total',
pending: true,
productUrl: `${redirectHostname}/tracker/${this.tx.txid}`,
productUrl: `${redirectHostname}/tx/${this.tx.txid}`,
}
});
this.cashAppPay = await this.payments.cashAppPay(paymentRequest, {
redirectURL: `${redirectHostname}/tracker/${this.tx.txid}`,
redirectURL: `${redirectHostname}/tx/${this.tx.txid}`,
referenceId: `accelerator-${this.tx.txid.substring(0, 15)}-${Math.round(new Date().getTime() / 1000)}`
});

View File

@@ -31,6 +31,7 @@ export class MiningService {
data: MiningStats;
}
} = {};
network: string;
poolsData: SinglePoolStats[] = [];
constructor(
@@ -44,7 +45,7 @@ export class MiningService {
*/
public getMiningStats(interval: string): Observable<MiningStats> {
// returned cached data fetched within the last 5 minutes
if (this.cache[interval] && this.cache[interval].lastUpdated > (Date.now() - (5 * 60000))) {
if (this.cache[interval] && this.cache[interval].lastUpdated > (Date.now() - (5 * 60000)) && this.network === this.stateService.network) {
return of(this.cache[interval].data);
} else {
return this.apiService.listPools$(interval).pipe(
@@ -54,6 +55,7 @@ export class MiningService {
lastUpdated: Date.now(),
data: stats,
};
this.network = this.stateService.network;
})
);
}

View File

@@ -227,10 +227,6 @@ export class StateService {
}
});
if (this.referrer === 'https://cash.app/' && window.innerWidth < 850 && window.location.pathname.startsWith('/tx/')) {
this.router.navigate(['/tracker/' + window.location.pathname.slice(4)]);
}
this.liveMempoolBlockTransactions$ = this.mempoolBlockUpdate$.pipe(scan((transactions: { [txid: string]: TransactionStripped }, change: MempoolBlockUpdate): { [txid: string]: TransactionStripped } => {
if (isMempoolState(change)) {
const txMap = {};