Skip to content
Snippets Groups Projects
Commit ddfa8ba6 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[fix] sync: wallet's balance could be negative

parent cd699d75
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,7 @@ export class LokiSIndex extends LokiProtocolIndex<SindexEntry> implements SIndex
async getAvailableForConditions(conditionsStr: string): Promise<SindexEntry[]> {
const sources = this.collection
.chain()
.find({ conditions: { $contains: conditionsStr } })
.find({ conditions: conditionsStr })
.simplesort('writtenOn')
.data()
.filter(s => this.collection.find({ identifier: s.identifier, pos: s.pos, consumed: true }).length === 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment