Skip to content

Commit

Permalink
nit(base-adapter): unneeded conditional check (#1312)
Browse files Browse the repository at this point in the history
The `some()` function only returns true if a match is found. An empty array calling `.some` is always guaranteed to return a falsy value.

Drive-by comment on my way to getting the Linea Manager
  • Loading branch information
james-a-morris authored Mar 21, 2024
1 parent 3c9cc20 commit ed9c43f
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/clients/bridges/BaseAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,6 @@ export abstract class BaseAdapter {
*/
isSupportedToken(l1Token: string): l1Token is SupportedL1Token {
const relevantSymbols = matchTokenSymbol(l1Token, this.hubChainId);

// If we don't have a symbol for this token, return that the token is not supported
if (relevantSymbols.length === 0) {
return false;
}

// if the symbol is not in the supported tokens list, it's not supported
return relevantSymbols.some((symbol) => this.supportedTokens.includes(symbol));
}
Expand Down

0 comments on commit ed9c43f

Please sign in to comment.