osmosis-labs / osmosis-frontend

Web interface for Osmosis Zone
https://app.osmosis.zone/
Apache License 2.0
232 stars 423 forks source link

Re-enable `OSMOSIS_RPC_OVERWRITE` and `OSMOSIS_REST_OVERWRITE` #3069

Closed niccoloraspa closed 7 months ago

niccoloraspa commented 7 months ago

In https://github.com/osmosis-labs/osmosis-frontend/pull/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?

jonator commented 7 months ago

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):

https://github.com/osmosis-labs/osmosis-frontend/blob/1c3972730d92a8fb348f44833d19e23483c8dccc/packages/web/config/utils.ts#L347-L354

jonator commented 7 months ago

@niccoloraspa have you tried NEXT_PUBLIC_OSMOSIS_RPC_OVERWRITE and NEXT_PUBLIC_OSMOSIS_REST_OVERWRITE?

niccoloraspa commented 7 months ago

Yes, via vercel environment variables

niccoloraspa commented 7 months ago

This is the project where I tried: https://vercel.com/osmo-labs/osmosis-frontend-dev/settings/environment-variables

niccoloraspa commented 7 months ago

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.