From e4c2f221733ef1d3df3fb48d5b0350e7d1e4168c Mon Sep 17 00:00:00 2001 From: Henry Date: Tue, 31 Oct 2023 17:08:23 +0000 Subject: [PATCH] fix: truncate address --- packages/site/package.json | 1 + packages/site/src/pages/monitor/create.tsx | 8 +++----- packages/snap/README.md | 2 +- packages/snap/package.json | 2 +- packages/snap/snap.manifest.json | 4 ++-- yarn.lock | 12 ++++++++++++ 6 files changed, 20 insertions(+), 9 deletions(-) diff --git a/packages/site/package.json b/packages/site/package.json index 59e414d..0c9568d 100644 --- a/packages/site/package.json +++ b/packages/site/package.json @@ -33,6 +33,7 @@ "@radix-ui/react-label": "^2.0.2", "@radix-ui/react-slot": "^1.0.2", "@radix-ui/react-toast": "^1.1.5", + "@rss3/js-sdk": "^0.6.48", "ahooks": "^3.7.8", "autoprefixer": "^10.4.16", "class-variance-authority": "^0.7.0", diff --git a/packages/site/src/pages/monitor/create.tsx b/packages/site/src/pages/monitor/create.tsx index f948881..f222e61 100644 --- a/packages/site/src/pages/monitor/create.tsx +++ b/packages/site/src/pages/monitor/create.tsx @@ -1,4 +1,5 @@ import { useState, useEffect, useMemo, useContext } from 'react'; +import { formatAddressAndNS } from '@rss3/js-sdk'; import * as z from 'zod'; import { type Profile } from '@rss3/js-sdk'; import { useForm } from 'react-hook-form'; @@ -6,6 +7,7 @@ import { zodResolver } from '@hookform/resolvers/zod'; import { navigate } from 'gatsby'; import { Badge } from '@/components/ui/badge'; import { Button } from '@/components/ui/button'; + import { addProfilesToMonitorFollowing, getProfilesFilterBySearch, @@ -255,11 +257,7 @@ const MonitorCreate = () => {

- {(item.handle?.length ?? 0) > 10 - ? `${item.handle?.slice(0, 6)}...${item.handle?.slice( - -8, - )}` - : item.handle} + {item.handle && formatAddressAndNS(item.handle)}

diff --git a/packages/snap/README.md b/packages/snap/README.md index a4e083c..59ecb15 100644 --- a/packages/snap/README.md +++ b/packages/snap/README.md @@ -19,7 +19,7 @@ Powered by RSS3's social aggretation capability, a truly platform-agnostic way t ## Getting Started -Simply visit and install the Snap. +Simply visit and install the Snap. Permissionless, no registation required. diff --git a/packages/snap/package.json b/packages/snap/package.json index 7ba6bbe..6a2ef84 100644 --- a/packages/snap/package.json +++ b/packages/snap/package.json @@ -1,6 +1,6 @@ { "name": "@rss3/social-notifier-snap", - "version": "0.1.3", + "version": "0.1.4", "description": "Get notifications when your Web3 frens produce new activities.", "repository": { "type": "git", diff --git a/packages/snap/snap.manifest.json b/packages/snap/snap.manifest.json index dd7237c..bfb2595 100644 --- a/packages/snap/snap.manifest.json +++ b/packages/snap/snap.manifest.json @@ -1,5 +1,5 @@ { - "version": "0.1.3", + "version": "0.1.4", "description": "Get notifications when your Web3 frens produce new activities.", "proposedName": "RSS3 Social Notifier", "repository": { @@ -7,7 +7,7 @@ "url": "https://github.com/NaturalSelectionLabs/RSS3-Social-Notifier-Snap.git" }, "source": { - "shasum": "cdaBco1MFGRvH8wcSjgg3b9jG/NbLpmxZkyNKZR4WeA=", + "shasum": "G1LtU0segj3vXEI9lPqQv9NgLB4kbjCD6L67xvyxJqI=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/yarn.lock b/yarn.lock index fa9d0d4..4440621 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6114,6 +6114,17 @@ __metadata: languageName: node linkType: hard +"@rss3/js-sdk@npm:^0.6.48": + version: 0.6.48 + resolution: "@rss3/js-sdk@npm:0.6.48" + dependencies: + debug: ^4.3.4 + openapi-fetch: ^0.7.10 + qs: ^6.11.2 + checksum: 343257a10f1a1d9b2dc2db20d0c27cc734680f2b1d2f8da7a29d7910a6ce821a0e3bb440e04551de6a00797e4940b67804b461ae0613e000f4b355d767ced445 + languageName: node + linkType: hard + "@rss3/social-notifier-snap@workspace:packages/snap": version: 0.0.0-use.local resolution: "@rss3/social-notifier-snap@workspace:packages/snap" @@ -21261,6 +21272,7 @@ __metadata: "@radix-ui/react-label": ^2.0.2 "@radix-ui/react-slot": ^1.0.2 "@radix-ui/react-toast": ^1.1.5 + "@rss3/js-sdk": ^0.6.48 "@testing-library/dom": ^8.17.1 "@testing-library/jest-dom": ^5.16.4 "@testing-library/react": ^13.3.0