From 557e048dd89e3e1223ee613b2fc2ba4c0cb7c439 Mon Sep 17 00:00:00 2001 From: Matt Solomon Date: Mon, 30 Nov 2020 14:22:59 -0800 Subject: [PATCH] Bump zksync version, prevent user from clicking standard checkout button twice --- app/assets/v2/js/cart.js | 3 +++ app/grants/templates/grants/cart-vue.html | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/assets/v2/js/cart.js b/app/assets/v2/js/cart.js index 722f2870ab3..32677f9943c 100644 --- a/app/assets/v2/js/cart.js +++ b/app/assets/v2/js/cart.js @@ -55,6 +55,7 @@ Vue.component('grants-cart', { include_for_clr: true, windowWidth: window.innerWidth, userAddress: undefined, + isCheckoutOngoing: false, // true once user clicks "Standard checkout" button // Checkout, zkSync zkSyncUnsupportedTokens: [], // Used to inform user which tokens in their cart are not on zkSync zkSyncEstimatedGasCost: undefined, // Used to tell user which checkout method is cheaper @@ -538,6 +539,7 @@ Vue.component('grants-cart', { message = err; _alert(message, 'error'); + this.isCheckoutOngoing = false; indicateMetamaskPopup(true); }, @@ -764,6 +766,7 @@ Vue.component('grants-cart', { async standardCheckout() { try { // Setup ----------------------------------------------------------------------------------- + this.isCheckoutOngoing = true; const userAddress = await this.initializeStandardCheckout(); // Token approvals and balance checks (just checks data, does not execute approavals) diff --git a/app/grants/templates/grants/cart-vue.html b/app/grants/templates/grants/cart-vue.html index 5786e7a8aa7..74528de24ca 100644 --- a/app/grants/templates/grants/cart-vue.html +++ b/app/grants/templates/grants/cart-vue.html @@ -491,7 +491,7 @@

Pay with zkSync

{% comment %} End HTML Template for cart-ethereum-zksync.js {% endcomment %}
-
@@ -749,7 +749,7 @@

or

{% comment %} ===================== START ZKSYNC SCRIPTS ====================== {% endcomment %} - + {% comment %} ====================== END ZKSYNC SCRIPTS ======================= {% endcomment %}