2024-06-27 02:02:35 +00:00
< div class = "box card w-100" style = "padding: 1em; background: var(--box-bg)" id = acceleratePreviewAnchor >
2024-04-13 16:11:49 +09:00
2024-04-13 23:07:19 +09:00
@if (error) {
2024-04-14 16:29:56 +09:00
< div class = "mt-2" >
< app-mempool-error [ error ]=" error " ></ app-mempool-error >
</ div >
}
2024-04-13 16:11:49 +09:00
2024-04-14 16:29:56 +09:00
@else if (step === 'cta') {
<!-- Show A/B CTAs -->
2024-04-16 16:01:52 +09:00
< div class = "row mb-1" >
2024-04-14 16:29:56 +09:00
< div class = "col-sm" >
2024-06-27 02:02:35 +00:00
< h1 style = "font-size: larger;" >< ng-content select = "[slot='cta-title']" ></ ng-content >< span class = "default-slot" > Accelerate your Bitcoin transaction?</ span ></ h1 >
2024-04-13 20:53:19 +09:00
</ div >
2024-04-14 16:29:56 +09:00
</ div >
2024-04-13 23:07:19 +09:00
2024-04-14 16:29:56 +09:00
< form >
2024-06-27 06:09:23 +00:00
< div class = "row" >
2024-06-27 02:02:35 +00:00
< div class = "col-md" >
< div class = "form-group form-check mb-2" >
2024-06-27 06:42:31 +00:00
< input type = "radio" [ checked ]=" choosenOption = == ' wait '" class = "form-check-input" id = "wait" name = "accel" ( change )=" selectedOptionChanged ($ event )" >
2024-06-27 02:02:35 +00:00
< label class = "form-check-label d-flex flex-column" for = "wait" >
< span class = "font-weight-bold" > Wait</ span >
@if (eta.blocks < 7 ) {
< span style = "color: rgb(186, 186, 186); font-size: 14px;" > Confirmation expected < app-time kind = "within" [ time ]=" eta . time " [ fastRender ]=" false " [ fixedRender ]=" true " ></ app-time ></ span >
} @else {
< span style = "color: rgb(186, 186, 186); font-size: 14px;" >
< span > Confirmation expected within several hours</ span >
</ span >
}
</ label >
</ div >
</ div >
< div class = "col-md" >
2024-04-16 16:01:52 +09:00
< div class = "form-group form-check mb-2" >
2024-06-27 06:42:31 +00:00
< input type = "radio" [ checked ]=" choosenOption = == ' accel '" class = "form-check-input" id = "accel" name = "accel" ( change )=" selectedOptionChanged ($ event )" >
< label class = "form-check-label d-flex flex-column" for = "accel" >
2024-04-14 16:29:56 +09:00
< span class = "font-weight-bold" > Accelerate</ span >
2024-06-27 06:09:23 +00:00
< span style = "color: rgb(186, 186, 186); font-size: 14px;" * ngIf = "(etaInfo$ | async) as etaInfo" > Confirmation expected < app-time kind = "within" [ time ]=" etaInfo . acceleratedETA " [ fastRender ]=" false " [ fixedRender ]=" true " ></ app-time >< br >
2024-04-14 16:29:56 +09:00
@if (!calculating) {
2024-04-28 09:43:35 +07:00
< app-fiat [ value ]=" cost " ></ app-fiat > fee (< span >< small style = "font-family: monospace;" > {{ cost | number }}</ small > < span class = "symbol" i18n = "shared.sats" > sats</ span ></ span > )
2024-04-14 16:29:56 +09:00
} @else {
< span class = "estimating" > Calculating cost...</ span >
}
</ span >
</ label >
2024-04-13 23:07:19 +09:00
</ div >
</ div >
2024-06-27 02:02:35 +00:00
< div class = "col-md pie d-none d-lg-flex" * ngIf = "estimate && !isTracker" >
2024-06-27 06:09:23 +00:00
< small class = "form-text text-muted mb-2" i18n = "accelerator.hashrate-percentage-description" * ngIf = "(etaInfo$ | async) as etaInfo" > Your transaction will be prioritized by up to {{ etaInfo.hashratePercentage | number : '1.1-1' }}% of miners.</ small >
2024-06-27 02:02:35 +00:00
< app-active-acceleration-box [ miningStats ]=" miningStats " [ pools ]=" estimate . pools " [ chartOnly ]=" true " ></ app-active-acceleration-box >
2024-04-13 23:07:19 +09:00
</ div >
2024-04-14 16:29:56 +09:00
</ div >
2024-06-27 06:42:31 +00:00
< div class = "row mt-2 mb-2" [ style ]="( choosenOption !== ' accel ' || calculating ) ? ' opacity: 0 . 25 ; pointer-events: none ' : ''" >
2024-04-14 16:29:56 +09:00
< div class = "col-sm d-flex flex-row justify-content-center" >
2024-04-16 16:01:52 +09:00
< button type = "button" class = "mt-1 btn btn-purple rounded-pill align-self-center d-flex flex-row justify-content-center align-items-center" style = "width: 200px" ( click )=" enableCheckoutPage ()" >
< img src = "/resources/mempool-accelerator-sparkles-light.svg" height = "20" class = "mr-2" style = "margin-left: -10px" >
2024-04-14 16:29:56 +09:00
< span > Accelerate</ span >
</ button >
2024-04-13 23:07:19 +09:00
</ div >
2024-04-14 16:29:56 +09:00
</ div >
</ form >
2024-06-26 18:35:36 +09:00
} @else if (step === 'paymentMethod') {
2024-06-27 06:09:23 +00:00
< div class = "row text-center" >
2024-04-14 16:29:56 +09:00
< div class = "col-sm" >
2024-06-27 06:09:23 +00:00
< h1 class = "mb-2" style = "font-size: larger;" >< ng-content select = "[slot='payment-title']" ></ ng-content >< span class = "default-slot" > Select your payment method</ span ></ h1 >
2024-06-26 18:35:36 +09:00
</ div >
</ div >
2024-06-27 06:09:23 +00:00
< div class = "row text-center" >
< div class = "col-sm" >
< app-fiat [ value ]=" cost " ></ app-fiat > (< span >< small style = "font-family: monospace;" > {{ cost | number }}</ small > < span class = "symbol" i18n = "shared.sats" > sats</ span ></ span > )
</ div >
</ div >
< div class = "pt-2 d-flex justify-content-center position-relative" >
2024-06-26 18:35:36 +09:00
@if (cashappEnabled) {
2024-06-27 06:09:23 +00:00
< img class = "paymentMethod mx-2" src = "/resources/cash-app.svg" height = 55 ( click )=" selectPaymentMethod (' cashapp ')" >
2024-06-26 18:35:36 +09:00
}
2024-06-27 06:09:23 +00:00
< img class = "paymentMethod mx-2" src = "/resources/btcpay.svg" height = 55 ( click )=" selectPaymentMethod (' btcpay ')" >
</ div >
< hr >
< div class = "row mt-2 mb-2 text-center" >
< div class = "col-sm d-flex flex-column" >
< button type = "button" class = "mt-1 btn btn-secondary btn-sm rounded-pill align-self-center" style = "width: 200px" ( click )=" step = 'cta' " > Go Back</ button >
</ div >
2024-06-26 18:35:36 +09:00
</ div >
} @else if (step === 'checkout') {
<!-- Show checkout page -->
< div class = "row mb-md-1 text-center" >
< div class = "col-sm" id = "confirm-payment-title" >
2024-06-27 02:02:35 +00:00
< h1 style = "font-size: larger;" >< ng-content select = "[slot='checkout-title']" ></ ng-content >< span class = "default-slot" > Confirm your payment</ span ></ h1 >
2024-04-13 20:53:19 +09:00
</ div >
2024-04-14 16:29:56 +09:00
</ div >
2024-04-13 20:53:19 +09:00
2024-04-14 16:29:56 +09:00
< div class = "row text-center" >
< div class = "col-sm" >
2024-04-16 16:01:52 +09:00
< div class = "form-group w-100" style = "font-size: 14px" >
2024-06-27 02:02:35 +00:00
Payment to mempool.space for acceleration of txid < a [ routerLink ]="'/ tx /' + tx . txid " target = "_blank" > {{ tx.txid.substr(0, 10) }}..{{ tx.txid.substr(-10) }}</ a >
2024-04-13 16:11:49 +09:00
</ div >
</ div >
2024-04-14 16:29:56 +09:00
</ div >
2024-04-13 20:53:19 +09:00
2024-06-26 18:35:36 +09:00
@if (paymentMethod === 'cashapp') {
@if (!loadingCashapp) {
< div class = "row text-center mt-1" >
< div class = "col-sm" >
< div class = "form-group w-100" >
< span >< u >< strong > Total additional cost</ strong ></ u >< br >
< span style = "font-size: 16px" class = "d-block mt-2" >
Pay
< strong >< app-fiat [ value ]=" cost " ></ app-fiat ></ strong >
with
</ span >
2024-04-14 16:29:56 +09:00
</ span >
2024-06-26 18:35:36 +09:00
</ div >
2024-04-13 20:53:19 +09:00
</ div >
</ div >
2024-06-26 18:35:36 +09:00
}
2024-04-13 23:07:19 +09:00
2024-06-26 18:35:36 +09:00
< div class = "row text-center mt-1" >
< div class = "col-sm" >
< div class = "form-group w-100" >
< div id = "cash-app-pay" class = "d-inline-block" [ style ]=" loadingCashapp ? ' opacity: 0 ; width: 0px ; height: 0px ; pointer-events: none ;' : ''" ></ div >
@if (loadingCashapp) {
< div display = "d-flex flex-row justify-content-center" >
< span > Loading payment method...</ span >
< div class = "ml-2 spinner-border text-light" style = "width: 25px; height: 25px" ></ div >
</ div >
}
2024-04-14 16:29:56 +09:00
</ div >
2024-04-13 23:07:19 +09:00
</ div >
</ div >
2024-06-26 18:35:36 +09:00
} @else if (paymentMethod === 'btcpay' && invoice?.btcpayInvoiceId) {
< app-bitcoin-invoice [ invoiceId ]=" invoice . btcpayInvoiceId " ( completed )=" closeModal ( 2000 )" ></ app-bitcoin-invoice >
}
2024-04-13 20:53:19 +09:00
2024-04-14 16:29:56 +09:00
< hr >
< div class = "row mt-2 mb-2 text-center" >
< div class = "col-sm d-flex flex-column" >
2024-06-27 06:09:23 +00:00
< button type = "button" class = "mt-1 btn btn-secondary btn-sm rounded-pill align-self-center" style = "width: 200px" ( click )=" step = 'paymentMethod' " > Go Back</ button >
2024-04-13 16:11:49 +09:00
</ div >
2024-04-14 16:29:56 +09:00
</ div >
}
2024-04-13 20:53:19 +09:00
2024-04-14 16:29:56 +09:00
@else if (step === 'processing') {
2024-04-16 16:01:52 +09:00
< div class = "row mb-1 text-center" >
2024-04-14 16:29:56 +09:00
< div class = "col-sm" >
2024-06-27 02:02:35 +00:00
< h1 style = "font-size: larger;" >< ng-content select = "[slot='processing-title']" ></ ng-content >< span class = "default-slot" > Confirming your payment</ span ></ h1 >
2024-04-14 16:29:56 +09:00
</ div >
</ div >
2024-04-13 23:07:19 +09:00
2024-04-14 16:29:56 +09:00
< div class = "row text-center mt-1" >
< div class = "col-sm" >
< div class = "form-group w-100" >
<!-- Processing payment -->
< div id = "cash-app-pay" class = "d-inline-block" [ style ]="' opacity: 0 ; width: 0px ; height: 0px ; pointer-events: none ;'" ></ div >
< div display = "d-flex flex-row justify-content-center" >
< span > We are processing your payment...</ span >
< div class = "ml-2 spinner-border text-light" style = "width: 25px; height: 25px" ></ div >
2024-04-13 23:07:19 +09:00
</ div >
</ div >
2024-04-13 16:11:49 +09:00
</ div >
2024-04-14 16:29:56 +09:00
</ div >
2024-04-13 23:07:19 +09:00
}
2024-04-13 21:13:11 +09:00
</ div >