Update lib/core/src/Cardano/Wallet.hs
Co-authored-by: Jonathan Knowles <[email protected]>
Co-authored-by: Jonathan Knowles <[email protected]>
repeats = 100 -- TODO: modify repeats based on data
-- | When estimating fee, it is rather cumbersome to return "cannot cover fee"
-- whereas clients are just asking for an estimation. Therefore, we convert
-- cannot cover errors into the necessary fee amount, even though there isn't
-- if clients are just asking for an estimation. Therefore, we convert
-- "cannot cover" errors into the necessary fee amount, even though there isn't
-- enough in the wallet to cover for these fees.
handleCannotCover :: ErrSelectAssets -> ExceptT ErrSelectAssets m Coin
handleCannotCover = \case
Rename acronym field to ticker
2409: Upgrade to cabal-3.4.0.0 for documentation r=newhoggy a=newhoggy Co-authored-by: John Ky <[email protected]>
These functions share the same general properties, so it makes senses to document these properties in a single place.
Use this function to replace the common functionality of: - `unsafePartitionCoin` - `unsafePartitionTokenQuantity`
- Model a lower-level "weakly-typed" metadata, which is essentially just a JSON object. - Model a level above this layer that translates from the "weakly-typed" metadata into a "strongly-typed" metadata. - Use the "weakly-typed" metadata type in all lower-level areas: - The database/storage layer - The server layer - The webhook layer - All these layers don't care much about what form the metadata is in, and so the weak type is more appropriate here. - Use the "strongly-typed" metadata type in the PR validator. - This is the only area where we want the stronger types. - Shuffle tests around accordingly, write new tests. - Cleanup the codebase a bit.