diff --git a/app/assets/v2/js/cart-ethereum-polygon.js b/app/assets/v2/js/cart-ethereum-polygon.js index ddf7e670e89..cbd29f4a9d5 100644 --- a/app/assets/v2/js/cart-ethereum-polygon.js +++ b/app/assets/v2/js/cart-ethereum-polygon.js @@ -182,13 +182,15 @@ Vue.component('grantsCartEthereumPolygon', { this.cart.unsupportedTokens = this.cart.tokenList.filter( (token) => !this.supportedTokens.includes(token) ); + if (this.cart.unsupportedTokens.length > 0) { + _alert(`Polygon checkout not supported due to the use of the token ${this.cart.unsupportedTokens[0]}`, 'danger'); + } // Update the fee estimate and gas cost based on changes this.polygon.estimatedGasCost = await this.estimateGasCost(); // Emit event so cart.js can update state accordingly to display info to user this.$emit('polygon-data-updated', { - polygonUnsupportedTokens: this.cart.unsupportedTokens, polygonEstimatedGasCost: this.polygon.estimatedGasCost }); }, diff --git a/app/assets/v2/js/cart-ethereum-zksync.js b/app/assets/v2/js/cart-ethereum-zksync.js index 3efee328b63..0e41a3f636d 100644 --- a/app/assets/v2/js/cart-ethereum-zksync.js +++ b/app/assets/v2/js/cart-ethereum-zksync.js @@ -138,6 +138,10 @@ Vue.component('grantsCartEthereumZksync', { (token) => !this.supportedTokens.includes(token) ); + if (this.cart.unsupportedTokens.length > 0) { + _alert(`zkSync checkout not supported due to the use of the token ${this.cart.unsupportedTokens[0]}`, 'danger'); + } + // If currently selected fee token is still in the cart, don't change it. Otherwise, set // fee token to the token used for the first item in the cart if (!this.cart.tokenList.includes(this.zksync.feeTokenSymbol)) { @@ -170,7 +174,6 @@ Vue.component('grantsCartEthereumZksync', { // Emit event so cart.js can update state accordingly to display info to user this.$emit('zksync-data-updated', { - zkSyncUnsupportedTokens: this.cart.unsupportedTokens, zkSyncEstimatedGasCost: estimatedGasCost }); }, diff --git a/app/grants/templates/grants/cart/eth.html b/app/grants/templates/grants/cart/eth.html index 9920b60bf4a..9267906831b 100644 --- a/app/grants/templates/grants/cart/eth.html +++ b/app/grants/templates/grants/cart/eth.html @@ -502,7 +502,7 @@

Pay with zkSync

- Zksync checkout supports checkout for [[maxCartItems]] items. + zkSync checkout supports checkout for [[maxCartItems]] items. Please remove [[ grantsByTenant.length - maxCartItems ]] grant s from your cart to use zkSync checkout. @@ -511,21 +511,9 @@

Pay with zkSync

-
+
- -