Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel committed Apr 4, 2024
1 parent 2d760c3 commit 29478de
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/devtool/src/app/_hooks/useAccountSignature.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const useAccountSignature = () => {
htm: 'POST',
uri: 'https://armory.narval.xyz/sign',
created: new Date().getTime(),
ath: hexToBase64Url(`0x${hash(accessToken)}`)
ath: hexToBase64Url(hash(accessToken))
}

const signature = await signJwsd(payload, jwsdHeader, signer).then((jws) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ export class EngineSignerConfigService {

async getPublicJwkOrThrow(): Promise<PublicKey> {
const signerConfig = await this.getSignerConfigOrThrow()
const hex = await privateKeyToHex(signerConfig.key)

return secp256k1PrivateKeyToPublicJwk(privateKeyToHex(signerConfig.key))
return secp256k1PrivateKeyToPublicJwk(hex)
}

async getSignerConfigOrThrow(): Promise<SignerConfig> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ export class ClientController {
updatedAt: now
})

const publicKey = secp256k1PrivateKeyToPublicJwk(privateKeyToHex(client.signer.key))
const hex = await privateKeyToHex(client.signer.key)

const publicKey = secp256k1PrivateKeyToPublicJwk(hex)

return {
...client,
Expand Down

0 comments on commit 29478de

Please sign in to comment.