Skip to content

Commit

Permalink
Zero Coupon Bond example - fixing a parameter name. (#3189)
Browse files Browse the repository at this point in the history
* Fixing a parameter name.
  • Loading branch information
merivale authored May 14, 2021
1 parent d9bbf18 commit 530cc13
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions marlowe-playground-client/src/Examples/JS/Contracts.purs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ zeroCouponBond :: String
zeroCouponBond =
"""
const discountedPrice: Value = ConstantParam("Discounted price");
const notional: Value = ConstantParam("Notional");
const notionalPrice: Value = ConstantParam("Notional price");
const investor: Party = Role("Investor");
const issuer: Party = Role("Issuer");
Expand All @@ -201,7 +201,7 @@ zeroCouponBond =
const contract: Contract =
transfer(initialExchange, investor, issuer, discountedPrice,
transfer(maturityExchangeTimeout, issuer, investor, notional,
transfer(maturityExchangeTimeout, issuer, investor, notionalPrice,
Close))
return contract;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ all =
, valueContent:
Map.fromFoldable
[ "Discounted price" /\ fromInt 50
, "Notional" /\ fromInt 100
, "Notional price" /\ fromInt 100
]
}
)
Expand Down
6 changes: 3 additions & 3 deletions marlowe-playground-server/contracts/ZeroCouponBond.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import Language.Marlowe.Extended
main :: IO ()
main = print . pretty $ contract

discountedPrice, notional :: Value
discountedPrice, notionalPrice :: Value
discountedPrice = ConstantParam "Discounted price"
notional = ConstantParam "Notional"
notionalPrice = ConstantParam "Notional price"

investor, issuer :: Party
investor = Role "Investor"
Expand All @@ -27,5 +27,5 @@ transfer timeout from to amount continuation =

contract :: Contract
contract = transfer initialExchange investor issuer discountedPrice
$ transfer maturityExchangeTimeout issuer investor notional
$ transfer maturityExchangeTimeout issuer investor notionalPrice
Close
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ ada = Token "" ""
discountedPrice :: Value
discountedPrice = ConstantParam "Discounted price"

notional :: Value
notional = ConstantParam "Notional"
notionalPrice :: Value
notionalPrice = ConstantParam "Notional price"

investor :: Party
investor = Role "Investor"
Expand All @@ -69,5 +69,5 @@ transfer timeout from to amount continuation =
fullExtendedContract :: Contract
fullExtendedContract =
transfer initialExchange investor issuer discountedPrice
$ transfer maturityExchangeTimeout issuer investor notional
$ transfer maturityExchangeTimeout issuer investor notionalPrice
Close

0 comments on commit 530cc13

Please sign in to comment.