From 6b3ec6c677e6706862b7d6f495bf0af49cf51e76 Mon Sep 17 00:00:00 2001 From: Brian Bergeron Date: Wed, 29 May 2024 08:11:47 -0700 Subject: [PATCH] relax chain symbol length validation --- .../rpc-method-middleware/handlers/ethereum-chain-utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/scripts/lib/rpc-method-middleware/handlers/ethereum-chain-utils.js b/app/scripts/lib/rpc-method-middleware/handlers/ethereum-chain-utils.js index 08c9a6cc8894..94a85023a738 100644 --- a/app/scripts/lib/rpc-method-middleware/handlers/ethereum-chain-utils.js +++ b/app/scripts/lib/rpc-method-middleware/handlers/ethereum-chain-utils.js @@ -166,10 +166,10 @@ export function validateAddEthereumChainParams(params, end) { const ticker = nativeCurrency?.symbol || UNKNOWN_TICKER_SYMBOL; if ( ticker !== UNKNOWN_TICKER_SYMBOL && - (typeof ticker !== 'string' || ticker.length < 2 || ticker.length > 6) + (typeof ticker !== 'string' || ticker.length < 1 || ticker.length > 6) ) { throw ethErrors.rpc.invalidParams({ - message: `Expected 2-6 character string 'nativeCurrency.symbol'. Received:\n${ticker}`, + message: `Expected 1-6 character string 'nativeCurrency.symbol'. Received:\n${ticker}`, }); }