Skip to content

Commit

Permalink
fix a few example scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysu committed Sep 18, 2023
1 parent e834e98 commit 36571fa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions examples/node/scripts/authenticate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions examples/node/scripts/shared/getAuthenticatedClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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 });

Expand Down
2 changes: 1 addition & 1 deletion examples/node/scripts/shared/uploadWithBundlr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`);

Expand Down

0 comments on commit 36571fa

Please sign in to comment.