fix: fix createProgramAddress for bundled applications
This commit is contained in:
parent
e5210029b5
commit
dfd829a2e2
|
@ -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`);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue