From 71e4c8dc7a44af569a0662ff978de831585fe3d6 Mon Sep 17 00:00:00 2001 From: Satoshi Qazi Muhammed Date: Thu, 16 Jul 2026 20:54:39 -0700 Subject: [PATCH] Fix CI: sender/recipient hex fixtures in Solana transaction tests were 1 hex digit short Both SolanaTransactionTest and RealSolanaTransactionServiceTest carried a transcription error from the earlier solders cross-validation: the sender/recipient pubkey hex strings (and one of expectedMessageHex's concatenated chunks) were each missing their trailing hex digit, producing odd-length hex that BouncyCastle's decoder throws on (StringIndexOutOfBoundsException) - all 5 SolanaTransactionTest cases failed at field-init time as a result. Re-derived every fixture programmatically from the same solders-verified reference message (rather than hand-splitting the hex string again) and confirmed the full round trip (build -> compare) matches byte-for-byte. --- .../nova/common/utils/SolanaTransactionTest.kt | 12 ++++++------ .../transaction/RealSolanaTransactionServiceTest.kt | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/common/src/test/java/io/novafoundation/nova/common/utils/SolanaTransactionTest.kt b/common/src/test/java/io/novafoundation/nova/common/utils/SolanaTransactionTest.kt index 7ee87fbd..69f379c5 100644 --- a/common/src/test/java/io/novafoundation/nova/common/utils/SolanaTransactionTest.kt +++ b/common/src/test/java/io/novafoundation/nova/common/utils/SolanaTransactionTest.kt @@ -14,15 +14,15 @@ class SolanaTransactionTest { * fixed vector, not a real network value). This test asserts our hand-rolled message builder produces the * exact same bytes solders did for the identical inputs. */ - private val senderPublicKey = "8a88e3dd7409f195fd52db2d3cba5d72ca6709bf1d94121bf3748801b40f6f5".fromHex() - private val recipientPublicKey = "c8139770ea87d175f56a35466c34c7ecccb8d8a91b4ee37a25df60f5b8fc9b3".fromHex() + private val senderPublicKey = "8a88e3dd7409f195fd52db2d3cba5d72ca6709bf1d94121bf3748801b40f6f5c".fromHex() + private val recipientPublicKey = "8139770ea87d175f56a35466c34c7ecccb8d8a91b4ee37a25df60f5b8fc9b394".fromHex() private val recentBlockhash = ByteArray(32) private val lamports = 123456789L - private val expectedMessageHex = "010001038a88e3dd7409f195fd52db2d3cba5d72ca6709bf1d94121bf3748801b40f6f5" + - "c8139770ea87d175f56a35466c34c7ecccb8d8a91b4ee37a25df60f5b8fc9b39400000000000000000000000000000000" + - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + - "1020200010c0200000015cd5b0700000000" + private val expectedMessageHex = "010001038a88e3dd7409f195fd52db2d3cba5d72ca6709bf1d94121bf3748801b40f6f5c813" + + "9770ea87d175f56a35466c34c7ecccb8d8a91b4ee37a25df60f5b8fc9b39400000000000000" + + "000000000000000000000000000000000000000000000000000000000000000000000000000" + + "00000000000000000000000000000000000000001020200010c0200000015cd5b0700000000" @Test fun `buildTransferMessage should match the independently-built solders reference vector`() { diff --git a/feature-wallet-impl/src/test/java/io/novafoundation/nova/feature_wallet_impl/data/network/solana/transaction/RealSolanaTransactionServiceTest.kt b/feature-wallet-impl/src/test/java/io/novafoundation/nova/feature_wallet_impl/data/network/solana/transaction/RealSolanaTransactionServiceTest.kt index 8db4f54a..2b34d7f4 100644 --- a/feature-wallet-impl/src/test/java/io/novafoundation/nova/feature_wallet_impl/data/network/solana/transaction/RealSolanaTransactionServiceTest.kt +++ b/feature-wallet-impl/src/test/java/io/novafoundation/nova/feature_wallet_impl/data/network/solana/transaction/RealSolanaTransactionServiceTest.kt @@ -72,8 +72,8 @@ class RealSolanaTransactionServiceTest { private lateinit var subject: RealSolanaTransactionService - private val senderPublicKey = "8a88e3dd7409f195fd52db2d3cba5d72ca6709bf1d94121bf3748801b40f6f5".fromHex() - private val recipientPublicKey = "c8139770ea87d175f56a35466c34c7ecccb8d8a91b4ee37a25df60f5b8fc9b3".fromHex() + private val senderPublicKey = "8a88e3dd7409f195fd52db2d3cba5d72ca6709bf1d94121bf3748801b40f6f5c".fromHex() + private val recipientPublicKey = "8139770ea87d175f56a35466c34c7ecccb8d8a91b4ee37a25df60f5b8fc9b394".fromHex() private val recipientAddress = Base58.encode(recipientPublicKey) private val recentBlockhash = ByteArray(32) private val lamports = 123456789L