From 764805710b92182e3b99075375c40d3f6aa25e7e Mon Sep 17 00:00:00 2001 From: "Jean Marchand (Exotic Markets)" Date: Thu, 25 Apr 2024 18:34:34 +0200 Subject: [PATCH] network: Fix worker utils create instruction (#26) * cli: Fix worker creation * network: Fix worker utils create --- cli/src/processor/worker.rs | 1 - programs/network/src/instructions/worker_utils_create.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cli/src/processor/worker.rs b/cli/src/processor/worker.rs index 88a339ee..52b4e79b 100644 --- a/cli/src/processor/worker.rs +++ b/cli/src/processor/worker.rs @@ -95,7 +95,6 @@ pub fn create(client: &Client, signatory: Keypair, silent: bool) -> Result<(), C associated_token_program: associated_token::ID, authority: client.payer_pubkey(), config: Config::pubkey(), - // fee: Fee::pubkey(worker_pubkey), signatory: signatory.pubkey(), mint: config.mint, registry: Registry::pubkey(), diff --git a/programs/network/src/instructions/worker_utils_create.rs b/programs/network/src/instructions/worker_utils_create.rs index ab9c837f..dbcd0d99 100644 --- a/programs/network/src/instructions/worker_utils_create.rs +++ b/programs/network/src/instructions/worker_utils_create.rs @@ -13,7 +13,7 @@ pub struct WorkerUtilsCreate<'info> { #[account( seeds = [ SEED_WORKER, - registry.total_workers.to_be_bytes().as_ref(), + (registry.total_workers - 1).to_be_bytes().as_ref(), ], bump = worker.bump, )]