Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async addLedgerAccessKey(accountId) {
const client = await createClient()
window.client = client
const rawPublicKey = await client.getPublicKey()
const publicKey = new PublicKey(KeyType.ED25519, rawPublicKey)
await setKeyMeta(publicKey, { type: 'ledger' })
return await this.getAccount(accountId).addKey(publicKey)
}