Skip to content

Commit

Permalink
Sqlite: Fix instance PersistField TxState
Browse files Browse the repository at this point in the history
It was looping infinitely.
  • Loading branch information
rvl committed May 16, 2019
1 parent 91b630f commit a6430da
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/core/src/Cardano/Wallet/DB/SqliteTypes.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a6430da

Please sign in to comment.