mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-03-13 19:37:30 +01:00
Add EitherOps back (#666)
This commit is contained in:
parent
b6a5ffea4d
commit
369474736a
2 changed files with 2 additions and 0 deletions
|
@ -10,6 +10,7 @@ case class EncryptedMnemonic(value: AesEncryptedData, salt: AesSalt)
|
|||
extends BitcoinSLogger {
|
||||
|
||||
def toMnemonic(password: AesPassword): Try[MnemonicCode] = {
|
||||
import org.bitcoins.core.util.EitherUtil.EitherOps._
|
||||
val key = password.toKey(salt)
|
||||
AesCrypt.decrypt(value, key).toTry.flatMap { decrypted =>
|
||||
decrypted.decodeUtf8 match {
|
||||
|
|
|
@ -165,6 +165,7 @@ object Wallet extends CreateWalletApi with BitcoinSLogger {
|
|||
override def initializeWithEntropy(entropy: BitVector)(
|
||||
implicit config: WalletAppConfig,
|
||||
ec: ExecutionContext): Future[InitializeWalletResult] = {
|
||||
import org.bitcoins.core.util.EitherUtil.EitherOps._
|
||||
|
||||
logger.info(s"Initializing wallet on chain ${config.network}")
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue