Files
eth_transfer_go/utils/stringhelper/address_helper.go

10 lines
223 B
Go
Raw Normal View History

2025-05-13 15:44:44 +08:00
package stringhelper
func DesensitizeWalletAddress(address string) string {
if len(address) < 10 { // 更严格的长度检查
return "0x...invalid"
}
return address[:6] + "..." + address[len(address)-4:]
}