fix cursor issue with account_tx stored procedure

This commit is contained in:
CJ Cobb
2021-04-20 17:20:35 +00:00
parent 777dbb5826
commit 1b7d672427
3 changed files with 23 additions and 4 deletions

View File

@@ -572,10 +572,19 @@ PostgresBackend::fetchAccountTransactions(
if (hash.parseHex(hashHex.at("hash").as_string().c_str() + 2))
hashes.push_back(hash);
}
if (responseObj.contains("cursor"))
{
return {
fetchTransactions(hashes),
{{responseObj.at("cursor").at("ledger_sequence").as_int64(),
responseObj.at("cursor")
.at("transaction_index")
.as_int64()}}};
}
return {fetchTransactions(hashes), {}};
}
return {{}, {}};
}
} // namespace Backend
void
PostgresBackend::open()