@branta-ops/branta 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/v2/client.js CHANGED
@@ -6,7 +6,7 @@ export class V2BrantaClient {
6
6
  }
7
7
  async getPayments(address, options = null) {
8
8
  const httpClient = this._createClient(options);
9
- const response = await httpClient.get(`/v2/payments/${address}`);
9
+ const response = await httpClient.get(`/v2/payments/${encodeURIComponent(address)}`);
10
10
  if (!response.ok || response.headers.get("content-length") === "0") {
11
11
  return [];
12
12
  }
@@ -78,7 +78,7 @@ export class V2BrantaClient {
78
78
  if (url.protocol === 'http:' || url.protocol === 'https:') {
79
79
  const baseUrl = this._resolveBaseUrl(options);
80
80
  if (baseUrl && new URL(baseUrl).origin === url.origin) {
81
- const segments = url.pathname.split('/').filter(Boolean);
81
+ const segments = url.pathname.split('/').filter(Boolean).map(decodeURIComponent);
82
82
  const [version, type, id] = segments;
83
83
  if (version === 'v2' && id) {
84
84
  if (type === 'verify')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@branta-ops/branta",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "A JavaScript SDK for the Branta API",
5
5
  "homepage": "https://github.com/BrantaOps/branta-js#readme",
6
6
  "bugs": {