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

Update Wallet to use ENV file for Provider URL #300

Closed
camsjams opened this issue May 27, 2022 · 4 comments
Closed

Update Wallet to use ENV file for Provider URL #300

camsjams opened this issue May 27, 2022 · 4 comments
Labels
chore Issue is a chore

Comments

@camsjams
Copy link
Contributor

Per #203 there is a todo within @fuel-ts/wallet to remove hardcoded FUEL_NETWORK_URL value of 'http://127.0.0.1:4000/graphql'

@danielbate
Copy link
Member

Would be happy to pick this up over the weekend if it's still available? There seems to be lots of hardcoded usage of 'http://127.0.0.1:4000/graphql' throughout.

@arboleya
Copy link
Member

arboleya commented Feb 4, 2023

@danielbate If you ignore the occurrences inside test files (it seems to me like those should remain as is), only one is left:

export const FUEL_NETWORK_URL = 'http://127.0.0.1:4000/graphql';

It is used as a default param assignment in some methods, like this:

constructor(publicKey: string | AbstractAddress, provider: string | Provider = FUEL_NETWORK_URL) {

So, deleting the FUEL_NETWORK_URL constant would require changing all relevant method signatures using it (i.e., removing the default param assignment) and updating all broken usages of such methods.

@FuelLabs/sdk-ts Makes sense?

@LuizAsFight
Copy link
Contributor

makes sense @arboleya , maybe we could create a env var to hold http://127.0.0.1:4000/graphql instead ? then could do something like....

export const FUEL_NETWORK_URL = process.env.FUEL_PROVIDER_URL

@Torres-ssf Torres-ssf added chore Issue is a chore and removed refactor labels Dec 8, 2023
@arboleya
Copy link
Member

arboleya commented Dec 8, 2023

Closing as completed.

@arboleya arboleya closed this as completed Dec 8, 2023
petertonysmith94 pushed a commit that referenced this issue Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Issue is a chore
Projects
None yet
Development

No branches or pull requests

6 participants