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

Create new URI instead of passing serverUrl (Fix #379). #382

Merged
merged 3 commits into from
Jul 24, 2019
Merged

Conversation

abuiles
Copy link
Contributor

@abuiles abuiles commented Jul 24, 2019

The culprit was that we were passing a reference to serverURL which was getting modified in the builders.

@abuiles abuiles requested a review from morleyzhi July 24, 2019 20:13
@@ -167,7 +167,7 @@ export class Server {
* @returns {Promise} Promise that resolves to the fee stats returned by Horizon.
*/
public async operationFeeStats(): Promise<any> {
const cb = new CallBuilder(this.serverURL);
const cb = new CallBuilder(URI(this.serverURL as any));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@morleyzhi I'd do a refactor on a different PR, to pull this value in a getter, that way we don't have to remember to use URI each time we want to pass this around

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. Another option is to have CallBuilder handle converting strings to URI objects.

@abuiles abuiles merged commit aabb6ff into master Jul 24, 2019
@abuiles abuiles deleted the fix-379 branch July 24, 2019 20:29
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

Successfully merging this pull request may close these issues.

2 participants