From 3ed03e07995c7eca3636c8b4db12f996a515e6a4 Mon Sep 17 00:00:00 2001 From: Johnson Chen Date: Fri, 10 May 2024 09:53:09 +0800 Subject: [PATCH] update changelog --- CHANGELOG.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9eaddab..a433a4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # CHANGELOG +## v1.4.3 +- Update `shortenAddress` + +```ts +test('shortenAddress', () => { + expect(shortenAddress('0x9D75F4EbcB8e7669E59dcc27CBadC698E0F77187')).toBe('0x9D75...7187') +}) + +test('shortenAddress with custom start and end length', () => { + expect(shortenAddress('0x9D75F4EbcB8e7669E59dcc27CBadC698E0F77187', 8, 5)).toBe('0x9D75F4...77187') +}) + +test('shortenAddress with invalid address', () => { + expect(shortenAddress('')).toBe('') + expect(shortenAddress(null as any)).toBe('') + expect(shortenAddress(undefined as any)).toBe('') +}) +``` + ## v1.4.2 - Feat: Don't auto-connect to MetaMask if it's locked #185