Skip to content

Commit

Permalink
fix: unable to load dao tokens in dao app (#76)
Browse files Browse the repository at this point in the history
* fix: fallback to token API

* chore: bump patch `0.18.5` -> `0.18.6`
  • Loading branch information
colbr authored Jun 6, 2024
1 parent 9e0be43 commit aad937c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zero-tech/zapp-daos",
"version": "0.18.5",
"version": "0.18.6",
"main": "dist/index.js",
"repository": "[email protected]:zer0-os/zApp-DAOs.git",
"scripts": {
Expand Down
5 changes: 3 additions & 2 deletions src/lib/hooks/queries/useDaoAssetsCoins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ export const useDaoAssetsCoins = (zna?: string) => {
['dao', 'assets', 'coins', { zna }],
async () => {
const response = await fetch(
`${safeUrl}/api/v1/safes/${dao.safeAddress}/balances/usd/?trusted=true&exclude_spam=true`,
`${safeUrl}/api/v1/safes/${dao.safeAddress}/balances/?trusted=true&exclude_spam=true`,
);

const data = await response.json();

try {
if (!Number(data[0].fiatBalance ?? 1)) {
const hasFiatBalance = !!data[0]?.fiatBalance;
if (!hasFiatBalance) {
const symbols = data.map((d) => {
if (!d.token) return 'eth';

Expand Down

0 comments on commit aad937c

Please sign in to comment.