diff --git a/src/GWallet.Backend/Account.fs b/src/GWallet.Backend/Account.fs index aa1f1c3b3..9fad24398 100644 --- a/src/GWallet.Backend/Account.fs +++ b/src/GWallet.Backend/Account.fs @@ -17,13 +17,8 @@ type UnhandledCurrencyServerException(currency: Currency, module Account = - let private isInitialized (accounts: seq) = lazy( + let private isInitialized (_accounts: seq) = lazy( Config.Init() - - let readonlyUtxoAccounts = - accounts.Where(fun acc -> acc.Currency.IsUtxo()).OfType() - - UtxoCoin.Account.MigrateReadOnlyAccountsToNativeSegWit readonlyUtxoAccounts ) let private GetShowableBalanceAndImminentPaymentInternal (account: IAccount) diff --git a/src/GWallet.Backend/UtxoCoin/UtxoCoinAccount.fs b/src/GWallet.Backend/UtxoCoin/UtxoCoinAccount.fs index e5ac553fe..ccaba5d12 100644 --- a/src/GWallet.Backend/UtxoCoin/UtxoCoinAccount.fs +++ b/src/GWallet.Backend/UtxoCoin/UtxoCoinAccount.fs @@ -700,36 +700,6 @@ module Account = Config.AddAccount conceptAccountForReadOnlyAccount AccountKind.ReadOnly |> ignore - let internal MigrateReadOnlyAccountsToNativeSegWit (readOnlyUtxoAccounts: seq): unit = - let utxoAccountsToMigrate = - seq { - for utxoAccount in readOnlyUtxoAccounts do - let accountFile = utxoAccount.AccountFile - let prefix = - match (utxoAccount :> IAccount).Currency with - | Currency.BTC -> - BITCOIN_ADDRESS_BECH32_PREFIX - | Currency.LTC -> - LITECOIN_ADDRESS_BECH32_PREFIX - | otherCurrency -> failwith <| SPrintF1 "Missed UTXO currency %A when implementing NativeSegwit migration?" otherCurrency - if not (accountFile.Name.StartsWith prefix) then - yield utxoAccount - } - - let utxoPublicKeys = - seq { - for utxoReadOnlyAccount in utxoAccountsToMigrate do - let accountFile = utxoReadOnlyAccount.AccountFile - let utxoPublicKey = accountFile.Content() - yield utxoPublicKey - } |> Set.ofSeq - - for utxoPublicKey in utxoPublicKeys do - CreateReadOnlyAccounts utxoPublicKey - - for utxoReadOnlyAccount in utxoAccountsToMigrate do - Config.RemoveReadOnlyAccount utxoReadOnlyAccount - let GetSignedTransactionDetails<'T when 'T :> IBlockchainFeeInfo>(rawTransaction: string) (currency: Currency) (readonlyUtxoAccounts: seq)