mirror of
https://github.com/status-im/open-bounty.git
synced 2025-02-18 12:26:41 +00:00
store pending revocations in local storage
This commit is contained in:
parent
a9282f503a
commit
b3078b84b6
@ -425,18 +425,23 @@
|
|||||||
(defn strip-0x [x]
|
(defn strip-0x [x]
|
||||||
(str/replace x #"^0x" ""))
|
(str/replace x #"^0x" ""))
|
||||||
|
|
||||||
|
(defn set-pending-revocation [location issue-id confirming-account]
|
||||||
|
(assoc-in location [::db/pending-revocations issue-id]
|
||||||
|
{:confirming-account confirming-account}))
|
||||||
|
|
||||||
(reg-event-fx
|
(reg-event-fx
|
||||||
:set-pending-revocation
|
:set-pending-revocation
|
||||||
interceptors
|
[interceptors (inject-cofx :store)]
|
||||||
(fn [{:keys [db]} [_ issue-id confirming-account]]
|
(fn [{:keys [db store]} [_ issue-id confirming-account]]
|
||||||
{:db (assoc-in db [::db/pending-revocations issue-id]
|
{:db (set-pending-revocation db issue-id confirming-account)
|
||||||
{:confirming-account confirming-account})}))
|
:store (set-pending-revocation store issue-id confirming-account)}))
|
||||||
|
|
||||||
(reg-event-fx
|
(reg-event-fx
|
||||||
:remove-pending-revocation
|
:remove-pending-revocation
|
||||||
interceptors
|
[interceptors (inject-cofx :store)]
|
||||||
(fn [{:keys [db]} [_ issue-id]]
|
(fn [{:keys [db store]} [_ issue-id]]
|
||||||
{:db (dissoc-in db [::db/pending-revocations issue-id])}))
|
{:db (dissoc-in db [::db/pending-revocations issue-id])
|
||||||
|
:store (dissoc-in store [::db/pending-revocations issue-id])}))
|
||||||
|
|
||||||
(reg-event-fx
|
(reg-event-fx
|
||||||
:remove-bot-confirmation
|
:remove-bot-confirmation
|
||||||
|
Loading…
x
Reference in New Issue
Block a user