fix: Error while restoring Solana Wallet with PrivateKey (#2201)

David Adegoke committed Apr 14, 2025 at 18:27 UTC 469373b780a2cee1857b0951ce30312e6b21f1ad
1 file changed +2 -2
cw_solana/lib/solana_wallet.dart
+2 -2
@@ -167,10 +167,10 @@ abstract class SolanaWalletBase
167
168 try {
169 final keypairBytes = Base58Decoder.decode(privateKey!);
170 - return SolanaPrivateKey.fromSeed(keypairBytes);
170 + return SolanaPrivateKey.fromBytes(keypairBytes);
171 } catch (_) {
172 final privateKeyBytes = HEX.decode(privateKey!);
173 - return SolanaPrivateKey.fromBytes(privateKeyBytes);
173 + return SolanaPrivateKey.fromSeed(privateKeyBytes);
174 }
175 }
176