Skip to content

Commit

Permalink
fix: comment
Browse files Browse the repository at this point in the history
  • Loading branch information
songwongtp committed Jan 2, 2024
1 parent 42b7ba0 commit 949e842
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
1 change: 1 addition & 0 deletions src/lib/hooks/useSingleMessageProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ const updateAdminSingleMsgProps = (
) => {
const detail = messages[0].detail as DetailUpdateAdmin;
const contractLocalInfo = getContractLocalInfo(detail.contract);
// TODO: need to also handle getAccountLocalInfo
const adminLocalInfo = getContractLocalInfo(detail.newAdmin as BechAddr32);

if (messages.length > 1) {
Expand Down
16 changes: 6 additions & 10 deletions src/lib/pages/account-details/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ interface AccountContracts {
}

export const useAccountContracts = (
walletAddress: BechAddr,
address: BechAddr,
offset: number,
limit: number
): AccountContracts => {
const { data: contracts, isLoading } = useInstantiatedContractsByAddress(
walletAddress,
address,
limit,
offset
);
Expand All @@ -115,12 +115,12 @@ export const useAccountContracts = (
};

export const useAccountAdminContracts = (
walletAddress: BechAddr,
address: BechAddr,
offset: number,
pageSize: number
): AccountContracts => {
const { data: contractsAdmin, isLoading } = useAdminContractsByAddress(
walletAddress,
address,
pageSize,
offset
);
Expand Down Expand Up @@ -154,15 +154,11 @@ interface AccountCodes {
}

export const useAccountCodes = (
walletAddress: BechAddr,
address: BechAddr,
offset: number,
limit: number
): AccountCodes => {
const { data: codes, isLoading } = useCodesByAddress(
walletAddress,
limit,
offset
);
const { data: codes, isLoading } = useCodesByAddress(address, limit, offset);

const { getCodeLocalInfo, isCodeIdSaved } = useCodeStore();

Expand Down
2 changes: 1 addition & 1 deletion src/lib/services/tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ const zTxsCountResponse = z
})
.transform((val) => val.count);

export const getAPITxsCountByAddress = async (
export const getTxsCountByAddress = async (
endpoint: string,
address: BechAddr,
search: Option<string>,
Expand Down
4 changes: 2 additions & 2 deletions src/lib/services/txService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import {
getTxs,
getTxsByAddress,
queryTxData,
getAPITxsCountByAddress,
getTxsCountByAddress,
getTxsByModule,
getTxsByBlockHeight,
} from "./tx";
Expand Down Expand Up @@ -147,7 +147,7 @@ export const useTxsCountByAddress = (
],
async () => {
if (!address) throw new Error("address is undefined");
return getAPITxsCountByAddress(
return getTxsCountByAddress(
endpoint,
address,
search,
Expand Down

0 comments on commit 949e842

Please sign in to comment.