make to account key as signer (#550)

fix: require to account sign
This commit is contained in:
Parth
2019-11-12 00:50:58 +05:30
committed by Michael Vines
parent 189807f5a5
commit df886a7a40
4 changed files with 4 additions and 2 deletions

View File

@@ -65,7 +65,7 @@ export class Loader {
data.length,
programId,
);
await sendAndConfirmTransaction(connection, transaction, payer);
await sendAndConfirmTransaction(connection, transaction, payer, program);
}
const dataLayout = BufferLayout.struct([

View File

@@ -184,7 +184,7 @@ export class SystemProgram {
return new Transaction().add({
keys: [
{pubkey: from, isSigner: true, isWritable: true},
{pubkey: newAccount, isSigner: false, isWritable: true},
{pubkey: newAccount, isSigner: true, isWritable: true},
],
programId: SystemProgram.programId,
data,