Skip to content

Commit

Permalink
more handle namespace changes
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysu committed Apr 12, 2024
1 parent 10757c9 commit 7bf86f4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/node/scripts/handle/resolveAddress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
6 changes: 2 additions & 4 deletions examples/node/scripts/misc/onboarding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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) {
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion examples/node/scripts/profile/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: `, {
Expand Down
2 changes: 1 addition & 1 deletion examples/node/scripts/profile/fetchAll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 7bf86f4

Please sign in to comment.