fix: update budget wire format
This commit is contained in:
parent
ec2a3690b2
commit
9839c087d7
|
@ -186,12 +186,9 @@ export class BudgetProgram {
|
|||
): Transaction {
|
||||
const userdata = Buffer.alloc(1024);
|
||||
let pos = 0;
|
||||
userdata.writeUInt32LE(0, pos); // NewContract instruction
|
||||
userdata.writeUInt32LE(0, pos); // NewBudget instruction
|
||||
pos += 4;
|
||||
|
||||
userdata.writeUInt32LE(amount, pos); // Contract.tokens
|
||||
pos += 8;
|
||||
|
||||
switch (conditions.length) {
|
||||
case 0:
|
||||
userdata.writeUInt32LE(0, pos); // Budget enum = Pay
|
||||
|
@ -267,12 +264,9 @@ export class BudgetProgram {
|
|||
): Transaction {
|
||||
const userdata = Buffer.alloc(1024);
|
||||
let pos = 0;
|
||||
userdata.writeUInt32LE(0, pos); // NewContract instruction
|
||||
userdata.writeUInt32LE(0, pos); // NewBudget instruction
|
||||
pos += 4;
|
||||
|
||||
userdata.writeUInt32LE(amount, pos); // Contract.tokens
|
||||
pos += 8;
|
||||
|
||||
userdata.writeUInt32LE(3, pos); // Budget enum = And
|
||||
pos += 4;
|
||||
|
||||
|
|
Loading…
Reference in New Issue