[square] use mirror to serve square.js and load it sooner
This commit is contained in:
parent
067aac4d06
commit
9488ca50a3
@ -204,6 +204,7 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
|
|||||||
this.fetchEstimate();
|
this.fetchEstimate();
|
||||||
}
|
}
|
||||||
if (this._step === 'checkout') {
|
if (this._step === 'checkout') {
|
||||||
|
this.insertSquare();
|
||||||
this.enterpriseService.goal(8);
|
this.enterpriseService.goal(8);
|
||||||
}
|
}
|
||||||
if (this._step === 'checkout' && this.canPayWithBitcoin) {
|
if (this._step === 'checkout' && this.canPayWithBitcoin) {
|
||||||
@ -213,17 +214,14 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
|
|||||||
this.requestBTCPayInvoice();
|
this.requestBTCPayInvoice();
|
||||||
} else if (this._step === 'cashapp' && this.cashappEnabled) {
|
} else if (this._step === 'cashapp' && this.cashappEnabled) {
|
||||||
this.loadingCashapp = true;
|
this.loadingCashapp = true;
|
||||||
this.insertSquare();
|
|
||||||
this.setupSquare();
|
this.setupSquare();
|
||||||
this.scrollToElementWithTimeout('confirm-title', 'center', 100);
|
this.scrollToElementWithTimeout('confirm-title', 'center', 100);
|
||||||
} else if (this._step === 'applepay' && this.applePayEnabled) {
|
} else if (this._step === 'applepay' && this.applePayEnabled) {
|
||||||
this.loadingApplePay = true;
|
this.loadingApplePay = true;
|
||||||
this.insertSquare();
|
|
||||||
this.setupSquare();
|
this.setupSquare();
|
||||||
this.scrollToElementWithTimeout('confirm-title', 'center', 100);
|
this.scrollToElementWithTimeout('confirm-title', 'center', 100);
|
||||||
} else if (this._step === 'googlepay' && this.googlePayEnabled) {
|
} else if (this._step === 'googlepay' && this.googlePayEnabled) {
|
||||||
this.loadingGooglePay = true;
|
this.loadingGooglePay = true;
|
||||||
this.insertSquare();
|
|
||||||
this.setupSquare();
|
this.setupSquare();
|
||||||
this.scrollToElementWithTimeout('confirm-title', 'center', 100);
|
this.scrollToElementWithTimeout('confirm-title', 'center', 100);
|
||||||
} else if (this._step === 'paid') {
|
} else if (this._step === 'paid') {
|
||||||
@ -409,7 +407,7 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
|
|||||||
document.location.hostname === 'mempool-staging.fra.mempool.space' ||
|
document.location.hostname === 'mempool-staging.fra.mempool.space' ||
|
||||||
document.location.hostname === 'mempool-staging.tk7.mempool.space' ||
|
document.location.hostname === 'mempool-staging.tk7.mempool.space' ||
|
||||||
document.location.hostname === 'mempool.space') {
|
document.location.hostname === 'mempool.space') {
|
||||||
statsUrl = 'https://web.squarecdn.com/v1/square.js';
|
statsUrl = '/square/v1/square/js';
|
||||||
}
|
}
|
||||||
|
|
||||||
(function(): void {
|
(function(): void {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user