28c53b1e59
* keplr/metamask integration initial commit * chains settings and type definitions. notifications prototype * fix: dom nested buttons * address copied toast * react-toastify colors * wallet store and initial queries setup. zustand and react query dependencies added * _app code cleanup * remove obsolete WalletContext * unused import * walletStore initial commit * leftover component reference removed * fix: react hydration mismatch wallet component * metamask conditional click handler * connect modal minor tweaks and wallet installation urls added
14 lines
272 B
TypeScript
14 lines
272 B
TypeScript
export const formatWalletAddress = (
|
|
address: string,
|
|
substrLength = 6
|
|
): string => {
|
|
if (address.length <= 10) {
|
|
return address;
|
|
}
|
|
|
|
return `${address.slice(0, substrLength)}...${address.slice(
|
|
address.length - substrLength,
|
|
address.length
|
|
)}`;
|
|
};
|