SHA256
UI: создание канала и ошибки Solana
This commit is contained in:
@@ -72,6 +72,19 @@ export function formatSolanaErrorDetails(error) {
|
||||
return parts.join(' :: ');
|
||||
}
|
||||
|
||||
export function isSolanaRpcUnavailableError(error) {
|
||||
const details = formatSolanaErrorDetails(error).toLowerCase();
|
||||
return details.includes('service unavailable')
|
||||
|| details.includes('503')
|
||||
|| details.includes('failed to fetch')
|
||||
|| details.includes('fetch failed')
|
||||
|| details.includes('networkerror')
|
||||
|| details.includes('network error')
|
||||
|| details.includes('rpc unavailable')
|
||||
|| details.includes('rpc error')
|
||||
|| details.includes('failed to get info about account');
|
||||
}
|
||||
|
||||
export function isUserAlreadyExistsSolanaError(error) {
|
||||
const details = formatSolanaErrorDetails(error);
|
||||
return details.includes('UserAlreadyExists')
|
||||
|
||||
Reference in New Issue
Block a user