fix: fix createProgramAddress for bundled applications

This commit is contained in:
Hendrik Hofstadt 2020-08-10 09:07:55 +02:00 committed by Justin Starry
parent e5210029b5
commit dfd829a2e2
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ export class PublicKey {
Buffer.from('ProgramDerivedAddress'),
]);
let hash = await sha256(new Uint8Array(buffer));
let publicKeyBytes = new BN(hash, 16).toBuffer();
let publicKeyBytes = new BN(hash, 16).toArray();
if (is_on_curve(publicKeyBytes)) {
throw new Error(`Invalid seeds, address must fall off the curve`);
}