-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop W.Coin
, W.UTxO
, W.TxOut
usage in BalanceSpec
#4940
base: anviking/ADP-3413/balanceTx-unit-conway
Are you sure you want to change the base?
Drop W.Coin
, W.UTxO
, W.TxOut
usage in BalanceSpec
#4940
Conversation
25dfa64
to
95fb19f
Compare
lovelaceF (Coin l) | ||
| l < 0 = "-" <> pretty (W.Coin.unsafeFromIntegral (-l)) | ||
| otherwise = pretty (W.Coin.unsafeFromIntegral l) | ||
lovelaceF (Coin c) = fixedF @Double 6 (fromIntegral c / 1e6) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the W.Coin
implementation
address :: IsRecentEra era => TxOut era -> W.Address | ||
address = Convert.toWallet . view addrTxOutL | ||
address :: TxOut era -> Address | ||
address = view addrTxOutL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -875,14 +871,14 @@ spec_balanceTx era = describe "balanceTx" $ do | |||
horizon = SlotNo 20 | |||
beyondHorizon = SlotNo 21 | |||
|
|||
wallet = mkTestWallet (utxo [W.Coin 5_000_000]) | |||
wallet = mkTestWallet (utxo [Coin 5_000_000]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not lovelace
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aha, Coin
is not Value
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 👍
Drop a significant part of the usage of
W.Coin
,W.TxOut
,W.UTxO
inBalanceSpec
, as partof the effort to eventually consistently only use ledger types.
Depends on #4762