[fix #8638] issues with wallet transaction list
- pending transaction was using hash so mined transaction was using it's id to have a unique id, the fix adds a rule when the existing transaction by hash is in :pending state, the mined transaction overwrites it Signed-off-by: yenda <eric@status.im>
This commit is contained in:
parent
16fac293ba
commit
89abc8ab11
|
@ -124,10 +124,15 @@
|
|||
transfer-by-id (get-in db [:wallet :transaction id])
|
||||
unique-id (when-not (or transfer-by-id
|
||||
(= transfer transfer-by-hash))
|
||||
(if transfer-by-hash id hash))]
|
||||
(if (and transfer-by-hash
|
||||
(not (= :pending
|
||||
(:type transfer-by-hash))))
|
||||
id
|
||||
hash))]
|
||||
(when unique-id
|
||||
(fx/merge cofx
|
||||
{:db (assoc-in db [:wallet :transactions unique-id] transfer)}
|
||||
{:db (assoc-in db [:wallet :transactions unique-id]
|
||||
(assoc transfer :hash unique-id))}
|
||||
(check-transaction transfer)))))
|
||||
|
||||
(fx/defn new-transfers
|
||||
|
|
Loading…
Reference in New Issue