From 11195dc9cf646c4b7955df4dff23a25d9cf9e4eb Mon Sep 17 00:00:00 2001 From: Amin Latifi Date: Sun, 3 Sep 2023 13:18:44 +0330 Subject: [PATCH 1/3] Changed balance aggregator query to get --- .../givPowerBalanceAggregatorAdapter.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/adapters/givPowerBalanceAggregator/givPowerBalanceAggregatorAdapter.ts b/src/adapters/givPowerBalanceAggregator/givPowerBalanceAggregatorAdapter.ts index 9d9ea82df..57fde70d6 100644 --- a/src/adapters/givPowerBalanceAggregator/givPowerBalanceAggregatorAdapter.ts +++ b/src/adapters/givPowerBalanceAggregator/givPowerBalanceAggregatorAdapter.ts @@ -67,10 +67,9 @@ export class GivPowerBalanceAggregatorAdapter params: LatestBalanceInputParams, ): Promise { try { - const response = await axios.post( - `${this.baseUrl}/power-balance`, + const response = await axios.get(`${this.baseUrl}/power-balance`, { params, - ); + }); return response.data.map(balance => formatResponse(balance)); } catch (e) { logger.error('getLatestBalanceOfAnAddress >> error', e); From 1847c1df0208d33f5bf487fcd0a9dcdab53b055b Mon Sep 17 00:00:00 2001 From: Amin Latifi Date: Sun, 3 Sep 2023 13:46:00 +0330 Subject: [PATCH 2/3] Fixed param passing to getLatestBalances of power balance aggregator --- .../givPowerBalanceAggregatorAdapter.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/adapters/givPowerBalanceAggregator/givPowerBalanceAggregatorAdapter.ts b/src/adapters/givPowerBalanceAggregator/givPowerBalanceAggregatorAdapter.ts index 57fde70d6..75041c204 100644 --- a/src/adapters/givPowerBalanceAggregator/givPowerBalanceAggregatorAdapter.ts +++ b/src/adapters/givPowerBalanceAggregator/givPowerBalanceAggregatorAdapter.ts @@ -66,9 +66,14 @@ export class GivPowerBalanceAggregatorAdapter async getLatestBalances( params: LatestBalanceInputParams, ): Promise { + const data = { + network: params.network, + networks: params.networks, + addresses: params.addresses.join(','), + }; try { const response = await axios.get(`${this.baseUrl}/power-balance`, { - params, + params: data, }); return response.data.map(balance => formatResponse(balance)); } catch (e) { From 285366bedde80b052fa67ce40b4eb097004bbec2 Mon Sep 17 00:00:00 2001 From: Amin Latifi Date: Sun, 3 Sep 2023 14:26:21 +0330 Subject: [PATCH 3/3] 1.16.1 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0537b894c..dd3a6ad55 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "giveth-graphql-api", - "version": "1.16.0", + "version": "1.16.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "giveth-graphql-api", - "version": "1.16.0", + "version": "1.16.1", "hasInstallScript": true, "license": "ISC", "dependencies": { diff --git a/package.json b/package.json index 08ba3b1d9..51fef1546 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "giveth-graphql-api", - "version": "1.16.0", + "version": "1.16.1", "description": "Backend GraphQL server for Giveth originally forked from Topia", "main": "./dist/index.js", "dependencies": {