mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
🎨 Correctly annotate promise return values
This commit is contained in:
parent
4c10d84d24
commit
7035e1edbc
1 changed files with 3 additions and 3 deletions
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue