diff --git a/package-lock.json b/package-lock.json index 262eeb2a2..3176dbfee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@terra-money/terra.js", - "version": "2.0.13", + "version": "2.0.14", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@terra-money/terra.js", - "version": "2.0.13", + "version": "2.0.14", "license": "MIT", "dependencies": { "axios": "^0.21.1", diff --git a/package.json b/package.json index dfbc2690e..ef90da4cb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@terra-money/terra.js", - "version": "2.0.13", + "version": "2.0.14", "description": "The JavaScript SDK for Terra", "license": "MIT", "author": "Terraform Labs, PTE.", diff --git a/src/client/lcd/api/GovAPI.ts b/src/client/lcd/api/GovAPI.ts index 7fe6a46e1..5b7bf5328 100644 --- a/src/client/lcd/api/GovAPI.ts +++ b/src/client/lcd/api/GovAPI.ts @@ -142,10 +142,10 @@ export class GovAPI extends BaseAPI { public async deposits( proposalId: number, params: APIParams = {} - ): Promise { + ): Promise { return this.c - .get(`/gov/proposals/${proposalId}/deposits`, params) - .then(d => Deposit.fromData(d.result)); + .get(`/gov/proposals/${proposalId}/deposits`, params) + .then(d => d.result.map(Deposit.fromData)); } /** @@ -155,10 +155,10 @@ export class GovAPI extends BaseAPI { public async votes( proposalId: number, params: APIParams = {} - ): Promise { + ): Promise { return this.c - .get(`/gov/proposals/${proposalId}/votes`, params) - .then(d => Vote.fromData(d.result)); + .get(`/gov/proposals/${proposalId}/votes`, params) + .then(d => d.result.map(Vote.fromData)); } /**