From b13bb3faae979f18a9b763c5a02a1b61559a137e Mon Sep 17 00:00:00 2001 From: Tay Zheng Yu <32449414+ZhengYuTay@users.noreply.github.com> Date: Fri, 2 Jul 2021 23:45:25 +0800 Subject: [PATCH] fix: resolve to not be async when it is not needed (#419) --- src/lib/tokenlist.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/tokenlist.ts b/src/lib/tokenlist.ts index 89ed49ee790e..4382db3db0e2 100644 --- a/src/lib/tokenlist.ts +++ b/src/lib/tokenlist.ts @@ -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); }; } @@ -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); }; } @@ -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; }; }