Utilize gettxout to display spent/outspent

fixes #1088
This commit is contained in:
softsimon
2022-01-15 22:09:04 +04:00
parent 6e951f0c04
commit 3450ff97ff
6 changed files with 33 additions and 6 deletions

View File

@@ -716,8 +716,13 @@ class Routes {
}
}
public getTransactionOutspends(req: Request, res: Response) {
res.status(501).send('Not implemented');
public async getTransactionOutspends(req: Request, res: Response) {
try {
const result = await bitcoinApi.$getOutspends(req.params.txId);
res.json(result);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
}
}
public getDifficultyChange(req: Request, res: Response) {