Skip to content

Commit

Permalink
handle no nearToUsd
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlanglen committed Nov 3, 2023
1 parent 8ca62e0 commit bfbbb41
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/potlock/widget/Project/Card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const donationsForProject = Near.view(donationContractId, "get_donations_for_rec
});

const [totalAmount, totalDonors] = useMemo(() => {
if (!donationsForProject) {
if (!donationsForProject || !props.nearToUsd) {
return ["-", "-"];
}
const donors = [];
Expand Down
2 changes: 1 addition & 1 deletion build/potlock/src/Project/Card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const donationsForProject = Near.view(donationContractId, "get_donations_for_rec
});

const [totalAmount, totalDonors] = useMemo(() => {
if (!donationsForProject) {
if (!donationsForProject || !props.nearToUsd) {
return ["-", "-"];
}
const donors = [];
Expand Down

0 comments on commit bfbbb41

Please sign in to comment.