Skip to Content

formatConnectorName()

formatConnectorName(connectorName): string

Defined in: utils/formatConnectorName.ts:25 

Normalizes a wallet connector display name into a stable identifier. Known names are mapped explicitly (e.g. “Trust Wallet” → “trust”, “Base Account” → “coinbase”); any other name has its whitespace removed and is lowercased.

Parameters

connectorName

string

Display name reported by the wallet connector.

Returns

string

The normalized connector identifier.

Example

formatConnectorName('Trust Wallet'); // "trust" formatConnectorName('Rabby Wallet'); // "rabbywallet"
Last updated on