It was getting rather complicated to keep track of which Segment keys
were set where, and under which name.
The build script now injects a key even in test environments, but it is
unused if `IN_TEST` is truthy. This should be functionally equivalent
to the old logic. I find this simpler mainly for two reasons: there is
one less intermediate variable to keep track of now, and the `IN_TEST`
check is now directly in the module where we're constructing the
`segment` instance, rather than being referenced at a distance in a
comment.
The old setup made it difficult to turn on metrics for specific e2e
tests as well, which will be done in a subsequent PR.
There were a few lint errors introduced in #9768 due to the recently
merged prettier PR. They have now been fixed.
Additionally, one line using the property `eth_accounts` was
intermittently failing for me locally. I've been seeing this lint
failure off-and-on for a few days now - I'm not sure why I haven't seen
it on CI. Either way though, it's now ignored.
Consolidates the background and UI segment implementations into a shared solution.
This results in the introduction of our first shared module.
Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com>