Skip to content

Commit

Permalink
fix: Update @budgetbuddyde/types due to issues with an incorrect sc…
Browse files Browse the repository at this point in the history
…hema
  • Loading branch information
tklein1801 committed Apr 13, 2024
1 parent 0f65249 commit f53ad45
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"format": "prettier --write ./src --log-level silent"
},
"dependencies": {
"@budgetbuddyde/types": "^1.0.27",
"@budgetbuddyde/types": "^1.0.29",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.14.15",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Stocks/Stock.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ export class StockService {
const json = (await response.json()) as TApiResponse<TDividendDetailList['dividendDetails']>;
if (json.status != 200) return [null, new Error('Something went wrong')];

const parsingResult = z.record(z.string(), ZDividendDetails).safeParse(json.data);
const parsingResult = z.record(ZDividendDetails).safeParse(json.data);
if (!parsingResult.success) throw parsingResult.error;
return [parsingResult.data, null];
} catch (error) {
Expand Down
1 change: 1 addition & 0 deletions src/components/Stocks/hooks/useFetchStockDividends.hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export function useFetchStockDividends(isin: string[]) {
const isins = isin.filter(str => str.length > 0);
if (!isins.length) return setError(new Error('No valid ISINs found'));
setLoading(true);

const [result, error] = await StockService.getDividends(isins);
if (error) return setError(error);
setDividends(result);
Expand Down

0 comments on commit f53ad45

Please sign in to comment.