This commit is contained in:
2025-05-13 15:44:44 +08:00
parent 20a741ae11
commit 8e2324df0e
32 changed files with 2840 additions and 44 deletions

View File

@ -0,0 +1,9 @@
package stringhelper
func DesensitizeWalletAddress(address string) string {
if len(address) < 10 { // 更严格的长度检查
return "0x...invalid"
}
return address[:6] + "..." + address[len(address)-4:]
}