diff --git a/src/stake-program.js b/src/stake-program.js index 4be22f24e3d..77f0220c56c 100644 --- a/src/stake-program.js +++ b/src/stake-program.js @@ -558,13 +558,12 @@ export class StakeProgram { const {stakePubkey, authorizedPubkey, splitStakePubkey, lamports} = params; let transaction = SystemProgram.createAccount({ - fromPubkey: stakePubkey, + fromPubkey: authorizedPubkey, newAccountPubkey: splitStakePubkey, lamports: 0, space: this.space, programId: this.programId, }); - transaction.instructions[0].keys[0].isSigner = false; const type = STAKE_INSTRUCTION_LAYOUTS.Split; const data = encodeData(type, {lamports}); diff --git a/test/stake-program.test.js b/test/stake-program.test.js index 8dae9489a8f..0cfb199e291 100644 --- a/test/stake-program.test.js +++ b/test/stake-program.test.js @@ -142,7 +142,7 @@ test('split', () => { expect(transaction.instructions).toHaveLength(2); const [systemInstruction, stakeInstruction] = transaction.instructions; const systemParams = { - fromPubkey: stakePubkey, + fromPubkey: authorizedPubkey, newAccountPubkey: splitStakePubkey, lamports: 0, space: StakeProgram.space,