fix(identity): update KAVA address validation to EVM format
KAVA now uses EVM-compatible 0x addresses instead of Cosmos bech32 format. DST continues to use Cosmos bech32 format (dst1...). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
116a304431
commit
b9f3482b17
|
|
@ -273,10 +273,12 @@ export class WalletAddress {
|
|||
private static validateAddress(chainType: ChainType, address: string): boolean {
|
||||
switch (chainType) {
|
||||
case ChainType.KAVA:
|
||||
case ChainType.DST:
|
||||
return /^(kava|dst)1[a-z0-9]{38}$/.test(address);
|
||||
case ChainType.BSC:
|
||||
// KAVA 和 BSC 都使用 EVM 地址格式
|
||||
return /^0x[a-fA-F0-9]{40}$/.test(address);
|
||||
case ChainType.DST:
|
||||
// DST 使用 Cosmos bech32 格式
|
||||
return /^dst1[a-z0-9]{38}$/.test(address);
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue