fix: statisc
This commit is contained in:
@@ -43,6 +43,25 @@ final class WalletSource
|
||||
return self::TAGS[$key] ?? self::TAGS[$tag] ?? $tag;
|
||||
}
|
||||
|
||||
/**
|
||||
* Chains we persist from C2 ingest (skip UNKNOWN / niche networks).
|
||||
*
|
||||
* @var list<string>
|
||||
*/
|
||||
public const SUPPORTED_CHAINS = [
|
||||
'ETH', 'ETHEREUM', 'EVM',
|
||||
'TRX', 'TRON',
|
||||
'BTC', 'BITCOIN',
|
||||
'SOL', 'SOLANA',
|
||||
'BNB', 'BSC', 'BINANCE',
|
||||
'TON',
|
||||
];
|
||||
|
||||
public static function isSupportedChain(string $chainType): bool
|
||||
{
|
||||
return in_array(strtoupper(trim($chainType)), self::SUPPORTED_CHAINS, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Infer chain type from address when plugin omits chainType.
|
||||
*/
|
||||
@@ -50,7 +69,7 @@ final class WalletSource
|
||||
{
|
||||
$address = trim($address);
|
||||
if ($address === '') {
|
||||
return 'unknown';
|
||||
return 'UNKNOWN';
|
||||
}
|
||||
if (preg_match('/^0x[0-9a-fA-F]{40}$/', $address)) {
|
||||
return 'ETHEREUM';
|
||||
@@ -73,7 +92,7 @@ final class WalletSource
|
||||
return 'TON';
|
||||
}
|
||||
|
||||
return 'unknown';
|
||||
return 'UNKNOWN';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user