1
This commit is contained in:
9
utils/stringhelper/address_helper.go
Normal file
9
utils/stringhelper/address_helper.go
Normal 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:]
|
||||
}
|
||||
Reference in New Issue
Block a user