Skip to content

Commit

Permalink
Fix parsing of fallback amount (#6997)
Browse files Browse the repository at this point in the history
  • Loading branch information
mds1 authored Jun 26, 2020
1 parent 092b2be commit a5818df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/assets/v2/js/cart.js
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ Vue.component('grants-cart', {
const response = await fetch(url);
const newAmount = await response.json();

return newAmount.eth;
return newAmount[0].eth;
},

async predictCLRMatch(grant, amount) {
Expand Down
2 changes: 1 addition & 1 deletion app/assets/v2/js/grants/funding.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ $(document).ready(function() {
// Get fallback amount in ETH (used when token is not available for a grant)
const url = `${window.location.origin}/sync/get_amount?amount=${preferredAmount}&denomination=${preferredTokenName}`;
const response = await fetch(url);
const fallbackAmount = (await response.json()).eth;
const fallbackAmount = (await response.json())[0].eth;

// Update cart values
cartData.forEach((grant, index) => {
Expand Down

0 comments on commit a5818df

Please sign in to comment.