Skip to content

Commit 28cd8eb

Browse files
committed
fix writable
1 parent 882214b commit 28cd8eb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tuktuk-sdk/src/compiled_transaction.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,13 @@ pub fn compile_transaction(
101101

102102
let remaining_accounts = sorted_accounts
103103
.iter()
104-
.map(|k| AccountMeta {
104+
.enumerate()
105+
.map(|(index, k)| AccountMeta {
105106
pubkey: *k,
106107
is_signer: false,
107-
is_writable: false,
108+
is_writable: index < num_rw_signers as usize
109+
|| (index >= num_rw_signers as usize + num_ro_signers as usize
110+
&& index < num_rw_signers as usize + num_ro_signers as usize + num_rw as usize),
108111
})
109112
.collect();
110113

0 commit comments

Comments
 (0)