mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
fix: Error while restoring Solana Wallet with PrivateKey (#2201)
This commit is contained in:
parent
87207c61ba
commit
469373b780
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue