Skip to content

Commit

Permalink
fix: name in assets not found
Browse files Browse the repository at this point in the history
  • Loading branch information
froid1911 committed Mar 28, 2024
1 parent 3893684 commit e30a177
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion api/src/modules/real-world-assets/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ export function getRWACRUD(prisma: Prisma.TransactionClient) {
})
return transformPortfolioToState(portfolios)
} catch (e) {
console.error(e)
return [];
}
},
Expand Down
6 changes: 3 additions & 3 deletions api/src/modules/real-world-assets/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ export const AssetUnion = unionType({
t.members(FixedIncome, Cash)
},
resolveType: (asset) => {
if (asset.assetType === "Cash") {
return "Cash";
if (asset.name) {
return "FixedIncome";
}

return "FixedIncome"
return "Cash"
}
});

Expand Down

0 comments on commit e30a177

Please sign in to comment.