From 814e58bfdac99b1f2e80ef7bfe1ac1f72ef9e22d Mon Sep 17 00:00:00 2001 From: ms Date: Wed, 1 Dec 2021 14:17:21 +0100 Subject: taler-local: fix forwarded exchange link --- bin/WIP/taler-local | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/bin/WIP/taler-local b/bin/WIP/taler-local index e8b6df4..bac4fb2 100755 --- a/bin/WIP/taler-local +++ b/bin/WIP/taler-local @@ -1175,9 +1175,6 @@ def prepare(x_forwarded_host, x_forwarded_proto): cmd = f"{TALER_PREFIX}/bin/taler-merchant-demos landing -c {CFG_OUTDIR / 'taler.conf'}", env = TALER_UNIT_FILES_DIR / "taler-local-frontends.env" )) - def get_link(path): - return x_forwarded_proto + "://" + x_forwarded_host + path - with open(TALER_UNIT_FILES_DIR / "taler-local-frontends.env", "w") as frontends_env: frontends_env.write(( f"PATH={os.environ.get('PATH')}\n" @@ -1490,12 +1487,13 @@ def prepare(x_forwarded_host, x_forwarded_proto): except Exception as error: fail(error) FACADE_URL=response.json().get("facades")[0].get("baseUrl") - + def get_link(path): + return x_forwarded_proto + "://" + x_forwarded_host + path print_nn("Set suggested exchange at Sandbox...") Command([ "libeufin-sandbox", "default-exchange", - REV_PROXY_URL + "/exchange/", + get_link('/exchange/') EXCHANGE_PAYTO], env={ "PATH": os.environ["PATH"], @@ -1696,12 +1694,12 @@ def stop(): @cli.command() @click.option( "--bank-host", metavar="HOST", - help="Host serving the bank.", + help="Host serving the bank, defaults to 'localhost:8080'.", default="localhost:8080" ) @click.option( "--bank-proto", metavar="PROTO", - help="Protocol accepred by the bank", + help="Protocol accepred by the bank, defaults to 'http'", default="http" ) def withdraw(bank_host, bank_proto): -- cgit v1.2.3