Skip to content

Commit

Permalink
add confs too
Browse files Browse the repository at this point in the history
  • Loading branch information
Evanfeenstra committed Dec 16, 2020
1 parent 319e1bb commit feff52d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/src/controllers/queries.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/src/controllers/queries.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/src/utils/wallet.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/controllers/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export async function listUTXOs(req, res) {
const utxos:UTXO[] = await listUnspent() // at least 1 confg
const addys = utxos.map(utxo=> utxo.address)

console.log('addys', addys)
const accountings = await models.Accounting.findAll({
where:{
onchain_address: {
Expand All @@ -41,6 +40,7 @@ export async function listUTXOs(req, res) {
const utxo = utxos.find(u=>u.address===a.onchainAddress)
if(utxo) {
acc.amount = utxo.amount_sat
acc.confirmations = utxo.confirmations
ret.push(acc)
}
})
Expand Down
1 change: 1 addition & 0 deletions src/utils/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export interface UTXO {
address: string
address_type: number
amount_sat: number
confirmations: number
}

export async function listUnspent():Promise<UTXO[]> {
Expand Down

0 comments on commit feff52d

Please sign in to comment.