diff --git a/programs/world/src/lib.rs b/programs/world/src/lib.rs index 5d4ca64..3fbd2bd 100644 --- a/programs/world/src/lib.rs +++ b/programs/world/src/lib.rs @@ -36,7 +36,7 @@ pub mod world { } #[allow(unused_variables)] - pub fn add_entity(ctx: Context, extra_seed: Option) -> Result<()> { + pub fn add_entity(ctx: Context, Option>) -> Result<()> { require!( ctx.accounts.world.key() == ctx.accounts.world.pda().0, WorldError::WorldAccountMismatch @@ -132,7 +132,7 @@ pub struct InitializeNewWorld<'info> { } #[derive(Accounts)] -#[instruction(extra_seed: Option)] +#[instruction(extra_seed: Option>)] pub struct AddEntity<'info> { #[account(mut)] pub payer: Signer<'info>, @@ -142,7 +142,7 @@ pub struct AddEntity<'info> { None => world.entities.to_be_bytes() }, match extra_seed { - Some(ref seed) => seed.as_bytes(), + Some(ref seed) => seed, None => &[], }], bump)] pub entity: Account<'info, Entity>,