From 8e9df0457b165d612ccde45dfc43c5de725a6ff9 Mon Sep 17 00:00:00 2001 From: Brad Decker Date: Fri, 29 Jul 2022 10:37:48 -0500 Subject: [PATCH] cast chainId to hex for metrics (#15332) * cast chainId to hex for metrics * Update ui/pages/settings/networks-tab/networks-form/networks-form.js Co-authored-by: Ariella Vu <20778143+digiwand@users.noreply.github.com> Co-authored-by: Ariella Vu <20778143+digiwand@users.noreply.github.com> --- ui/pages/settings/networks-tab/networks-form/networks-form.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/pages/settings/networks-tab/networks-form/networks-form.js b/ui/pages/settings/networks-tab/networks-form/networks-form.js index 682af2f12..eb96a28ab 100644 --- a/ui/pages/settings/networks-tab/networks-form/networks-form.js +++ b/ui/pages/settings/networks-tab/networks-form/networks-form.js @@ -11,6 +11,7 @@ import PropTypes from 'prop-types'; import validUrl from 'valid-url'; import log from 'loglevel'; import classnames from 'classnames'; +import { addHexPrefix } from 'ethereumjs-util'; import { useI18nContext } from '../../../../hooks/useI18nContext'; import { isPrefixedFormattedHexString, @@ -525,7 +526,7 @@ const NetworksForm = ({ url: rpcUrlOrigin, }, properties: { - chain_id: chainId, + chain_id: addHexPrefix(chainId.toString(16)), network_name: networkName, network: rpcUrlOrigin, symbol: ticker,