FuelLabs / fuels-ts

Fuel Network Typescript SDK
https://docs.fuel.network/docs/fuels-ts/
Apache License 2.0
44.21k stars 1.34k forks source link

`this.provider.url` is not considering auth url passed #3142

Closed LuizAsFight closed 3 weeks ago

LuizAsFight commented 3 weeks ago

when the provider is created, if a basic auth is sent, it gets lost as the sdk implementation will put basic auth in headers function, and create the provider with an URL without basic auth

this becomes a problem when it's needed to create a new provider from the provider.url we have, for instance in string communication protocols, like JSON, state saving

I think this.provider.url should be as it was inputted, then when using it internally in fetch request, basic auth part can be taken out