mirror of
https://github.com/status-im/status-react.git
synced 2025-01-13 04:24:40 +00:00
[#4755] Keep the transaction source intact on errors/discards.
If a tx was send from a chat, that fact is recorded in its properties, `from-chat?` property. On errors and discards, this property was reset to `false`, hence, making any chat transaction editable if an error happens or user discards it. This commit makes this property stay as it is. Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
This commit is contained in:
parent
6f209ec4c0
commit
0d45683935
@ -118,7 +118,6 @@
|
|||||||
:signing? false
|
:signing? false
|
||||||
:wrong-password? false
|
:wrong-password? false
|
||||||
:waiting-signal? false
|
:waiting-signal? false
|
||||||
:from-chat? false
|
|
||||||
:password nil})
|
:password nil})
|
||||||
|
|
||||||
(defn on-transactions-completed [raw-results]
|
(defn on-transactions-completed [raw-results]
|
||||||
@ -175,7 +174,9 @@
|
|||||||
new-db (assoc-in db' [:wallet :transactions-unsigned id] transaction)
|
new-db (assoc-in db' [:wallet :transactions-unsigned id] transaction)
|
||||||
sending-db {:id id
|
sending-db {:id id
|
||||||
:method method
|
:method method
|
||||||
:from-chat? sending-from-bot-or-dapp?}]
|
:from-chat? (or
|
||||||
|
sending-from-bot-or-dapp?
|
||||||
|
(get-in db [:wallet :send-transaction :from-chat?]))}]
|
||||||
(if sending-from-bot-or-dapp?
|
(if sending-from-bot-or-dapp?
|
||||||
;;SENDING FROM BOT (CHAT) OR DAPP
|
;;SENDING FROM BOT (CHAT) OR DAPP
|
||||||
{:db (assoc-in new-db [:wallet :send-transaction] sending-db) ; we need to completely reset sending state here
|
{:db (assoc-in new-db [:wallet :send-transaction] sending-db) ; we need to completely reset sending state here
|
||||||
|
Loading…
x
Reference in New Issue
Block a user