fix: better constructor pattern parsing
This commit is contained in:
@@ -33,9 +33,10 @@ pub fn spend(
|
||||
rdmr: Redeemer,
|
||||
ctx: spend.ScriptContext,
|
||||
) -> Bool {
|
||||
when datum.rdmr is {
|
||||
sample.Buy(tipo1, fin) -> fin > 0
|
||||
sample.Sell(twice, find: fin) -> fin > 0
|
||||
let x = datum.rdmr
|
||||
when x is {
|
||||
sample.Buy { fin: fin, .. } -> fin > 0
|
||||
sample.Sell { find: fin, .. } -> fin > 0
|
||||
sample.Hold(some) -> some > 0
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user