Skip to content

Commit

Permalink
Fixed #189. Allow ada as default token for marlowe-cli template swap.
Browse files Browse the repository at this point in the history
  • Loading branch information
bwbush committed Dec 15, 2023
1 parent 0ff21f6 commit 0c91a73
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Changed

- Marlowe CLI swap template tokens default to ada if not specified.
6 changes: 3 additions & 3 deletions marlowe-cli/command/Language/Marlowe/CLI/Command/Template.hs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import Language.Marlowe.CLI.Command.Parse (
import Language.Marlowe.CLI.Examples (makeExample)
import Language.Marlowe.CLI.IO (decodeFileStrict)
import Language.Marlowe.CLI.Types (CliError (..), SomeTimeout, toMarloweExtendedTimeout, toMarloweTimeout)
import Language.Marlowe.Extended.V1 as E (Contract (..), Party, Token, Value (..))
import Language.Marlowe.Extended.V1 as E (Contract (..), Party, Token (..), Value (..))
import Language.Marlowe.Util (ada)
import Marlowe.Contracts (coveredCall, escrow, swap, trivial, zeroCouponBond)

Expand Down Expand Up @@ -455,7 +455,7 @@ templateSwapOptions =
)
<*> O.option
parseToken
( O.long "a-token" <> O.metavar "TOKEN" <> O.help "The first party's token."
( O.long "a-token" <> O.value (Token "" "") <> O.metavar "TOKEN" <> O.help "The first party's token (default is ada)."
)
<*> O.option
O.auto
Expand All @@ -473,7 +473,7 @@ templateSwapOptions =
)
<*> O.option
parseToken
( O.long "b-token" <> O.metavar "TOKEN" <> O.help "The second party's token."
( O.long "b-token" <> O.value (Token "" "") <> O.metavar "TOKEN" <> O.help "The second party's token. (default is ada)"
)
<*> O.option
O.auto
Expand Down

0 comments on commit 0c91a73

Please sign in to comment.