8000 Bump zksync version, prevent user from clicking standard checkout but… by mds1 · Pull Request #7972 · gitcoinco/web · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Bump zksync version, prevent user from clicking standard checkout but… #7972

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/assets/v2/js/cart.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -538,6 +539,7 @@ Vue.component('grants-cart', {
message = err;

_alert(message, 'error');
this.isCheckoutOngoing = false;
indicateMetamaskPopup(true);
},

Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions app/grants/templates/grants/cart-vue.html
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ <h1 class="font-bigger-4 font-weight-bold mt-2">Pay with zkSync</h1>
{% comment %} End HTML Template for cart-ethereum-zksync.js {% endcomment %}
</div>
<div class="col-auto">
<button class="btn btn-outline-gc-blue shadow-none py-3 mt-1" id='js-fundGrants-button' @click="standardCheckout">
<button class="btn btn-outline-gc-blue shadow-none py-3 mt-1" id='js-fundGrants-button' @click="standardCheckout" :disabled="isCheckoutOngoing">
Standard Checkout
</button>
</div>
Expand Down Expand Up @@ -749,7 +749,7 @@ <h2 class="middle-line mb-3"><span class="text-muted font-body">or</span></h2>

{% comment %} ===================== START ZKSYNC SCRIPTS ====================== {% endcomment %}
<script type="text/javascript" src="https://cdn.ethers.io/lib/ethers-5.0.umd.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/zksync-checkout@0.0.7/dist/main.js"></script>
<script type="text/javascript" src="https://unpkg.com/zksync-checkout@0.0.8/dist/main.js"></script>
{% comment %} ====================== END ZKSYNC SCRIPTS ======================= {% endcomment %}

<script src="{% static "v2/js/lib/bootstrap-vue.min.js" %}"></script>
Expand Down
0