Skip to content

Commit

Permalink
🐛 Fix sync
Browse files Browse the repository at this point in the history
  • Loading branch information
PhearZero committed May 30, 2022
1 parent 2b13e6b commit 2ab9153
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bin/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ const db = getDatabase();
const compare = async function() {
const apps = [
{
id: 354073718,
id: 22045503,
genesis: undefined,
},
{
id: 354073834,
id: 22045522,
genesis: undefined,
},
];
Expand Down
5 changes: 3 additions & 2 deletions src/explorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ async function _getIndexAPI() {
if (typeof indexer === 'undefined') {
indexer = await new SwaggerClient(`${url}/idx2/swagger.json`);
indexer.spec.host='algoindexer.testnet.algoexplorerapi.io';
indexer.spec.basePath = '/';
}
return indexer.apis;
}
Expand Down Expand Up @@ -80,8 +81,8 @@ async function _getCurrentBlock() {
* @return {Promise<*>}
*/
async function getBlock({round}) {
const api = await _getAPI();
const {obj} = await api.block.GetBlock({round}); // eslint-disable-line
const api = await _getIndexAPI();
const {obj} = await api.lookup.lookupBlock({'round-number': round}); // eslint-disable-line
const {block} = obj;
return block;
}
Expand Down

0 comments on commit 2ab9153

Please sign in to comment.