Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit 39a9019

Browse files
authored
Merge pull request #3393 from input-output-hk/check-all-wallet-TODOs
[CBR-227] Go over TODOs, remove stray, add tickets
2 parents 7c702a7 + 7520156 commit 39a9019

File tree

13 files changed

+9
-42
lines changed

13 files changed

+9
-42
lines changed

wallet-new/server/Main.hs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,6 @@ actionWithNewWallet pm txpConfig sscParams nodeParams params =
127127
sscParams
128128
(txpGlobalSettings pm txpConfig)
129129
(initNodeDBs pm epochSlots) $ \nr -> do
130-
-- TODO: Will probably want to extract some parameters from the
131-
-- 'NewWalletBackendParams' to construct or initialize the wallet
132-
133-
-- TODO(ks): Currently using non-implemented layer for wallet layer.
134130
userSecret <- readTVarIO (ncUserSecret $ nrContext nr)
135131
let nodeState = NodeStateAdaptor.newNodeStateAdaptor nr
136132
liftIO $ Keystore.bracketLegacyKeystore userSecret $ \keystore -> do

wallet-new/src/Cardano/Wallet/API/V1/Handlers/Transactions.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ newTransaction :: ActiveWalletLayer IO
5353
-> Handler (WalletResponse Transaction)
5454
newTransaction aw payment@Payment{..} = do
5555

56-
-- TODO(adn) If the wallet is being restored, we need to disallow any @Payment@ from
57-
-- being submitted.
5856
-- NOTE(adn) The 'SenderPaysFee' option will become configurable as part
5957
-- of CBR-291.
6058
res <- liftIO $ (WalletLayer.pay aw) (maybe mempty coerce pmtSpendingPassword)

wallet-new/src/Cardano/Wallet/Kernel.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ data WalletHandles = Handles {
103103
handlesOpen :: IO WalletHandles
104104
handlesOpen = do
105105
db <- openMemoryState defDB
106-
metadb <- openMetaDB ":memory:" -- TODO: Eventually :memory: should be replaced with the real path.
106+
metadb <- openMetaDB ":memory:" -- TODO: CBR-378
107107
migrateMetaDB metadb -- TODO: this will be run with asynchronous exceptions masked.
108108
return $ Handles db metadb
109109

@@ -144,7 +144,7 @@ init PassiveWallet{..} = do
144144

145145
-- | Prefilter the block for each esk in the `WalletESK` map.
146146
-- Return a unified Map of accountId and prefiltered blocks (representing multiple ESKs)
147-
-- TODO(@uroboros/ryan) optimisation: we are prefiltering the block n times for n keys, change this to be a single pass
147+
-- TODO: Improve performance (CBR-379)
148148
prefilterBlock' :: PassiveWallet
149149
-> ResolvedBlock
150150
-> IO (Map HdAccountId PrefilteredBlock)

wallet-new/src/Cardano/Wallet/Kernel/Addresses.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ data CreateAddressError =
5252
-- to find another random index would be too expensive
5353
deriving Eq
5454

55-
-- TODO(adn): This will be done as part of my work on the 'newTransaction'
56-
-- endpoint, see [CBR-313].
5755
instance Arbitrary CreateAddressError where
5856
arbitrary = oneof []
5957

wallet-new/src/Cardano/Wallet/Kernel/CoinSelection/FromGeneric.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ runCoinSelT opts pickUtxo policy request utxo = do
250250
originalOuts = case outs of
251251
[] -> error "runCoinSelT: empty list of outputs"
252252
o:os -> o :| os
253-
-- TODO: We should shuffle allOuts
253+
-- TODO: We should shuffle allOuts CBR-380
254254
return . Right $ CoinSelFinalResult allInps
255255
originalOuts
256256
(concatMap coinSelChange css)

wallet-new/src/Cardano/Wallet/Kernel/DB/HdWallet.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,6 @@ instance Arbitrary HdAddressId where
239239
-- address indices.
240240
--
241241
-- NOTE: We do not store the encrypted key of the wallet.
242-
--
243-
-- TODO: synchronization state
244242
data HdRoot = HdRoot {
245243
-- | Wallet ID
246244
_hdRootId :: HdRootId

wallet-new/src/Cardano/Wallet/Kernel/DB/HdWallet/Create.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,6 @@ initHdRoot rootId name hasPass assurance created = HdRoot {
148148
--
149149
-- It is the responsibility of the caller to check the wallet's spending
150150
-- password.
151-
--
152-
-- TODO: If any key derivation is happening when creating accounts, should we
153-
-- store a public key or an address or something?
154151
initHdAccount :: HdAccountId
155152
-> Checkpoint
156153
-> HdAccount

wallet-new/src/Cardano/Wallet/Kernel/DB/HdWallet/Read.hs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
--
33
-- NOTE: These are pure functions, which are intended to work on a snapshot
44
-- of the database. They are intended to support the V1 wallet API.
5-
--
6-
-- TODO: We need to think about which layer will have the responsibility for
7-
-- filtering and sorting. If we want the 'IxSet' stuff to be local to the
8-
-- "Kernel.DB" namespace (which would be a good thing), then filtering and
9-
-- sorting (and maybe even pagination) will need to happen here.
105
module Cardano.Wallet.Kernel.DB.HdWallet.Read (
116
-- | * Infrastructure
127
HdQuery

wallet-new/src/Cardano/Wallet/Kernel/DB/Resolved.hs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@ data ResolvedBlock = ResolvedBlock {
7171
makeLenses ''ResolvedTx
7272
makeLenses ''ResolvedBlock
7373

74-
-- TODO: Why are these necessary? and if they're not, get rid of InDb
75-
--deriveSafeCopy 1 'base ''ResolvedTx
76-
--deriveSafeCopy 1 'base ''ResolvedBlock
77-
7874
{-------------------------------------------------------------------------------
7975
Pretty-printing
8076
-------------------------------------------------------------------------------}

wallet-new/src/Cardano/Wallet/Kernel/DB/Sqlite.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ newConnection path = Sqlite.open path
355355
-- | Closes an open 'Connection' to the @Sqlite@ database stored in the
356356
-- input 'MetaDBHandle'.
357357
-- Even if open failed with error, this function should be called http://www.sqlite.org/c3ref/open.html
358-
-- TODO: provide a brucket style interface to ensure this.
358+
-- TODO: provide a bracket style interface to ensure this.
359359
closeMetaDB :: Sqlite.Connection -> IO ()
360360
closeMetaDB = Sqlite.close
361361

0 commit comments

Comments
 (0)