Skip to content

Commit

Permalink
fix(neuron-wallet): order inputs in a tx
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY committed Nov 8, 2019
1 parent 22ab3d8 commit b0e3855
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,14 @@ export class TransactionsService {

const tx = await getConnection()
.getRepository(TransactionEntity)
.findOne(hash, { relations: ['inputs', 'outputs'] })
.createQueryBuilder('transaction')
.where('transaction.hash is :hash', {hash})
.leftJoinAndSelect('transaction.inputs', 'input')
.leftJoinAndSelect('transaction.outputs', 'output')
.orderBy({
'input.id': "ASC"
})
.getOne()

if (!tx) {
return undefined
Expand Down

0 comments on commit b0e3855

Please sign in to comment.