From 36571faca5bddf0915747ee117a731c6e9012c9b Mon Sep 17 00:00:00 2001 From: Kris Urbas <605420+krzysu@users.noreply.github.com> Date: Mon, 18 Sep 2023 10:02:55 +0200 Subject: [PATCH] fix a few example scripts --- examples/node/scripts/authenticate.ts | 4 ++-- examples/node/scripts/shared/getAuthenticatedClient.ts | 8 ++++---- examples/node/scripts/shared/uploadWithBundlr.ts | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/node/scripts/authenticate.ts b/examples/node/scripts/authenticate.ts index 5ac89d4887..54724fd154 100644 --- a/examples/node/scripts/authenticate.ts +++ b/examples/node/scripts/authenticate.ts @@ -17,8 +17,8 @@ async function main() { } const { id, text } = await client.authentication.generateChallenge({ - profileId: ownedProfiles.items[0].id, - address, + signedBy: address, + for: ownedProfiles.items[0].id, }); const signature = await wallet.signMessage(text); diff --git a/examples/node/scripts/shared/getAuthenticatedClient.ts b/examples/node/scripts/shared/getAuthenticatedClient.ts index d7a0563594..3537110b4c 100644 --- a/examples/node/scripts/shared/getAuthenticatedClient.ts +++ b/examples/node/scripts/shared/getAuthenticatedClient.ts @@ -20,8 +20,8 @@ export async function getAuthenticatedClientFromEthersWallet(wallet: Wallet): Pr const profileId = await getOwnedProfileId(lensClient, address); const { id, text } = await lensClient.authentication.generateChallenge({ - address, - profileId, + signedBy: address, + for: profileId, }); const signature = await wallet.signMessage(text); @@ -38,8 +38,8 @@ export async function getAuthenticatedClientFromViemWalletClient(walletClient: W const profileId = await getOwnedProfileId(lensClient, address); const { id, text } = await lensClient.authentication.generateChallenge({ - address, - profileId, + signedBy: address, + for: profileId, }); const signature = await walletClient.signMessage({ account: address, message: text }); diff --git a/examples/node/scripts/shared/uploadWithBundlr.ts b/examples/node/scripts/shared/uploadWithBundlr.ts index 57d099898a..1cc3950648 100644 --- a/examples/node/scripts/shared/uploadWithBundlr.ts +++ b/examples/node/scripts/shared/uploadWithBundlr.ts @@ -8,7 +8,7 @@ export async function uploadWithBundlr(data: { [key: string]: unknown }): Promis }); const atomicBalance = await bundlr.getLoadedBalance(); - const balance = bundlr.utils.unitConverter(atomicBalance); + const balance = bundlr.utils.fromAtomic(atomicBalance); console.log(`Bundlr balance for wallet ${bundlr.address} is ${balance.toString()} MUMBAI MATIC`);