Skip to content

Commit

Permalink
await transaction stream
Browse files Browse the repository at this point in the history
  • Loading branch information
leolambo committed May 3, 2024
1 parent 32c3bb6 commit a6d51cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export class BaseEVMExternalStateProvider extends InternalStateProvider implemen
const tipHeight = tip ? tip.height : 0;
return await this._getTransaction({ chain, network, txId, tipHeight, web3 });
} catch (err) {
logger.error('Error getting transations from historical node %o', err);
logger.error('Error getting transactions from historical node %o', err);
}
return undefined;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/bitcore-node/src/routes/api/address.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const router = express.Router({ mergeParams: true });
import logger from '../../logger';
import { ChainStateProvider } from '../../providers/chain-state';

function streamCoins(req, res) {
async function streamCoins(req, res) {
try {
let { address, chain, network } = req.params;
let { unspent, limit = 10, since } = req.query;
Expand All @@ -15,7 +15,7 @@ function streamCoins(req, res) {
res,
args: { ...req.query, unspent, limit, since }
};
ChainStateProvider.streamAddressTransactions(payload);
await ChainStateProvider.streamAddressTransactions(payload);
} catch (err: any) {
logger.error('Error streaming coins: %o', err.stack || err.message || err);
return res.status(500).send(err.message || err);
Expand Down

0 comments on commit a6d51cf

Please sign in to comment.