From 735674ed2d2a9553a191908040e99d85b602fd63 Mon Sep 17 00:00:00 2001
From: Moul <moul@moul.re>
Date: Thu, 25 Jul 2019 20:02:42 +0200
Subject: [PATCH] [fix] #239: money: remove already used inputs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

- restore previous behaviour which haven’t been kept the same during the migration
- travel through pending, and among them remove already used from our list of
inputs
---
 silkaj/money.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/silkaj/money.py b/silkaj/money.py
index 7f200194..58ae9d26 100644
--- a/silkaj/money.py
+++ b/silkaj/money.py
@@ -168,8 +168,8 @@ async def get_sources(pubkey):
             pending_sources.append(InputSource.from_inline(input))
 
     # remove input already used
-    for input in listinput:
-        if input in pending_sources:
+    for input in pending_sources:
+        if input in listinput:
             listinput.remove(input)
 
     return listinput, amount
-- 
GitLab