Skip to content

Commit 3ddc544

Browse files
committed
test(solana): build canonical stake authorize accounts
1 parent 2771e17 commit 3ddc544

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/test_msg_solana_signtx.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,11 +364,14 @@ def test_solana_sign_stake_authorize_clearsigns(self):
364364
self.requires_fullFeature()
365365
self.setup_mnemonic_allallall()
366366
from_pubkey = self._get_from_pubkey()
367+
clock_sysvar = b'\x66' * 32
367368
current_auth = b'\x77' * 32
368369
new_auth = b'\x88' * 32
369370
# Authorize (type=1 LE u32) + new authority(32) + StakeAuthorize role (0=staker)
370371
instr_data = struct.pack('<I', 1) + new_auth + struct.pack('<I', 0)
371-
raw_tx = self._build_tx(from_pubkey, [current_auth], self.STAKE_PROGRAM, instr_data)
372+
# Canonical account order: stake, clock sysvar, current authority.
373+
raw_tx = self._build_tx(
374+
from_pubkey, [clock_sysvar, current_auth], self.STAKE_PROGRAM, instr_data)
372375
resp = self.client.call(messages.SolanaSignTx(
373376
address_n=parse_path("m/44'/501'/0'/0'"), raw_tx=raw_tx))
374377
self.assertEqual(len(resp.signature), 64)

0 commit comments

Comments
 (0)