Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review hardcoded URLs #79

Open
andreslucena opened this issue Mar 11, 2024 · 1 comment
Open

Review hardcoded URLs #79

andreslucena opened this issue Mar 11, 2024 · 1 comment

Comments

@andreslucena
Copy link
Collaborator

Comes from comment

Having the hardcoded URLs in the module was because we didn't have a way of knowing from Ruby-land the values from the NPM package. Now that we have the SDK integrated in Ruby we could extract it with the node-wrapper, right @microstudi?

Currently we have this URL in multiple places, for instance for STG:

rg https://api-stg.vocdoni.net .
./lib/decidim/vocdoni.rb
18:      "stg" => "https://api-stg.vocdoni.net/v2",

./app/packs/src/decidim/vocdoni/voter/setup-vote.js
39:    client.url = "https://api-stg.vocdoni.net/v2";

./spec/lib/decidim/vocdoni/module_config_spec.rb
46:        expect(Decidim::Vocdoni::API_ENDPOINTS["stg"]).to eq("https://api-stg.vocdoni.net/v2")

./spec/fixtures/files/account.json
2:https://api-stg.vocdoni.net/v2/accounts/0xC32dd52AA9F18efa0f28628e7f6b7f77aD6D7dd4

In the past it already changed, and it'll be much better to extract it from the SDK/node-wrapper directly

@microstudi
Copy link
Contributor

not sure this is a good idea, what about using this module against a different instance of vocdoni (I know is a long shot anyway)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants