From 5ce13e63f92dabd1b8162e333583c3381d7ab741 Mon Sep 17 00:00:00 2001 From: Maxwell Lasky Date: Fri, 19 Apr 2019 09:41:44 -0600 Subject: [PATCH] fixes tx export bug and bumps version in package.json --- .../TransactionHistory/TransactionHistory.jsx | 10 +++++++++- package.json | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/containers/TransactionHistory/TransactionHistory.jsx b/app/containers/TransactionHistory/TransactionHistory.jsx index 4e28779c7..9a4f74d69 100644 --- a/app/containers/TransactionHistory/TransactionHistory.jsx +++ b/app/containers/TransactionHistory/TransactionHistory.jsx @@ -69,14 +69,22 @@ export default class TransactionHistory extends Component { const endpoint = api.neoscan.getAPIEndpoint(net) let numberOfPages = 1 let currentPage = 1 + let shouldFetchAdditionalPages = true - while (currentPage !== numberOfPages || currentPage === 1) { + while ( + (currentPage - 1 !== numberOfPages || currentPage === 1) && + shouldFetchAdditionalPages + ) { const { data } = await axios.get( `${endpoint}/v1/get_address_abstracts/${address}/${currentPage}`, ) abstracts.push(...data.entries) numberOfPages = data.total_pages currentPage += 1 + + if (data.total_pages === 1 || data.total_pages === 0) { + shouldFetchAdditionalPages = false + } } const parsedAbstracts = await parseAbstractData(abstracts, address, net) diff --git a/package.json b/package.json index 671f1b03d..7fc0d9e51 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Neon", - "version": "2.2.0", + "version": "2.2.1", "main": "./main.js", "description": "Light wallet for NEO blockchain", "homepage": "https://github.com/CityOfZion/neon-wallet",