(api_server, endpoint, **kwargs)
| 71 | |
| 72 | |
| 73 | def api_url_for(api_server, endpoint, **kwargs): |
| 74 | # url_for() expects binary address so we have to convert here |
| 75 | for key, val in kwargs.items(): |
| 76 | if isinstance(val, str) and val.startswith("0x"): |
| 77 | kwargs[key] = to_canonical_address(val) |
| 78 | with api_server.flask_app.app_context(): |
| 79 | return url_for(f"v1_resources.{endpoint}", **kwargs) |
no outgoing calls