Skip to content

Commit

Permalink
fix: use string concatentation for url building
Browse files Browse the repository at this point in the history
  • Loading branch information
troykessler committed Aug 17, 2023
1 parent 05484f8 commit f5af0b4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions common/sdk/src/clients/lcd-client/lcd-client.abstract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ export class AbstractKyveLCDClient {

constructor(restEndpoint: string) {
this.restEndpoint = restEndpoint;
this.request = (url: string, params?: Record<string, any>) =>
axios
.get(`${this.restEndpoint}${url}`, { params })
.then((res) => res.data);

this.request = (url: string, params?: Record<string, any>) => {
const path = `${this.restEndpoint}${url}`;
return axios.get(path, { params }).then((res) => res.data);
};
}
}

0 comments on commit f5af0b4

Please sign in to comment.