Compare commits
19 Commits
v3.0.0-alp
...
v3.0.0-alp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5eb117165f | ||
|
|
a2dcf0d545 | ||
|
|
212d58f917 | ||
|
|
d1eec80afb | ||
|
|
05c6709926 | ||
|
|
f1a48db9ee | ||
|
|
76ce43d289 | ||
|
|
51f5b728f3 | ||
|
|
8fa1863aff | ||
|
|
e3d1d9c1c0 | ||
|
|
f2f8d91e10 | ||
|
|
11ef090846 | ||
|
|
5cacd2635e | ||
|
|
1b4780c25b | ||
|
|
5ea44f2e7d | ||
|
|
261c794817 | ||
|
|
de9fae5cd7 | ||
|
|
439c52af30 | ||
|
|
e378df4158 |
@@ -470,7 +470,7 @@ class MiningRoutes {
|
|||||||
res.setHeader('expires', -1);
|
res.setHeader('expires', -1);
|
||||||
try {
|
try {
|
||||||
accelerationApi.accelerationRequested(req.params.txid);
|
accelerationApi.accelerationRequested(req.params.txid);
|
||||||
res.status(200).send('ok');
|
res.status(200).send();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
res.status(500).send(e instanceof Error ? e.message : e);
|
res.status(500).send(e instanceof Error ? e.message : e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import { MiningStats } from '../../services/mining.service';
|
|||||||
import { IAuth, AuthServiceMempool } from '../../services/auth.service';
|
import { IAuth, AuthServiceMempool } from '../../services/auth.service';
|
||||||
import { EnterpriseService } from '../../services/enterprise.service';
|
import { EnterpriseService } from '../../services/enterprise.service';
|
||||||
import { ApiService } from '../../services/api.service';
|
import { ApiService } from '../../services/api.service';
|
||||||
|
import { isDevMode } from '@angular/core';
|
||||||
|
|
||||||
export type PaymentMethod = 'balance' | 'bitcoin' | 'cashapp' | 'applePay' | 'googlePay';
|
export type PaymentMethod = 'balance' | 'bitcoin' | 'cashapp' | 'applePay' | 'googlePay';
|
||||||
|
|
||||||
@@ -82,6 +83,13 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
|
|||||||
timePaid: number = 0; // time acceleration requested
|
timePaid: number = 0; // time acceleration requested
|
||||||
math = Math;
|
math = Math;
|
||||||
isMobile: boolean = window.innerWidth <= 767.98;
|
isMobile: boolean = window.innerWidth <= 767.98;
|
||||||
|
isProdDomain = ['mempool.space',
|
||||||
|
'mempool-staging.va1.mempool.space',
|
||||||
|
'mempool-staging.fmt.mempool.space',
|
||||||
|
'mempool-staging.fra.mempool.space',
|
||||||
|
'mempool-staging.tk7.mempool.space',
|
||||||
|
'mempool-staging.sg1.mempool.space'
|
||||||
|
].indexOf(document.location.hostname) > -1;
|
||||||
|
|
||||||
private _step: CheckoutStep = 'summary';
|
private _step: CheckoutStep = 'summary';
|
||||||
simpleMode: boolean = true;
|
simpleMode: boolean = true;
|
||||||
@@ -398,15 +406,14 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
|
|||||||
* Square
|
* Square
|
||||||
*/
|
*/
|
||||||
insertSquare(): void {
|
insertSquare(): void {
|
||||||
|
if (!this.isProdDomain && !isDevMode()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (window['Square']) {
|
if (window['Square']) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let statsUrl = 'https://sandbox.web.squarecdn.com/v1/square.js';
|
let statsUrl = 'https://sandbox.web.squarecdn.com/v1/square.js';
|
||||||
if (document.location.hostname === 'mempool-staging.fmt.mempool.space' ||
|
if (this.isProdDomain) {
|
||||||
document.location.hostname === 'mempool-staging.va1.mempool.space' ||
|
|
||||||
document.location.hostname === 'mempool-staging.fra.mempool.space' ||
|
|
||||||
document.location.hostname === 'mempool-staging.tk7.mempool.space' ||
|
|
||||||
document.location.hostname === 'mempool.space') {
|
|
||||||
statsUrl = '/square/v1/square.js';
|
statsUrl = '/square/v1/square.js';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -416,6 +423,9 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
|
|||||||
})();
|
})();
|
||||||
}
|
}
|
||||||
setupSquare(): void {
|
setupSquare(): void {
|
||||||
|
if (!this.isProdDomain && !isDevMode()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const init = (): void => {
|
const init = (): void => {
|
||||||
this.initSquare();
|
this.initSquare();
|
||||||
};
|
};
|
||||||
@@ -654,11 +664,11 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
|
|||||||
amount: costUSD.toFixed(2),
|
amount: costUSD.toFixed(2),
|
||||||
label: 'Total',
|
label: 'Total',
|
||||||
pending: true,
|
pending: true,
|
||||||
productUrl: `${redirectHostname}/tracker/${this.tx.txid}`,
|
productUrl: `${redirectHostname}/tx/${this.tx.txid}`,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.cashAppPay = await this.payments.cashAppPay(paymentRequest, {
|
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)}`
|
referenceId: `accelerator-${this.tx.txid.substring(0, 15)}-${Math.round(new Date().getTime() / 1000)}`
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -795,7 +805,7 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get canPayWithCashapp(): boolean {
|
get canPayWithCashapp(): boolean {
|
||||||
if (!this.cashappEnabled || !this.conversions) {
|
if (!this.cashappEnabled || !this.conversions || (!this.isProdDomain && !isDevMode())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -811,7 +821,7 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get canPayWithApplePay(): boolean {
|
get canPayWithApplePay(): boolean {
|
||||||
if (!this.applePayEnabled || !this.conversions) {
|
if (!this.applePayEnabled || !this.conversions || (!this.isProdDomain && !isDevMode())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -827,7 +837,7 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get canPayWithGooglePay(): boolean {
|
get canPayWithGooglePay(): boolean {
|
||||||
if (!this.googlePayEnabled || !this.conversions) {
|
if (!this.googlePayEnabled || !this.conversions || (!this.isProdDomain && !isDevMode())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<span class="explainer"> </span>
|
<span class="explainer"> </span>
|
||||||
} @else {
|
} @else {
|
||||||
@if (!tx.status?.confirmed && showAccelerationSummary) {
|
@if (tx && !tx.status?.confirmed && showAccelerationSummary) {
|
||||||
<ng-container *ngIf="(ETA$ | async) as eta;">
|
<ng-container *ngIf="(ETA$ | async) as eta;">
|
||||||
<app-accelerate-checkout
|
<app-accelerate-checkout
|
||||||
*ngIf="(da$ | async) as da;"
|
*ngIf="(da$ | async) as da;"
|
||||||
@@ -135,7 +135,7 @@
|
|||||||
></app-accelerate-checkout>
|
></app-accelerate-checkout>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
}
|
}
|
||||||
<div class="status-panel d-flex flex-column h-100 w-100 justify-content-center align-items-center" [class.small-status]="!tx.status?.confirmed && showAccelerationSummary">
|
<div class="status-panel d-flex flex-column h-100 w-100 justify-content-center align-items-center" [class.small-status]="tx && !tx.status?.confirmed && showAccelerationSummary">
|
||||||
@if (tx?.acceleration && !tx.status?.confirmed) {
|
@if (tx?.acceleration && !tx.status?.confirmed) {
|
||||||
<div class="progress-icon">
|
<div class="progress-icon">
|
||||||
<fa-icon [icon]="['fas', 'wand-magic-sparkles']" [fixedWidth]="true"></fa-icon>
|
<fa-icon [icon]="['fas', 'wand-magic-sparkles']" [fixedWidth]="true"></fa-icon>
|
||||||
@@ -186,7 +186,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="footer-link"
|
<div class="footer-link"
|
||||||
[routerLink]="['/tx' | relativeUrl, tx?.txid]"
|
[routerLink]="['/tx' | relativeUrl, tx?.txid || txId]"
|
||||||
[queryParams]="{ mode: 'details' }"
|
[queryParams]="{ mode: 'details' }"
|
||||||
queryParamsHandling="merge"
|
queryParamsHandling="merge"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -606,7 +606,14 @@
|
|||||||
@if (!isLoadingTx) {
|
@if (!isLoadingTx) {
|
||||||
<tr>
|
<tr>
|
||||||
<td class="td-width" i18n="transaction.fee|Transaction fee">Fee</td>
|
<td class="td-width" i18n="transaction.fee|Transaction fee">Fee</td>
|
||||||
<td>{{ tx.fee | number }} <span class="symbol" i18n="shared.sat|sat">sat</span> <span class="fiat"><app-fiat [blockConversion]="tx.price" [value]="tx.fee"></app-fiat></span></td>
|
<td>{{ tx.fee | number }} <span class="symbol" i18n="shared.sat|sat">sat</span>
|
||||||
|
@if (accelerationInfo?.bidBoost) {
|
||||||
|
<span class="oobFees"> +{{ accelerationInfo.bidBoost | number }} </span><span class="symbol" i18n="shared.sat|sat">sat</span>
|
||||||
|
} @else if (tx.feeDelta) {
|
||||||
|
<span class="oobFees"> +{{ tx.feeDelta | number }} </span><span class="symbol" i18n="shared.sat|sat">sat</span>
|
||||||
|
}
|
||||||
|
<span class="fiat"><app-fiat [blockConversion]="tx.price" [value]="tx.fee + (accelerationInfo?.bidBoost || tx.feeDelta || 0)"></app-fiat></span>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
} @else {
|
} @else {
|
||||||
<ng-container *ngTemplateOutlet="skeletonDetailsRow"></ng-container>
|
<ng-container *ngTemplateOutlet="skeletonDetailsRow"></ng-container>
|
||||||
|
|||||||
@@ -332,3 +332,7 @@
|
|||||||
top: -1px;
|
top: -1px;
|
||||||
margin-right: 2px;
|
margin-right: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.oobFees {
|
||||||
|
color: #905cf4;
|
||||||
|
}
|
||||||
@@ -30,7 +30,6 @@ export class EnterpriseService {
|
|||||||
this.fetchSubdomainInfo();
|
this.fetchSubdomainInfo();
|
||||||
this.disableSubnetworks();
|
this.disableSubnetworks();
|
||||||
this.stateService.env.ACCELERATOR = false;
|
this.stateService.env.ACCELERATOR = false;
|
||||||
this.stateService.env.ACCELERATOR_BUTTON = false;
|
|
||||||
} else {
|
} else {
|
||||||
this.insertMatomo();
|
this.insertMatomo();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 } => {
|
this.liveMempoolBlockTransactions$ = this.mempoolBlockUpdate$.pipe(scan((transactions: { [txid: string]: TransactionStripped }, change: MempoolBlockUpdate): { [txid: string]: TransactionStripped } => {
|
||||||
if (isMempoolState(change)) {
|
if (isMempoolState(change)) {
|
||||||
const txMap = {};
|
const txMap = {};
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<span class="truncate" [style.max-width]="maxWidth ? maxWidth + 'px' : null" [style.justify-content]="textAlign" [class.inline]="inline">
|
<span class="truncate" [style.max-width]="maxWidth ? maxWidth + 'px' : null" [style.justify-content]="textAlign" [class.inline]="inline">
|
||||||
<ng-container *ngIf="link">
|
<ng-container *ngIf="link">
|
||||||
<a [routerLink]="link" class="truncate-link" [target]="external ? '_blank' : ''">
|
<a [routerLink]="link" class="truncate-link" [target]="external ? '_blank' : '_self'">
|
||||||
<ng-container *ngIf="rtl; then rtlTruncated; else ltrTruncated;"></ng-container>
|
<ng-container *ngIf="rtl; then rtlTruncated; else ltrTruncated;"></ng-container>
|
||||||
</a>
|
</a>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|||||||
@@ -1792,6 +1792,7 @@
|
|||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="a7c328c4773db932ff14a1954e15e43dca58e7b7" datatype="html">
|
<trans-unit id="a7c328c4773db932ff14a1954e15e43dca58e7b7" datatype="html">
|
||||||
<source>Completed</source>
|
<source>Completed</source>
|
||||||
|
<target>Fullført</target>
|
||||||
<context-group purpose="location">
|
<context-group purpose="location">
|
||||||
<context context-type="sourcefile">src/app/components/acceleration/accelerations-list/accelerations-list.component.html</context>
|
<context context-type="sourcefile">src/app/components/acceleration/accelerations-list/accelerations-list.component.html</context>
|
||||||
<context context-type="linenumber">65</context>
|
<context context-type="linenumber">65</context>
|
||||||
@@ -1800,6 +1801,7 @@
|
|||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="64b582e0d8e3a28331a14d2a1017fa5d6ffb8d93" datatype="html">
|
<trans-unit id="64b582e0d8e3a28331a14d2a1017fa5d6ffb8d93" datatype="html">
|
||||||
<source>Failed</source>
|
<source>Failed</source>
|
||||||
|
<target>Mislyktes</target>
|
||||||
<context-group purpose="location">
|
<context-group purpose="location">
|
||||||
<context context-type="sourcefile">src/app/components/acceleration/accelerations-list/accelerations-list.component.html</context>
|
<context context-type="sourcefile">src/app/components/acceleration/accelerations-list/accelerations-list.component.html</context>
|
||||||
<context context-type="linenumber">67</context>
|
<context context-type="linenumber">67</context>
|
||||||
|
|||||||
@@ -1393,6 +1393,7 @@
|
|||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="c3aaae1073e33c932a5c98f98c3520645c0e3a93" datatype="html">
|
<trans-unit id="c3aaae1073e33c932a5c98f98c3520645c0e3a93" datatype="html">
|
||||||
<source>Out-of-band fees</source>
|
<source>Out-of-band fees</source>
|
||||||
|
<target>Opłaty poza mempoolem</target>
|
||||||
<context-group purpose="location">
|
<context-group purpose="location">
|
||||||
<context context-type="sourcefile">src/app/components/acceleration-timeline/acceleration-timeline-tooltip.component.html</context>
|
<context context-type="sourcefile">src/app/components/acceleration-timeline/acceleration-timeline-tooltip.component.html</context>
|
||||||
<context context-type="linenumber">27</context>
|
<context context-type="linenumber">27</context>
|
||||||
@@ -1792,6 +1793,7 @@
|
|||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="a7c328c4773db932ff14a1954e15e43dca58e7b7" datatype="html">
|
<trans-unit id="a7c328c4773db932ff14a1954e15e43dca58e7b7" datatype="html">
|
||||||
<source>Completed</source>
|
<source>Completed</source>
|
||||||
|
<target>Ukończone</target>
|
||||||
<context-group purpose="location">
|
<context-group purpose="location">
|
||||||
<context context-type="sourcefile">src/app/components/acceleration/accelerations-list/accelerations-list.component.html</context>
|
<context context-type="sourcefile">src/app/components/acceleration/accelerations-list/accelerations-list.component.html</context>
|
||||||
<context context-type="linenumber">65</context>
|
<context context-type="linenumber">65</context>
|
||||||
@@ -1800,6 +1802,7 @@
|
|||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="64b582e0d8e3a28331a14d2a1017fa5d6ffb8d93" datatype="html">
|
<trans-unit id="64b582e0d8e3a28331a14d2a1017fa5d6ffb8d93" datatype="html">
|
||||||
<source>Failed</source>
|
<source>Failed</source>
|
||||||
|
<target>Nieudane</target>
|
||||||
<context-group purpose="location">
|
<context-group purpose="location">
|
||||||
<context context-type="sourcefile">src/app/components/acceleration/accelerations-list/accelerations-list.component.html</context>
|
<context context-type="sourcefile">src/app/components/acceleration/accelerations-list/accelerations-list.component.html</context>
|
||||||
<context context-type="linenumber">67</context>
|
<context context-type="linenumber">67</context>
|
||||||
|
|||||||
Reference in New Issue
Block a user