Skip to content

Commit 6c218e7

Browse files
fix code snippet (#2395)
1 parent e7c0603 commit 6c218e7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pages/tutorials/use-passkey-as-backup-signer.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,14 @@ Once the calldata is prepared, send it to your smart account address to register
123123

124124
```ts
125125
import { PublicKey } from 'ox'
126+
import { toHex } from 'viem'
126127
import { HybridDeleGator, P256Owner } from '@metamask/delegation-toolkit/contracts'
127128

128129
// Deserialize the compressed public key.
129130
const publicKey = PublicKey.fromHex(credential.publicKey)
130131

131132
const p256Owner: P256Owner = {
132-
keyId: credential.id,
133+
keyId: toHex(credential.id),
133134
x: publicKey.x,
134135
y: publicKey.y,
135136
}

0 commit comments

Comments
 (0)