Skip to content

Commit

Permalink
🔨 Fix RPC calls but get addresses not working
Browse files Browse the repository at this point in the history
  • Loading branch information
shivekkhurana committed Mar 21, 2024
1 parent c6ea86a commit 936eb78
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions src/status_im/contexts/wallet/events.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -451,25 +451,29 @@
:name name
:color color
:chain-short-names chain-short-names}]
{:fx [[:json-rpc/call
[{:method "wallet_addSavedAddress"
:params [address-to-save]
:on-success on-success
:on-error on-error}]]]})))
{:json-rpc/call
[{:method "wakuext_upsertSavedAddress"
:params [address-to-save]
:on-success on-success
:on-error on-error}]})))

(rf/reg-event-fx
:wallet/get-saved-addresses
(fn [_ {:keys [on-success on-error]}]
{:json-rpc/call
[{:method "wallet_getSavedAddresses"
[{:method "wakuext_getSavedAddresses"
:on-success on-success
:on-error on-error}]}))

(comment
(rf/dispatch [:wallet/get-saved-addresses
{:on-success (partial prn :success)
:on-error (partial prn :error)}])
{:on-success (partial prn :success--->)
:on-error (partial prn :error--->)}])

(rf/dispatch [:wallet/save-address
{:on-error (partial prn :error--->)}])
{:name "Test 2"
:colorId :blue
:on-success (partial prn :success-->)
:address "0xffffffffffffffffffffffffffffffffffffff12"
:on-error (partial prn :error--->)}])
,)

0 comments on commit 936eb78

Please sign in to comment.