Skip to content
This repository has been archived by the owner on Jul 3, 2022. It is now read-only.

fix: resolve to not be async when it is not needed #419

Merged
merged 1 commit into from
Jul 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/lib/tokenlist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export class GitHubTokenListResolutionStrategy {
'https://raw.githubusercontent.com/solana-labs/token-list/main/src/tokens/solana.tokenlist.json',
];

resolve = async () => {
resolve = () => {
return queryJsonFiles(this.repositories);
};
}
Expand All @@ -74,7 +74,7 @@ export class CDNTokenListResolutionStrategy {
'https://cdn.jsdelivr.net/gh/solana-labs/token-list@main/src/tokens/solana.tokenlist.json',
];

resolve = async () => {
resolve = () => {
return queryJsonFiles(this.repositories);
};
}
Expand Down Expand Up @@ -108,13 +108,13 @@ export enum Strategy {
}

export class SolanaTokenListResolutionStrategy {
resolve = async () => {
resolve = () => {
throw new Error(`Not Implemented Yet.`);
};
}

export class StaticTokenListResolutionStrategy {
resolve = async () => {
resolve = () => {
return tokenlist.tokens;
};
}
Expand Down