From 7035e1edbc3718019533ada8b0963706cca94ea6 Mon Sep 17 00:00:00 2001 From: Philipp Stracker Date: Wed, 26 Feb 2025 16:34:28 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Correctly=20annotate=20promise?= =?UTF-8?q?=20return=20values?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/ppcp-googlepay/resources/js/GooglepayButton.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/ppcp-googlepay/resources/js/GooglepayButton.js b/modules/ppcp-googlepay/resources/js/GooglepayButton.js index f983febb4..51ea2a450 100644 --- a/modules/ppcp-googlepay/resources/js/GooglepayButton.js +++ b/modules/ppcp-googlepay/resources/js/GooglepayButton.js @@ -535,7 +535,7 @@ class GooglepayButton extends PaymentButton { onButtonClick() { this.log( 'onButtonClick' ); - const initiatePaymentRequest = () => { + const initiatePaymentRequest = async () => { window.ppcpFundingSource = 'googlepay'; const paymentDataRequest = this.paymentDataRequest(); @@ -548,7 +548,7 @@ class GooglepayButton extends PaymentButton { return this.paymentsClient.loadPaymentData( paymentDataRequest ); }; - const validateForm = () => { + const validateForm = async () => { if ( 'function' !== typeof this.contextHandler.validateForm ) { return Promise.resolve(); } @@ -559,7 +559,7 @@ class GooglepayButton extends PaymentButton { } ); }; - const getTransactionInfo = () => { + const getTransactionInfo = async () => { if ( 'function' !== typeof this.contextHandler.transactionInfo ) { return Promise.resolve(); }