Skip to content

Commit

Permalink
chores: imports can be shortened, and simplified return statements
Browse files Browse the repository at this point in the history
  • Loading branch information
dima-safin-2025 committed Jul 23, 2024
1 parent fddaedd commit 1bc30a4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/features/messages/queries/useMessageQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import {
MessageIdentifierType,
buildMessageQuery,
buildMessageSearchQuery,
} from '../queries/build';
import { MessagesQueryResult, MessagesStubQueryResult } from '../queries/fragments';
import { parseMessageQueryResult, parseMessageStubResult } from '../queries/parse';
} from './build';
import { MessagesQueryResult, MessagesStubQueryResult } from './fragments';
import { parseMessageQueryResult, parseMessageStubResult } from './parse';

const SEARCH_AUTO_REFRESH_DELAY = 15_000; // 15s
const MSG_AUTO_REFRESH_DELAY = 10_000; // 10s
Expand All @@ -22,8 +22,7 @@ const SEARCH_QUERY_LIMIT = 50;
export function isValidSearchQuery(input: string, allowAddress?: boolean) {
if (!input) return false;
if (isValidTransactionHashEvm(input)) return true;
if (allowAddress && isAddressEvm(input)) return true;
return false;
return !!(allowAddress && isAddressEvm(input));
}

export function useMessageSearchQuery(
Expand Down

0 comments on commit 1bc30a4

Please sign in to comment.