From 2afbd3b398585175e3337226c7d4b55982e03bd9 Mon Sep 17 00:00:00 2001 From: Jernej Pregelj Date: Tue, 28 Aug 2018 15:38:36 +0200 Subject: [PATCH] remove votes endpoint --- src/connection.js | 14 +------------- test/connection/test_connection.js | 15 --------------- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/src/connection.js b/src/connection.js index 4b2641b..15e7064 100644 --- a/src/connection.js +++ b/src/connection.js @@ -32,8 +32,7 @@ export default class Connection { 'transactionsCommit': 'transactions?mode=commit', 'transactionsDetail': 'transactions/%(transactionId)s', 'assets': 'assets', - 'metadata': 'metadata', - 'votes': 'votes' + 'metadata': 'metadata' }[endpoint] } @@ -108,17 +107,6 @@ export default class Connection { }) } - /** - * @param blockId - */ - listVotes(blockId) { - return this._req(this.getApiUrls('votes'), { - query: { - block_id: blockId - } - }) - } - /** * @param transaction */ diff --git a/test/connection/test_connection.js b/test/connection/test_connection.js index 7f9c65b..9d898e7 100644 --- a/test/connection/test_connection.js +++ b/test/connection/test_connection.js @@ -178,21 +178,6 @@ test('Get outputs for a public key and spent=true', t => { }) -test('Get votes for a block id', t => { - const expectedPath = 'path' - const blockId = 'abc' - - conn._req = sinon.spy() - conn.getApiUrls = sinon.stub().returns(expectedPath) - - conn.listVotes(blockId) - t.truthy(conn._req.calledWith( - expectedPath, - { query: { block_id: blockId } } - )) -}) - - test('Get asset for text', t => { const expectedPath = 'path' const search = 'abc'