Skip to content
Permalink
Browse files

Sqlite: use selectWallet function more

  • Loading branch information...
rvl committed May 16, 2019
1 parent 8da7be4 commit 6e98bb6fa521ffcf2f6ef6d3c32212fbaf787181
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/core/src/Cardano/Wallet/DB/Sqlite.hs
@@ -306,7 +306,7 @@ newDBLayer fp = do

{ createWallet = \(PrimaryKey wid) cp meta ->
ExceptT $ unsafeRunQuery conn $
selectFirst [WalTableId ==. wid] [] >>= \case
selectWallet wid >>= \case
Just _ ->
pure $ Left $ ErrWalletAlreadyExists wid
Nothing -> Right <$> do
@@ -349,7 +349,7 @@ newDBLayer fp = do

, putWalletMeta = \(PrimaryKey wid) meta ->
ExceptT $ unsafeRunQuery conn $
selectFirst [WalTableId ==. wid] [] >>= \case
selectWallet wid >>= \case
Just _ -> do
updateWhere [WalTableId ==. wid]
(mkWalletMetadataUpdate meta)

0 comments on commit 6e98bb6

Please sign in to comment.
You can’t perform that action at this time.