fix: Keypair

This commit is contained in:
Börkur I. Jónsson 2022-05-05 22:18:28 +00:00
parent 2795160bc4
commit a430c25731
1 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@ async function examplePerp() {
}
// Place order
const owner = new Keypair(readKeypair());
const owner = Keypair.fromSecretKey(Uint8Array.from(readKeypair()));
const mangoAccount = (
await client.getMangoAccountsForOwner(mangoGroup, owner.publicKey)
)[0];
@ -157,7 +157,7 @@ async function exampleSpot() {
}
// Place order
const owner = readKeypair();
const owner = Keypair.fromSecretKey(Uint8Array.from(readKeypair()));
const mangoAccount = (
await client.getMangoAccountsForOwner(mangoGroup, owner.publicKey)
)[0];