Skip to content
Permalink
Browse files

Sqlite: Fix instance PersistField TxState

It was looping infinitely.
  • Loading branch information...
rvl committed May 16, 2019
1 parent 91b630f commit a6430da75ce160ed871e6eaadbcba6b7923854d6
Showing with 2 additions and 4 deletions.
  1. +2 −4 lib/core/src/Cardano/Wallet/DB/SqliteTypes.hs
@@ -235,10 +235,8 @@ instance Read WalletState where
-- TxStatus

instance PersistField TxStatus where
toPersistValue =
toPersistValue . toText
fromPersistValue pv = first (const err) (fromPersistValue pv)
where err = "not a valid value: " <> T.pack (show pv)
toPersistValue = toPersistValue . toText
fromPersistValue = fromPersistValueFromText

instance PersistFieldSql TxStatus where
sqlType _ = sqlType (Proxy @Text)

0 comments on commit a6430da

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