mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-18 05:51:34 +02:00
fix: Error while restoring Solana Wallet with PrivateKey (#2201)
This commit is contained in:
@@ -167,10 +167,10 @@ abstract class SolanaWalletBase
|
||||
|
||||
try {
|
||||
final keypairBytes = Base58Decoder.decode(privateKey!);
|
||||
return SolanaPrivateKey.fromSeed(keypairBytes);
|
||||
return SolanaPrivateKey.fromBytes(keypairBytes);
|
||||
} catch (_) {
|
||||
final privateKeyBytes = HEX.decode(privateKey!);
|
||||
return SolanaPrivateKey.fromBytes(privateKeyBytes);
|
||||
return SolanaPrivateKey.fromSeed(privateKeyBytes);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user