diff --git a/frontend/src/app/components/transaction/transaction.component.ts b/frontend/src/app/components/transaction/transaction.component.ts index 112c95e5c..faa7b7839 100644 --- a/frontend/src/app/components/transaction/transaction.component.ts +++ b/frontend/src/app/components/transaction/transaction.component.ts @@ -139,7 +139,7 @@ export class TransactionComponent implements OnInit, OnDestroy { ) .subscribe((block) => { const feePervByte = this.tx.fee / (this.tx.weight / 4); - this.medianFeeNeeded = block.feeRange[Math.round(block.feeRange.length * 0.5)]; + this.medianFeeNeeded = Math.round(block.feeRange[Math.round(block.feeRange.length * 0.5)]); // Block not filled if (block.weight < 4000000 * 0.95) { diff --git a/frontend/src/app/components/transactions-list/transactions-list.component.ts b/frontend/src/app/components/transactions-list/transactions-list.component.ts index e9299cbb6..79e4ed84e 100644 --- a/frontend/src/app/components/transactions-list/transactions-list.component.ts +++ b/frontend/src/app/components/transactions-list/transactions-list.component.ts @@ -42,6 +42,11 @@ export class TransactionsListComponent implements OnInit, OnChanges { observableObject[i] = this.electrsApiService.getOutspends$(tx.txid); }); + if (Object.keys(observableObject).length > 100) { + console.log('Too many outspends requests'); + return; + } + forkJoin(observableObject) .subscribe((outspends: any) => { const newOutspends = []; diff --git a/frontend/src/environments/environment.ts b/frontend/src/environments/environment.ts index 7b4f817ad..a537d5cc7 100644 --- a/frontend/src/environments/environment.ts +++ b/frontend/src/environments/environment.ts @@ -3,7 +3,8 @@ // The list of file replacements can be found in `angular.json`. export const environment = { - production: false + production: false, + network: 'mainnet', }; /*