def switch_opts
import cswap-bend-cli@0.1.0.0/cliswitch.bend as Cliswitchimport Base
import cswap-bend-cli@0.1.0.0/swlive.bend as SwLive
31# How long to wait before the post-switch re-read ($CSWAP_SWITCH_VERIFY_DELAY_MS,
32# default 2000 ms) and where the ownership lookup comes from ($CSWAP_SWITCH_ORACLE_FILE
33# names a JSON file in tests; unset means the profile endpoint).
34def switch_opts() -> IO(SwLive.Opts):
35 IO.bind(Result<&1, &1, U32 & String, String>, SwLive.Opts, IO.get_env("CSWAP_SWITCH_VERIFY_DELAY_MS"),
36 d => IO.bind(Result<&1, &1, U32 & String, String>, SwLive.Opts, IO.get_env("CSWAP_SWITCH_ORACLE_FILE"), o => IO.pure(SwLive.Opts, opts_of(d, o))))