Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarBasem committed May 22, 2024
1 parent 525cb00 commit 25b578a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
26 changes: 13 additions & 13 deletions src/status_im/contexts/wallet/events.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,19 @@
{:fx [[:dispatch [:toasts/upsert {:type :positive :text toast-message}]]]}))

(defn remove-account-success
[{:keys [db]} [toast-message _]]
{:db (assoc-in db [:wallet :current-viewing-account-address] nil)
:fx [[:dispatch [:wallet/get-accounts]]
[:dispatch [:wallet/get-keypairs]]
[:dispatch-later
{:ms 100
:dispatch [:hide-bottom-sheet]}]
[:dispatch-later
{:ms 100
:dispatch [:pop-to-root :shell-stack]}]
[:dispatch-later
{:ms 100
:dispatch [:wallet/show-account-deleted-toast toast-message]}]]})
[{:keys [db]} [toast-message _]]
{:db (assoc-in db [:wallet :current-viewing-account-address] nil)
:fx [[:dispatch [:wallet/get-accounts]]
[:dispatch [:wallet/get-keypairs]]
[:dispatch-later
{:ms 100
:dispatch [:hide-bottom-sheet]}]
[:dispatch-later
{:ms 100
:dispatch [:pop-to-root :shell-stack]}]
[:dispatch-later
{:ms 100
:dispatch [:wallet/show-account-deleted-toast toast-message]}]]})

(rf/reg-event-fx :wallet/remove-account-success remove-account-success)

Expand Down
2 changes: 1 addition & 1 deletion src/status_im/contexts/wallet/events_test.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,6 @@
(testing "remove-account-success"
(let [db {:wallet {:current-viewing-account-address "0x123"}}
expected-db {:wallet {}}
effects (events/remove-account-success {:db db} ["toast message"])
effects (events/remove-account-success {:db db} nil)
result-db (:db effects)]
(is (match? result-db expected-db)))))

0 comments on commit 25b578a

Please sign in to comment.