Skip to content

Commit

Permalink
minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
yellowbean committed Nov 10, 2023
1 parent 781fbca commit 8479938
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions absbox/local/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ def mkAccountCapType(x):
case _:
raise RuntimeError(f"Failed to match {x}:mkAccountCapType")

def mkLimit(x):
def mkLimit(x:dict):
match x:
case {"余额百分比": pct} | {"balPct": pct}:
return mkTag(("DuePct", pct))
Expand Down Expand Up @@ -750,7 +750,9 @@ def mkAction(x:list):
case ["条件执行2", pre, actions1, actions2] | ["IfElse", pre, actions1, actions2]:
return mkTag(("ActionWithPre2", [mkPre(pre), [mkAction(a) for a in actions1], [mkAction(a) for a in actions2]] ))
case ["购买资产", liq, source, _limit] | ["buyAsset", liq, source, _limit]:
return mkTag(("BuyAsset", [_limit, mkLiqMethod(liq), source]))
return mkTag(("BuyAsset", [mkLimit(_limit), mkLiqMethod(liq), source]))
case ["购买资产", liq, source] | ["buyAsset", liq, source]:
return mkTag(("BuyAsset", [None, mkLiqMethod(liq), source]))
case ["更新事件", trgName] | ["runTrigger", trgName]:
dealCycleM = chinaDealCycle | englishDealCycle
return mkTag(("RunTrigger", ["InWF",trgName]))
Expand Down

0 comments on commit 8479938

Please sign in to comment.