🎨 Correctly annotate promise return values

This commit is contained in:
Philipp Stracker 2025-02-26 16:34:28 +01:00
parent 4c10d84d24
commit 7035e1edbc
No known key found for this signature in database

View file

@ -535,7 +535,7 @@ class GooglepayButton extends PaymentButton {
onButtonClick() { onButtonClick() {
this.log( 'onButtonClick' ); this.log( 'onButtonClick' );
const initiatePaymentRequest = () => { const initiatePaymentRequest = async () => {
window.ppcpFundingSource = 'googlepay'; window.ppcpFundingSource = 'googlepay';
const paymentDataRequest = this.paymentDataRequest(); const paymentDataRequest = this.paymentDataRequest();
@ -548,7 +548,7 @@ class GooglepayButton extends PaymentButton {
return this.paymentsClient.loadPaymentData( paymentDataRequest ); return this.paymentsClient.loadPaymentData( paymentDataRequest );
}; };
const validateForm = () => { const validateForm = async () => {
if ( 'function' !== typeof this.contextHandler.validateForm ) { if ( 'function' !== typeof this.contextHandler.validateForm ) {
return Promise.resolve(); return Promise.resolve();
} }
@ -559,7 +559,7 @@ class GooglepayButton extends PaymentButton {
} ); } );
}; };
const getTransactionInfo = () => { const getTransactionInfo = async () => {
if ( 'function' !== typeof this.contextHandler.transactionInfo ) { if ( 'function' !== typeof this.contextHandler.transactionInfo ) {
return Promise.resolve(); return Promise.resolve();
} }