Skip to content

Commit

Permalink
format account addr to eip-55
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Long committed Sep 19, 2023
1 parent fdf3860 commit 18bb5ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/auth-browser/src/lib/chains/eth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -759,20 +759,20 @@ export const signAndSaveAuthMessage = async ({

const message: SiweMessage = new SiweMessage(preparedMessage);
const body: string = message.prepareMessage();

const formattedAccount = getAddress(account);
// -- 2. sign the message
let signedResult: SignedMessage = await signMessage({
body,
web3,
account,
account: formattedAccount,
});

// -- 3. prepare auth message
let authSig: AuthSig = {
sig: signedResult.signature,
derivedVia: 'web3.eth.personal.sign',
signedMessage: body,
address: getAddress(signedResult.address),
address: signedResult.address,
};

// -- 4. store auth and a keypair in localstorage for communication with sgx
Expand Down

0 comments on commit 18bb5ac

Please sign in to comment.