zc cant be PDA
This commit is contained in:
parent
8e5c46c92d
commit
0fcadfa9f1
|
@ -28,7 +28,16 @@ pub struct CreateContributor<'info> {
|
|||
pub struct InitializeSale<'info> {
|
||||
pub contributor: Account<'info, Contributor>,
|
||||
|
||||
#[account(zero)]
|
||||
#[account(
|
||||
init,
|
||||
seeds = [
|
||||
SEED_PREFIX_SALE.as_bytes(),
|
||||
&get_sale_id(&core_bridge_vaa)?,
|
||||
],
|
||||
payer = owner,
|
||||
bump,
|
||||
space = Sale::MAXIMUM_SIZE
|
||||
)]
|
||||
pub sale: AccountLoader<'info, Sale>,
|
||||
|
||||
#[account(
|
||||
|
|
|
@ -139,8 +139,6 @@ describe("anchor-contributor", () => {
|
|||
program.programId
|
||||
);
|
||||
|
||||
const createSaleIx = await program.account.sale.createInstruction(sale_acc)
|
||||
|
||||
//Find the Core Bridge VAA address (uses hash of)
|
||||
//Create VAA Hash to use in core bridge key
|
||||
let buffer_array = [];
|
||||
|
@ -167,7 +165,7 @@ describe("anchor-contributor", () => {
|
|||
owner: owner.publicKey,
|
||||
systemProgram: anchor.web3.SystemProgram.programId,
|
||||
})
|
||||
.rpc();
|
||||
.rpc({skipPreflight: false});
|
||||
|
||||
console.log(await program.account.sale.fetch(sale_acc));
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue