osmosis-labs/osmosis-frontend

Re-enable `OSMOSIS_RPC_OVERWRITE` and `OSMOSIS_REST_OVERWRITE`

Closed this issue · 5 comments

In #3068, I had to manually override the endpoints used by the frontend to test my new one. Previously, we could override them using the OSMOSIS_RPC_OVERWRITE and OSMOSIS_REST_OVERWRITE environment variables, as seen here: https://github.com/osmosis-labs/osmosis-frontend/blob/stage/packages/web/config/env.ts#L3-L6.

Could we ensure that we maintain the ability to specify endpoints?

From what I can tell, #3068 updated URLS only in tests and in mock data for tests.

It appears those overwrite vars are still getting used, and are applied at our chain list generation (pre build step):

rpc:
isOsmosis && OSMOSIS_RPC_OVERWRITE
? [{ address: OSMOSIS_RPC_OVERWRITE }]
: chain.apis.rpc,
rest:
isOsmosis && OSMOSIS_REST_OVERWRITE
? [{ address: OSMOSIS_REST_OVERWRITE }]
: chain.apis.rest,

@niccoloraspa have you tried NEXT_PUBLIC_OSMOSIS_RPC_OVERWRITE and NEXT_PUBLIC_OSMOSIS_REST_OVERWRITE?

Yes, via vercel environment variables

Now I see the endpoints I have specified being used, yesterday was not the case. I also made sure to rebuild the project, so not sure what happened but I think we can close this issue.