Skip to content

Commit

Permalink
refactor. thanks shane
Browse files Browse the repository at this point in the history
  • Loading branch information
Spencer Sablan committed Oct 10, 2023
1 parent 60ceefa commit a3ddb72
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/funding/funding.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,9 @@ function isFundingVaultable({
const { vendors } = fundingEligibility[source];

// If any vendors are both eligible & vaultable, card is vaultable
for (const vendor in vendors) {
if (vendors[vendor].eligible && vendors[vendor].vaultable) {
return true;
}
}

return false;
return Object.keys(vendors).some(
(vendor) => vendors[vendor].eligible && vendors[vendor].vaultable
);
}

if (!fundingEligibility[source].vaultable) {
Expand Down

0 comments on commit a3ddb72

Please sign in to comment.