get basic when conditions to work
This commit is contained in:
@@ -27,3 +27,12 @@ pub fn eqString(a: ByteArray, b: ByteArray) {
|
||||
a == b
|
||||
}
|
||||
|
||||
pub type Thing {
|
||||
Some
|
||||
None
|
||||
}
|
||||
|
||||
pub type Other {
|
||||
Wow
|
||||
Yes
|
||||
}
|
||||
|
||||
@@ -16,8 +16,7 @@ pub fn spend(datum: sample.Datum, rdmr: Redeemer, ctx: spend.ScriptContext) -> B
|
||||
let b = datum.rdmr
|
||||
|
||||
when b is {
|
||||
sample.Buy | sample.Sell -> 1 == 1
|
||||
sample.Buy -> 1 == 1
|
||||
sample.Sell -> 5 == 1
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user