Skip to content

Commit

Permalink
Fix isAllDai check in cart (#7079)
Browse files Browse the repository at this point in the history
  • Loading branch information
mds1 authored Jul 9, 2020
1 parent e834499 commit 18aa9c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/assets/v2/js/cart.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@ Vue.component('grants-cart', {
// If we have a cart where all donations are in Dai, we use a linear regression to
// estimate gas costs based on real checkout transaction data, and add a 50% margin
const donationCurrencies = this.donationInputs.map(donation => donation.token);
const isAllDai = donationCurrencies.every((addr, index, array) => addr === array[0]);
const daiAddress = this.getTokenByName('DAI').addr;
const isAllDai = donationCurrencies.every((addr) => addr === daiAddress);

if (isAllDai) {
if (donationCurrencies.length === 1) {
Expand Down

0 comments on commit 18aa9c6

Please sign in to comment.