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
[ ] Rename getShortAddress to something more generic
[ ] Reuse the above function in the logic for shortening proposal id's inside the breadcrumb component
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
or54586949247889157826361510316467460533569612275698467822707508012640240559245
=>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
getShortAddress
to something more generic