mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-02 02:00:31 +08:00
Display short addresses differently
Use an "en dash" instead of an ellipsis. Signed-off-by: Alexis Sellier <self@cloudhead.io>
This commit is contained in:
+1
-1
@@ -70,7 +70,7 @@
|
||||
justify-content: center;
|
||||
min-height: 42px;
|
||||
margin-left: 2rem;
|
||||
width: 9.25rem;
|
||||
width: 10rem;
|
||||
}
|
||||
.connect {
|
||||
display: inline-block;
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
|
||||
<style>
|
||||
.org {
|
||||
width: 7rem;
|
||||
height: 7rem;
|
||||
width: 8rem;
|
||||
height: 8rem;
|
||||
margin-left: 3rem;
|
||||
margin-top: 1.5rem;
|
||||
margin-bottom: 1.5rem;
|
||||
@@ -41,7 +41,7 @@
|
||||
padding: 0rem 0.5rem;
|
||||
text-overflow: ellipsis;
|
||||
overflow-x: hidden;
|
||||
max-width: 7rem;
|
||||
max-width: 8rem;
|
||||
}
|
||||
.list {
|
||||
display: flex;
|
||||
|
||||
+6
-2
@@ -48,8 +48,12 @@ export function formatCAIP10Address(address: string, protocol: string, impl: num
|
||||
return `${address.toLowerCase()}@${protocol}:${impl.toString()}`;
|
||||
}
|
||||
|
||||
export function formatAddress(addr: string): string {
|
||||
return formatHash(ethers.utils.getAddress(addr)).replace(/^0x/, "");
|
||||
export function formatAddress(input: string): string {
|
||||
const addr = ethers.utils.getAddress(input).replace(/^0x/, "");
|
||||
|
||||
return addr.substring(0, 4)
|
||||
+ ' – '
|
||||
+ addr.substring(addr.length - 4, addr.length);
|
||||
}
|
||||
|
||||
export function formatIpfsFile(ipfs: string | undefined): string | undefined {
|
||||
|
||||
Reference in New Issue
Block a user