From 7bf86f42c0c02c45ec8899bf512a540df40e3abd Mon Sep 17 00:00:00 2001 From: Kris Urbas <605420+krzysu@users.noreply.github.com> Date: Fri, 12 Apr 2024 12:54:22 +0200 Subject: [PATCH] more handle namespace changes --- examples/node/scripts/handle/resolveAddress.ts | 2 +- examples/node/scripts/misc/onboarding.ts | 6 ++---- examples/node/scripts/profile/fetch.ts | 2 +- examples/node/scripts/profile/fetchAll.ts | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/examples/node/scripts/handle/resolveAddress.ts b/examples/node/scripts/handle/resolveAddress.ts index d08fd71787..911de65f88 100644 --- a/examples/node/scripts/handle/resolveAddress.ts +++ b/examples/node/scripts/handle/resolveAddress.ts @@ -5,7 +5,7 @@ async function main() { environment: development, }); - const address = await client.handle.resolveAddress({ handle: 'test/wagmi' }); + const address = await client.handle.resolveAddress({ handle: 'lens/wagmi' }); console.log(`Address: `, address); } diff --git a/examples/node/scripts/misc/onboarding.ts b/examples/node/scripts/misc/onboarding.ts index 16cf6efde9..c432cc5726 100644 --- a/examples/node/scripts/misc/onboarding.ts +++ b/examples/node/scripts/misc/onboarding.ts @@ -31,8 +31,6 @@ const rpcUrl = { production: `https://polygon.infura.io/v3/${process.env.INFURA_API_KEY}`, }; -const HANDLE_NAMESPACE = 'test'; // use 'lens' namespace for production - async function main() { // prepare new handle const requestedHandle = 'jane_doe'; // input from the user @@ -50,7 +48,7 @@ async function main() { // check if the requested handle is available const handleOwnerAddress = await client.handle.resolveAddress({ - handle: `${HANDLE_NAMESPACE}/${requestedHandle}`, + handle: `lens/${requestedHandle}`, }); if (handleOwnerAddress) { @@ -112,7 +110,7 @@ async function main() { console.log('A new profile has been successfully minted.'); // now fetch the newly created profile to get the id - const fullHandle = `${HANDLE_NAMESPACE}/${requestedHandle}`; + const fullHandle = `lens/${requestedHandle}`; const profile = await client.profile.fetch({ forHandle: fullHandle, diff --git a/examples/node/scripts/profile/fetch.ts b/examples/node/scripts/profile/fetch.ts index 34f5784c89..1eeb96bb43 100644 --- a/examples/node/scripts/profile/fetch.ts +++ b/examples/node/scripts/profile/fetch.ts @@ -14,7 +14,7 @@ async function main() { // by handle const profileByHandle = await client.profile.fetch({ - forHandle: 'test/@firstprofile', + forHandle: 'lens/firstprofile', }); console.log(`Profile fetched by handle: `, { diff --git a/examples/node/scripts/profile/fetchAll.ts b/examples/node/scripts/profile/fetchAll.ts index 96b31472d6..4f051f3de6 100644 --- a/examples/node/scripts/profile/fetchAll.ts +++ b/examples/node/scripts/profile/fetchAll.ts @@ -28,7 +28,7 @@ async function main() { // by a list of Lens handles const profilesByHandle = await client.profile.fetchAll({ - where: { handles: ['test/@firstprofile'] }, + where: { handles: ['lens/firstprofile'] }, }); console.log(