From 693e00e0be2ade730342f214394ade994cc59459 Mon Sep 17 00:00:00 2001 From: Arthur <34348870+ArthurHoeke@users.noreply.github.com> Date: Wed, 17 Jan 2024 09:29:31 +0100 Subject: [PATCH 1/2] Update usePoolInfo.ts --- packages/page-staking2/src/Pools/usePoolInfo.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/page-staking2/src/Pools/usePoolInfo.ts b/packages/page-staking2/src/Pools/usePoolInfo.ts index c58713b0a85e..a437f871d041 100644 --- a/packages/page-staking2/src/Pools/usePoolInfo.ts +++ b/packages/page-staking2/src/Pools/usePoolInfo.ts @@ -35,8 +35,8 @@ const OPT_MULTI = { : null }; -function transformName (input: string): string { - return input.replace(/[^\x20-\x7E]/g, ''); +function transformName(input: string): string { + return input.replace(/[^\x20-\x7E\uD83C-\uDBFF\uDC00-\uDFFF]/g, ''); } function usePoolInfoImpl (poolId: BN): PoolInfo | null | undefined { From f6e02cec67e65f107df1de252c97f2512a788471 Mon Sep 17 00:00:00 2001 From: Arthur <34348870+ArthurHoeke@users.noreply.github.com> Date: Wed, 17 Jan 2024 09:42:12 +0100 Subject: [PATCH 2/2] Reduce emoji range --- packages/page-staking2/src/Pools/usePoolInfo.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/page-staking2/src/Pools/usePoolInfo.ts b/packages/page-staking2/src/Pools/usePoolInfo.ts index a437f871d041..20c0cef13b73 100644 --- a/packages/page-staking2/src/Pools/usePoolInfo.ts +++ b/packages/page-staking2/src/Pools/usePoolInfo.ts @@ -36,7 +36,7 @@ const OPT_MULTI = { }; function transformName(input: string): string { - return input.replace(/[^\x20-\x7E\uD83C-\uDBFF\uDC00-\uDFFF]/g, ''); + return input.replace(/[^\x20-\x7E\uD83C[\uDF00-\uDFFF]]/g, ''); } function usePoolInfoImpl (poolId: BN): PoolInfo | null | undefined {