Skip to content

Commit

Permalink
fix(types): remove unnecesssary empty defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
atticusofsparta committed Mar 1, 2024
1 parent 619c193 commit 7d14edb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/common/caches/arns-remote-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class ArNSRemoteCache implements ArIOContract {
return gateway;
}

async getGateways({ blockHeight, sortKey }: ReadInteractionFilters = {}) {
async getGateways({ blockHeight, sortKey }: ReadInteractionFilters) {
this.logger.debug(`Fetching gateways`);
const { result } = await this.http.get<
ArNSStateResponse<'result', Record<string, Gateway>>
Expand Down Expand Up @@ -107,7 +107,7 @@ export class ArNSRemoteCache implements ArIOContract {
return result;
}

async getBalances({ blockHeight, sortKey }: ReadInteractionFilters = {}) {
async getBalances({ blockHeight, sortKey }: ReadInteractionFilters) {
this.logger.debug(`Fetching balances`);
const { result } = await this.http.get<
ArNSStateResponse<'result', Record<string, number>>
Expand Down Expand Up @@ -136,7 +136,7 @@ export class ArNSRemoteCache implements ArIOContract {
async getArNSRecords({
blockHeight,
sortKey,
}: ReadInteractionFilters = {}): Promise<Record<string, ArNSNameData>> {
}: ReadInteractionFilters): Promise<Record<string, ArNSNameData>> {
this.logger.debug(`Fetching all records`);
const { result } = await this.http.get<
ArNSStateResponse<'result', Record<string, ArNSNameData>>
Expand Down
8 changes: 6 additions & 2 deletions src/types/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ export interface ArIOContract {
getGateway(
props: { address: WalletAddress } & ReadInteractionFilters,
): Promise<Gateway>;
getGateways(): Promise<Record<WalletAddress, Gateway>>;
getGateways(
props: ReadInteractionFilters,
): Promise<Record<WalletAddress, Gateway>>;
getBalance(
props: { address: WalletAddress } & ReadInteractionFilters,
): Promise<number>;
Expand All @@ -40,7 +42,9 @@ export interface ArIOContract {
getArNSRecord(
props: { domain: string } & ReadInteractionFilters,
): Promise<ArNSNameData>;
getArNSRecords(): Promise<Record<string, ArNSNameData>>;
getArNSRecords(
prop: ReadInteractionFilters,
): Promise<Record<string, ArNSNameData>>;
}

/* eslint-disable @typescript-eslint/no-explicit-any */
Expand Down

0 comments on commit 7d14edb

Please sign in to comment.