diff --git a/src/GWallet.Backend/UtxoCoin/Lightning/ChannelManagement.fs b/src/GWallet.Backend/UtxoCoin/Lightning/ChannelManagement.fs index 0ddcf90d8..9f2d9c97d 100644 --- a/src/GWallet.Backend/UtxoCoin/Lightning/ChannelManagement.fs +++ b/src/GWallet.Backend/UtxoCoin/Lightning/ChannelManagement.fs @@ -129,11 +129,7 @@ type ChannelInfo = module internal CryptoUtil = let internal AccountPrivateKeyToNodeMasterPrivKey (accountKey: Key): NodeMasterPrivKey = - let privateKeyBytesLength = 32 - let bytes: array = Array.zeroCreate privateKeyBytesLength - use bytesStream = new MemoryStream(bytes) - let stream = NBitcoin.BitcoinStream(bytesStream, true) - accountKey.ReadWrite stream + let bytes = accountKey.ToBytes () let hashed = NBitcoin.Crypto.Hashes.DoubleSHA256 bytes NodeMasterPrivKey <| NBitcoin.ExtKey (hashed.ToString())