Compare commits
13 Commits
mononaut/p
...
hunicus/re
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b115214119 | ||
|
|
5bb3e930cc | ||
|
|
347bddc974 | ||
|
|
4eca8240db | ||
|
|
1c135b4c67 | ||
|
|
f24223ca06 | ||
|
|
9748aa05cf | ||
|
|
1a5613bf65 | ||
|
|
e55e4e378a | ||
|
|
927eb98072 | ||
|
|
bbff50527b | ||
|
|
4470461a98 | ||
|
|
645fd98c30 |
@@ -8,6 +8,7 @@ import { ETA, EtaService } from '../../services/eta.service';
|
||||
import { Transaction } from '../../interfaces/electrs.interface';
|
||||
import { MiningStats } from '../../services/mining.service';
|
||||
import { IAuth, AuthServiceMempool } from '../../services/auth.service';
|
||||
import { EnterpriseService } from '../../services/enterprise.service';
|
||||
|
||||
export type PaymentMethod = 'balance' | 'bitcoin' | 'cashapp';
|
||||
|
||||
@@ -126,7 +127,8 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
|
||||
private etaService: EtaService,
|
||||
private audioService: AudioService,
|
||||
private cd: ChangeDetectorRef,
|
||||
private authService: AuthServiceMempool
|
||||
private authService: AuthServiceMempool,
|
||||
private enterpriseService: EnterpriseService,
|
||||
) {
|
||||
this.accelerationUUID = window.crypto.randomUUID();
|
||||
}
|
||||
@@ -198,6 +200,9 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
|
||||
if (!this.estimate && ['quote', 'summary', 'checkout'].includes(this.step)) {
|
||||
this.fetchEstimate();
|
||||
}
|
||||
if (this._step === 'checkout') {
|
||||
this.enterpriseService.goal(8);
|
||||
}
|
||||
if (this._step === 'checkout' && this.canPayWithBitcoin) {
|
||||
this.btcpayInvoiceFailed = false;
|
||||
this.loadingBtcpayInvoice = true;
|
||||
@@ -546,7 +551,7 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
get couldPayWithCashapp() {
|
||||
if (!this.cashappEnabled || this.stateService.referrer !== 'https://cash.app/') {
|
||||
if (!this.cashappEnabled) {
|
||||
return false;
|
||||
}
|
||||
return !!this.estimate?.availablePaymentMethods?.cashapp;
|
||||
@@ -569,7 +574,7 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
get canPayWithCashapp() {
|
||||
if (!this.cashappEnabled || !this.conversions || this.stateService.referrer !== 'https://cash.app/') {
|
||||
if (!this.cashappEnabled || !this.conversions) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,11 @@
|
||||
min-height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.container-lg.widget-container {
|
||||
@media (max-width: 500px) {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
.container {
|
||||
max-width: 100%;
|
||||
}
|
||||
@@ -90,7 +94,7 @@ tr, td, th {
|
||||
|
||||
.widget {
|
||||
.txid {
|
||||
width: 30%;
|
||||
width: 35%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
@@ -137,7 +141,7 @@ tr, td, th {
|
||||
}
|
||||
|
||||
.status {
|
||||
width: 20%
|
||||
width: 115px
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -137,4 +137,4 @@ export class AccelerationsListComponent implements OnInit, OnDestroy {
|
||||
this.paramSubscription?.unsubscribe();
|
||||
this.keyNavigationSubscription?.unsubscribe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
<span> </span>
|
||||
<fa-icon [icon]="['fas', 'external-link-alt']" [fixedWidth]="true" style="vertical-align: 'text-top'; font-size: 13px; color: var(--title-fg)"></fa-icon>
|
||||
</a>
|
||||
<app-accelerations-list [attr.data-cy]="'recent-accelerations'" [widget]=true [accelerations$]="minedAccelerations$"></app-accelerations-list>
|
||||
<app-accelerations-list [attr.data-cy]="'recent-accelerations'" [widget]=true [accelerations$]="accelerations$"></app-accelerations-list>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
<td i18n="block.miner">Miner</td>
|
||||
<td *ngIf="stateService.env.MINING_DASHBOARD">
|
||||
<a placement="bottom" [routerLink]="['/mining/pool' | relativeUrl, block.extras.pool.slug]" class="badge" style="color: #FFF;padding:0;">
|
||||
<app-pool-logo [pool]="block.extras.pool" style="position: relative; top: -1px; margin-right: 2px;"></app-pool-logo>
|
||||
<img class="pool-logo" [src]="'/resources/mining-pools/' + block.extras.pool.slug + '.svg'" onError="this.src = '/resources/mining-pools/default.svg'" [alt]="'Logo of ' + block.extras.pool.name + ' mining pool'">
|
||||
{{ block.extras.pool.name }}
|
||||
</a>
|
||||
</td>
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
</div>
|
||||
<div class="animated" *ngIf="block.extras?.pool != undefined && showPools">
|
||||
<a [attr.data-cy]="'bitcoin-block-' + offset + '-index-' + i + '-pool'" class="badge" [routerLink]="[('/mining/pool/' + block.extras.pool.slug) | relativeUrl]">
|
||||
<app-pool-logo [pool]="block.extras.pool" style="position: relative; top: -1px; margin-right: 2px;"></app-pool-logo>
|
||||
<img class="pool-logo" [src]="'/resources/mining-pools/' + block.extras.pool.slug + '.svg'" onError="this.src = '/resources/mining-pools/default.svg'" [alt]="'Logo of ' + block.extras.pool.name + ' mining pool'">
|
||||
{{ block.extras.pool.name}}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -32,13 +32,15 @@
|
||||
<td *ngIf="isMempoolModule" class="pool text-left" [ngClass]="{'widget': widget, 'legacy': !isMempoolModule}">
|
||||
<div *ngIf="indexingAvailable" class="tooltip-custom">
|
||||
<a class="clear-link" [routerLink]="['/mining/pool' | relativeUrl, block.extras.pool.slug]">
|
||||
<app-pool-logo [pool]="block.extras.pool" [width]="22" [height]="22"></app-pool-logo>
|
||||
<img width="22" height="22" src="{{ block.extras.pool['logo'] }}"
|
||||
onError="this.onerror=null; this.src = '/resources/mining-pools/default.svg'" [alt]="'Logo of ' + block.extras.pool.name + ' mining pool'">
|
||||
<span class="pool-name">{{ block.extras.pool.name }}</span>
|
||||
</a>
|
||||
<span *ngIf="!widget" class="tooltiptext badge badge-secondary scriptmessage">{{ block.extras.coinbaseRaw | hex2ascii }}</span>
|
||||
</div>
|
||||
<div *ngIf="!indexingAvailable" class="tooltip-custom">
|
||||
<app-pool-logo [pool]="block.extras.pool" [width]="22" [height]="22"></app-pool-logo>
|
||||
<img width="22" height="22" src="{{ block.extras.pool['logo'] }}"
|
||||
onError="this.src = '/resources/mining-pools/default.svg'" [alt]="'Logo of ' + block.extras.pool.name + ' mining pool'">
|
||||
<span class="pool-name">{{ block.extras.pool.name }}</span>
|
||||
<span *ngIf="!widget" class="tooltiptext badge badge-secondary scriptmessage">{{ block.extras.coinbaseRaw | hex2ascii }}</span>
|
||||
</div>
|
||||
|
||||
@@ -126,6 +126,12 @@ export class BlocksList implements OnInit {
|
||||
this.lastBlockHeight = Math.max(...blocks.map(o => o.height));
|
||||
}),
|
||||
map(blocks => {
|
||||
if (this.stateService.env.BASE_MODULE === 'mempool') {
|
||||
for (const block of blocks) {
|
||||
// @ts-ignore: Need to add an extra field for the template
|
||||
block.extras.pool.logo = `/resources/mining-pools/` + block.extras.pool.slug + '.svg';
|
||||
}
|
||||
}
|
||||
if (this.widget) {
|
||||
return blocks.slice(0, 6);
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
<tr *ngFor="let pool of miningStats.pools">
|
||||
<td class="d-none d-md-table-cell">{{ pool.rank }}</td>
|
||||
<td class="text-right">
|
||||
<app-pool-logo [pool]="pool" [width]="25" [height]="25"></app-pool-logo>
|
||||
<img width="25" height="25" src="{{ pool.logo }}" [alt]="pool.name + ' mining pool logo'" onError="this.onerror=null; this.src = '/resources/mining-pools/default.svg'">
|
||||
</td>
|
||||
<td class="pool-name"><a [routerLink]="[('/mining/pool/' + pool.slug) | relativeUrl]">{{ pool.name }}</a></td>
|
||||
<td class="" *ngIf="this.miningWindowPreference === '24h'">{{ pool.lastEstimatedHashrate | number: '1.2-2' }} {{
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
<!-- Pool overview -->
|
||||
<div *ngIf="poolStats$ | async as poolStats; else loadingMain">
|
||||
<div style="display:flex" class="mb-3">
|
||||
<app-pool-logo [pool]="poolStats.pool" [width]="50" [height]="50" class="mr-3"></app-pool-logo>
|
||||
<img width="50" height="50" src="{{ poolStats['logo'] }}" [alt]="poolStats.pool.name + ' mining pool logo'"
|
||||
onError="this.onerror=null; this.src = '/resources/mining-pools/default.svg'" class="mr-3">
|
||||
<h1 class="m-0 pt-1 pt-md-0">{{ poolStats.pool.name }}</h1>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<div class="card-title" i18n="search.mining-pools">Mining Pools</div>
|
||||
<ng-template ngFor [ngForOf]="results.pools" let-pool let-i="index">
|
||||
<button (click)="clickItem(results.hashQuickMatch + results.addresses.length + i)" [class.active]="results.hashQuickMatch + results.addresses.length + i === activeIdx" [class.inactive]="!pool.active" type="button" role="option" class="dropdown-item">
|
||||
<app-pool-logo [pool]="pool" style="position: relative; top: -1px; margin-right: 10px;"></app-pool-logo>
|
||||
<img class="pool-logo" [src]="'/resources/mining-pools/' + pool.slug + '.svg'" onError="this.src = '/resources/mining-pools/default.svg'" [alt]="'Logo of ' + pool.name + ' mining pool'">
|
||||
<ngb-highlight [result]="pool.name" [term]="results.searchText"></ngb-highlight>
|
||||
</button>
|
||||
</ng-template>
|
||||
|
||||
@@ -26,3 +26,11 @@
|
||||
.active {
|
||||
background-color: var(--active-bg);
|
||||
}
|
||||
|
||||
.pool-logo {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
position: relative;
|
||||
top: -1px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
@@ -75,9 +75,6 @@
|
||||
} @else {
|
||||
<app-time kind="until" [time]="eta.time" [fastRender]="false" [fixedRender]="true"></app-time>
|
||||
}
|
||||
<!-- @if (!showAccelerationSummary && isMobile && !tx.acceleration && acceleratorAvailable && accelerateCtaType === 'button' && !tx?.acceleration) {
|
||||
<a class="btn btn-sm accelerate btn-small-height" i18n="transaction.accelerate|Accelerate button label" (click)="onAccelerateClicked()">Accelerate</a>
|
||||
} -->
|
||||
</span>
|
||||
</ng-container>
|
||||
<ng-template #etaSkeleton>
|
||||
|
||||
@@ -728,7 +728,6 @@ export class TrackerComponent implements OnInit, OnDestroy {
|
||||
if (!this.txId) {
|
||||
return;
|
||||
}
|
||||
this.enterpriseService.goal(8);
|
||||
this.accelerationFlowCompleted = false;
|
||||
if (this.showAccelerationSummary) {
|
||||
this.scrollIntoAccelPreview = true;
|
||||
|
||||
@@ -639,7 +639,7 @@
|
||||
}
|
||||
<td>
|
||||
<div class="effective-fee-container">
|
||||
@if (accelerationInfo?.acceleratedFeeRate && (!tx.effectiveFeePerVsize || accelerationInfo.acceleratedFeeRate >= tx.effectiveFeePerVsize)) {
|
||||
@if (accelerationInfo?.acceleratedFeeRate && (!tx.effectiveFeePerVsize || accelerationInfo.acceleratedFeeRate >= tx.effectiveFeePerVsize || tx.acceleration)) {
|
||||
<app-fee-rate [fee]="accelerationInfo.acceleratedFeeRate"></app-fee-rate>
|
||||
} @else {
|
||||
<app-fee-rate [fee]="tx.effectiveFeePerVsize"></app-fee-rate>
|
||||
@@ -677,7 +677,7 @@
|
||||
@if (pool) {
|
||||
<td class="wrap-cell">
|
||||
<a placement="bottom" [routerLink]="['/mining/pool' | relativeUrl, pool.slug]" class="badge" style="color: #FFF;padding:0;">
|
||||
<app-pool-logo [pool]="pool" style="position: relative; top: -1px; margin-right: 2px;"></app-pool-logo>
|
||||
<img class="pool-logo" [src]="'/resources/mining-pools/' + pool.slug + '.svg'" onError="this.src = '/resources/mining-pools/default.svg'" [alt]="'Logo of ' + pool.name + ' mining pool'">
|
||||
{{ pool.name }}
|
||||
</a>
|
||||
</td>
|
||||
|
||||
@@ -132,6 +132,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||
tooltipPosition: { x: number, y: number };
|
||||
isMobile: boolean;
|
||||
firstLoad = true;
|
||||
waitingForAccelerationInfo: boolean = false;
|
||||
|
||||
featuresEnabled: boolean;
|
||||
segwitEnabled: boolean;
|
||||
@@ -317,11 +318,19 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||
this.setIsAccelerated();
|
||||
}),
|
||||
switchMap((blockHeight: number) => {
|
||||
return this.servicesApiService.getAccelerationHistory$({ blockHeight });
|
||||
return this.servicesApiService.getAccelerationHistory$({ blockHeight }).pipe(
|
||||
switchMap((accelerationHistory: Acceleration[]) => {
|
||||
if (this.tx.acceleration && !accelerationHistory.length) { // If the just mined transaction was accelerated, but services backend did not return any acceleration data, retry
|
||||
return throwError('retry');
|
||||
}
|
||||
return of(accelerationHistory);
|
||||
}),
|
||||
retry({ count: 3, delay: 2000 }),
|
||||
catchError(() => {
|
||||
return of([]);
|
||||
})
|
||||
);
|
||||
}),
|
||||
catchError(() => {
|
||||
return of([]);
|
||||
})
|
||||
).subscribe((accelerationHistory) => {
|
||||
for (const acceleration of accelerationHistory) {
|
||||
if (acceleration.txid === this.txId && (acceleration.status === 'completed' || acceleration.status === 'completed_provisional')) {
|
||||
@@ -330,6 +339,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||
acceleration.boost = boostCost;
|
||||
this.tx.acceleratedAt = acceleration.added;
|
||||
this.accelerationInfo = acceleration;
|
||||
this.waitingForAccelerationInfo = false;
|
||||
this.setIsAccelerated();
|
||||
}
|
||||
}
|
||||
@@ -608,6 +618,9 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||
|
||||
this.stateService.txConfirmed$.subscribe(([txConfirmed, block]) => {
|
||||
if (txConfirmed && this.tx && !this.tx.status.confirmed && txConfirmed === this.tx.txid) {
|
||||
if (this.tx.acceleration) {
|
||||
this.waitingForAccelerationInfo = true;
|
||||
}
|
||||
this.tx.status = {
|
||||
confirmed: true,
|
||||
block_height: block.height,
|
||||
@@ -725,7 +738,6 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||
}
|
||||
|
||||
document.location.hash = '#accelerate';
|
||||
this.enterpriseService.goal(8);
|
||||
this.openAccelerator();
|
||||
this.scrollIntoAccelPreview = true;
|
||||
return false;
|
||||
@@ -804,7 +816,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||
}
|
||||
|
||||
setIsAccelerated(initialState: boolean = false) {
|
||||
this.isAcceleration = (this.tx.acceleration || (this.accelerationInfo && this.pool && this.accelerationInfo.pools.some(pool => (pool === this.pool.id))));
|
||||
this.isAcceleration = ((this.tx.acceleration && (!this.tx.status.confirmed || this.waitingForAccelerationInfo)) || (this.accelerationInfo && this.pool && this.accelerationInfo.pools.some(pool => (pool === this.pool.id))));
|
||||
if (this.isAcceleration) {
|
||||
if (initialState) {
|
||||
this.accelerationFlowCompleted = true;
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
</ng-template>
|
||||
|
||||
<ng-template type="how-to-get-transaction-confirmed-quickly">
|
||||
<p>To get your transaction confirmed quicker, you will need to increase its effective feerate.</p><p>If your transaction was created with RBF enabled, your stuck transaction can simply be replaced with a new one that has a higher fee. Otherwise, if you control any of the stuck transaction's outputs, you can use CPFP to increase your stuck transaction's effective feerate.</p><p>If you are not sure how to do RBF or CPFP, work with the tool you used to make the transaction (wallet software, exchange company, etc).</p><p *ngIf="officialMempoolInstance">Another option to get your transaction confirmed more quickly is Mempool Accelerator™. This service is still in development, but you can <a href="https://mempool.space/accelerator">sign up for the waitlist</a> to be notified when it's ready.</p>
|
||||
<p>To get your transaction confirmed quicker, you will need to increase its effective feerate.</p><p>If your transaction was created with RBF enabled, your stuck transaction can simply be replaced with a new one that has a higher fee. Otherwise, if you control any of the stuck transaction's outputs, you can use CPFP to increase your stuck transaction's effective feerate.</p><p>If you are not sure how to do RBF or CPFP, work with the tool you used to make the transaction (wallet software, exchange company, etc).</p><p>Another option to get your transaction confirmed more quickly is <a [href]="[ isMempoolSpaceBuild ? '/accelerator' : 'https://mempool.space/accelerator']" [target]="isMempoolSpaceBuild ? '' : 'blank'">Mempool Accelerator™</a>.</p>
|
||||
</ng-template>
|
||||
|
||||
<ng-template type="how-prevent-stuck-transaction">
|
||||
|
||||
@@ -33,6 +33,7 @@ export class ApiDocsComponent implements OnInit, AfterViewInit {
|
||||
showMobileEnterpriseUpsell: boolean = true;
|
||||
timeLtrSubscription: Subscription;
|
||||
timeLtr: boolean = this.stateService.timeLtr.value;
|
||||
isMempoolSpaceBuild = this.stateService.isMempoolSpaceBuild;
|
||||
|
||||
@ViewChildren(FaqTemplateDirective) faqTemplates: QueryList<FaqTemplateDirective>;
|
||||
dict = {};
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<img
|
||||
#poolImg
|
||||
class="pool-logo"
|
||||
[width]="width"
|
||||
[height]="height"
|
||||
[style]="{ width: width + 'px', maxWidth: width + 'px', height: height + 'px' }"
|
||||
[src]="'/resources/mining-pools/' + pool.slug + '.svg'"
|
||||
onLoad="this.style.opacity = 1;"
|
||||
onError="this.src = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjUuMTIgMi44IDE1Ljk4IDE4LjI3Ij4gPHBhdGggZD0iTTEyLjEwMSAyLjkwMDU1QzEyLjIxNDYgMi44MzIyNSAxMi4zNTA4IDIuODExOSAxMi40Nzk0IDIuODQzOTlMMTUuODc1NSAzLjY5MDcxQzE2LjEzMjQgMy43NTQ3NyAxNi4yOTI5IDQuMDA2ODggMTYuMjQ2NyA0LjI2MzcyQzE4LjYxMDggNS4zNzA4OCAyMC4zNzEzIDcuMTk0NjcgMjEuMDYwOSA5LjI0NjYyQzIxLjEzNDMgOS40NjQ3OSAyMS4wNDkyIDkuNzA0ODMgMjAuODU0OCA5LjgyODEyQzIwLjY2MDUgOS45NTE0MSAyMC40MDcxIDkuOTI2MSAyMC4yNDA5IDkuNzY2OEMxOS4wMzA1IDguNjA2MTcgMTcuNDQ2OSA3LjU5NTYxIDE1LjU5OTIgNi44NjU0MkwxNS41NzQ0IDYuOTY1MTNDMTUuNTQyMyA3LjA5MzggMTUuNDYwNCA3LjIwNDQ2IDE1LjM0NjcgNy4yNzI3NkMxNS4yMzMxIDcuMzQxMDYgMTUuMDk2OSA3LjM2MTQgMTQuOTY4MyA3LjMyOTMyTDE0LjQ4MzEgNy4yMDgzNkwxMy41NzU5IDEwLjg0N0MxMy44NDM5IDEwLjkxMzggMTQuMDA2OSAxMS4xODUxIDEzLjk0MDEgMTEuNDUzMUwxMS42NDE4IDIwLjY3MDlDMTEuNjA5OCAyMC43OTk2IDExLjUyNzkgMjAuOTEwMiAxMS40MTQyIDIwLjk3ODVDMTEuMzAwNSAyMS4wNDY4IDExLjE2NDQgMjEuMDY3MiAxMS4wMzU3IDIxLjAzNTFMOC42MDk5OSAyMC40MzAzQzguMzQyMDUgMjAuMzYzNSA4LjE3OSAyMC4wOTIxIDguMjQ1ODEgMTkuODI0MkwxMC41NDQxIDEwLjYwNjRDMTAuNTc2MSAxMC40Nzc3IDEwLjY1OCAxMC4zNjcgMTAuNzcxNyAxMC4yOTg3QzEwLjg4NTQgMTAuMjMwNCAxMS4wMjE1IDEwLjIxMDEgMTEuMTUwMiAxMC4yNDIyTDEyLjA1NzQgNi42MDM1NkwxMS41NzIyIDYuNDgyNTlDMTEuMzA0MyA2LjQxNTc5IDExLjE0MTIgNi4xNDQ0MyAxMS4yMDggNS44NzY0OUwxMS4yMzI5IDUuNzc2NzhDOS4yNTg2NiA1LjU1NDA2IDcuMzg1OTggNS43MDI4OCA1Ljc3MjM3IDYuMTU5NDNDNS41NTA5IDYuMjIyMDkgNS4zMTUyNyA2LjEyNTQ3IDUuMjAxNTUgNS45MjUzN0M1LjA4NzgyIDUuNzI1MjcgNS4xMjUzOSA1LjQ3MzM5IDUuMjkyNTUgNS4zMTUxOEM2Ljg2NDc4IDMuODI3MTMgOS4yNzU0OCAzLjA0MzMyIDExLjg4MjYgMy4xNzU2MkMxMS45MTk2IDMuMDYwOTEgMTEuOTk3IDIuOTYzMDIgMTIuMTAxIDIuOTAwNTVaIiBmaWxsPSIjYjRiNGI0Ij48L3BhdGg+IDwvc3ZnPg=='"
|
||||
[alt]="'Logo of ' + pool.name + ' mining pool'"
|
||||
>
|
||||
@@ -1,6 +0,0 @@
|
||||
.pool-logo {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
opacity: 0;
|
||||
color: transparent;
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
import { Component, ElementRef, Input, OnChanges, SimpleChanges, ViewChild } from '@angular/core';
|
||||
import { nextTick } from 'process';
|
||||
|
||||
@Component({
|
||||
selector: 'app-pool-logo',
|
||||
templateUrl: './pool-logo.component.html',
|
||||
styleUrls: ['./pool-logo.component.scss']
|
||||
})
|
||||
export class PoolLogoComponent implements OnChanges{
|
||||
@Input() pool: { slug: string, name: string };
|
||||
@Input() width: number = 15;
|
||||
@Input() height: number = 15;
|
||||
|
||||
@ViewChild('poolImg') img: ElementRef<HTMLImageElement>;
|
||||
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
if (changes.pool) {
|
||||
if (this.img?.nativeElement) {
|
||||
this.img.nativeElement.style.opacity = '0';
|
||||
setTimeout(() => {
|
||||
this.img.nativeElement.style.opacity = '1';
|
||||
}, 50);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -88,7 +88,6 @@ import { BtcComponent } from './components/btc/btc.component';
|
||||
import { FeeRateComponent } from './components/fee-rate/fee-rate.component';
|
||||
import { AddressTypeComponent } from './components/address-type/address-type.component';
|
||||
import { TruncateComponent } from './components/truncate/truncate.component';
|
||||
import { PoolLogoComponent } from './components/pool-logo/pool-logo.component';
|
||||
import { SearchResultsComponent } from '../components/search-form/search-results/search-results.component';
|
||||
import { TimestampComponent } from './components/timestamp/timestamp.component';
|
||||
import { ConfirmationsComponent } from './components/confirmations/confirmations.component';
|
||||
@@ -202,7 +201,6 @@ import { OnlyVsizeDirective, OnlyWeightDirective } from './components/weight-dir
|
||||
FeeRateComponent,
|
||||
AddressTypeComponent,
|
||||
TruncateComponent,
|
||||
PoolLogoComponent,
|
||||
SearchResultsComponent,
|
||||
TimestampComponent,
|
||||
ConfirmationsComponent,
|
||||
@@ -342,7 +340,6 @@ import { OnlyVsizeDirective, OnlyWeightDirective } from './components/weight-dir
|
||||
FeeRateComponent,
|
||||
AddressTypeComponent,
|
||||
TruncateComponent,
|
||||
PoolLogoComponent,
|
||||
SearchResultsComponent,
|
||||
TimestampComponent,
|
||||
ConfirmationsComponent,
|
||||
|
||||
Reference in New Issue
Block a user