mento-protocol / governance-ui

An open source interface for the Mento protocol governance
https://governance.mento.org
0 stars 0 forks source link

Reuse code for shortening wallet addresses/proposal id's #87

Closed nvtaveras closed 2 months ago

nvtaveras commented 5 months ago

Description

There are a few places in the UI where we need to display a shortened version of a wallet address or a proposal id: 0x89817bA9Db9E6C6cf77A7088206D8ED07142B457 => 0x8981...B457 or 54586949247889157826361510316467460533569612275698467822707508012640240559245 => 54586949...9245

There's a small bit of code duplication in wallet.helper.ts and breadcrumbs.component.tsx which could be consolidated into a single function, as both functions do the same thing, with the one in wallet.helper.ts being a bit more generic.

Acceptance Criteria