fix: Add preliminary handling for credit-only account designation

This commit is contained in:
Tyera Eulberg
2019-05-23 18:24:38 -06:00
committed by Michael Vines
parent 78ad376bcd
commit c99d8dd15c
9 changed files with 156 additions and 110 deletions

View File

@ -49,8 +49,8 @@ export class SystemProgram {
return new Transaction().add({
keys: [
{pubkey: from, isSigner: true},
{pubkey: newAccount, isSigner: false},
{pubkey: from, isSigner: true, isDebitable: true},
{pubkey: newAccount, isSigner: false, isDebitable: true},
],
programId: SystemProgram.programId,
data,
@ -76,7 +76,10 @@ export class SystemProgram {
);
return new Transaction().add({
keys: [{pubkey: from, isSigner: true}, {pubkey: to, isSigner: false}],
keys: [
{pubkey: from, isSigner: true, isDebitable: true},
{pubkey: to, isSigner: false, isDebitable: false},
],
programId: SystemProgram.programId,
data,
});
@ -101,7 +104,7 @@ export class SystemProgram {
);
return new Transaction().add({
keys: [{pubkey: from, isSigner: true}],
keys: [{pubkey: from, isSigner: true, isDebitable: true}],
programId: SystemProgram.programId,
data,
});