Skip to content

Commit

Permalink
TW-737 Refactoring according to comments
Browse files Browse the repository at this point in the history
  • Loading branch information
keshan3262 committed Oct 27, 2023
1 parent 337dcae commit c945d47
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/lib/apis/tzkt/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,5 +191,5 @@ export const fetchAllTokensBalancesFromTzkt = async (selectedRpcUrl: string, acc
return balances;
};

export const getAccountStatsFromTzkt = async (account: string, chainId: string) =>
isKnownChainId(chainId) ? await fetchGet<TzktAccount>(chainId, `/accounts/${account}`) : null;
export const getAccountStatsFromTzkt = async (account: string, chainId: TzktApiChainId) =>
fetchGet<TzktAccount>(chainId, `/accounts/${account}`);
2 changes: 1 addition & 1 deletion src/lib/temple/front/baking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function useDelegate(address: string, suspense = true) {
try {
const accountStats = await getAccountStatsFromTzkt(address, chainId);

switch (accountStats?.type) {
switch (accountStats.type) {
case TzktAccountType.Empty:
return null;
case TzktAccountType.User:
Expand Down

0 comments on commit c945d47

Please sign in to comment.