Skip to content

Commit b0e3855

Browse files
committed
fix(neuron-wallet): order inputs in a tx
1 parent 22ab3d8 commit b0e3855

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

packages/neuron-wallet/src/services/tx/transaction-service.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,14 @@ export class TransactionsService {
259259

260260
const tx = await getConnection()
261261
.getRepository(TransactionEntity)
262-
.findOne(hash, { relations: ['inputs', 'outputs'] })
262+
.createQueryBuilder('transaction')
263+
.where('transaction.hash is :hash', {hash})
264+
.leftJoinAndSelect('transaction.inputs', 'input')
265+
.leftJoinAndSelect('transaction.outputs', 'output')
266+
.orderBy({
267+
'input.id': "ASC"
268+
})
269+
.getOne()
263270

264271
if (!tx) {
265272
return undefined

0 commit comments

Comments
 (0)