Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connected dApps: a list with empty state, plus button, etc etc / fetching dApps / disconnecting dApps #19943

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

alwx
Copy link
Contributor

@alwx alwx commented May 8, 2024

Fixes #19839
Fixes #19840

Summary

Simulator.Screen.Recording.-.iPhone.13.-.2024-05-16.at.17.11.53.mp4

Platforms

  • Android
  • iOS

Areas that maybe impacted

Functional
  • wallet connect

status: ready

@alwx alwx self-assigned this May 8, 2024
@status-github-bot status-github-bot bot added this to REVIEW in Pipeline for QA May 8, 2024
@alwx alwx changed the base branch from develop to connected-dapps May 8, 2024 14:05
@status-im-auto
Copy link
Member

status-im-auto commented May 8, 2024

Jenkins Builds

Click to see older builds (59)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 55eb0f5 #2 2024-05-08 14:12:55 ~7 min tests 📄log
✔️ 55eb0f5 #2 2024-05-08 14:15:13 ~9 min ios 📱ipa 📲
✔️ 55eb0f5 #2 2024-05-08 14:18:11 ~12 min android-e2e 🤖apk 📲
✔️ 55eb0f5 #2 2024-05-08 14:18:18 ~12 min android 🤖apk 📲
✔️ 55eb0f5 #3 2024-05-13 13:58:20 ~7 min tests 📄log
✔️ 55eb0f5 #3 2024-05-13 14:00:30 ~9 min ios 📱ipa 📲
✔️ 55eb0f5 #3 2024-05-13 14:02:21 ~11 min android 🤖apk 📲
✔️ 55eb0f5 #3 2024-05-13 14:03:40 ~12 min android-e2e 🤖apk 📲
✔️ 726ec83 #4 2024-05-14 12:39:33 ~4 min tests 📄log
✔️ 726ec83 #4 2024-05-14 12:45:07 ~9 min ios 📱ipa 📲
✔️ 726ec83 #4 2024-05-14 12:47:24 ~12 min android-e2e 🤖apk 📲
✔️ 726ec83 #4 2024-05-14 12:47:27 ~12 min android 🤖apk 📲
✔️ b186cdd #6 2024-05-14 14:33:11 ~5 min tests 📄log
✔️ b186cdd #6 2024-05-14 14:35:18 ~7 min android 🤖apk 📲
✔️ b186cdd #6 2024-05-14 14:35:27 ~7 min android-e2e 🤖apk 📲
✔️ b186cdd #6 2024-05-14 14:39:00 ~11 min ios 📱ipa 📲
a3553a3 #8 2024-05-16 10:57:41 ~2 min tests 📄log
✔️ a3553a3 #8 2024-05-16 11:02:29 ~7 min android-e2e 🤖apk 📲
✔️ a3553a3 #8 2024-05-16 11:02:31 ~7 min android 🤖apk 📲
✔️ a3553a3 #8 2024-05-16 11:05:22 ~10 min ios 📱ipa 📲
25d7419 #9 2024-05-16 14:06:30 ~55 sec tests 📄log
✔️ 25d7419 #9 2024-05-16 14:12:17 ~6 min android-e2e 🤖apk 📲
✔️ 25d7419 #9 2024-05-16 14:14:31 ~8 min android 🤖apk 📲
✔️ 25d7419 #9 2024-05-16 14:17:03 ~11 min ios 📱ipa 📲
68aef1a #10 2024-05-16 15:11:58 ~3 min tests 📄log
24efb8c #11 2024-05-16 15:19:01 ~2 min tests 📄log
✔️ 24efb8c #11 2024-05-16 15:22:16 ~6 min android 🤖apk 📲
✔️ 24efb8c #11 2024-05-16 15:25:21 ~9 min android-e2e 🤖apk 📲
✔️ 24efb8c #11 2024-05-16 15:28:10 ~12 min ios 📱ipa 📲
2e8aa4b #12 2024-05-17 10:10:58 ~4 min tests 📄log
✔️ 2e8aa4b #12 2024-05-17 10:19:02 ~12 min android-e2e 🤖apk 📲
✔️ 2e8aa4b #12 2024-05-17 10:19:16 ~12 min android 🤖apk 📲
✔️ 2e8aa4b #12 2024-05-17 10:22:15 ~15 min ios 📱ipa 📲
72b9a0c #14 2024-05-17 15:31:49 ~2 min tests 📄log
✔️ 72b9a0c #14 2024-05-17 15:35:08 ~6 min android-e2e 🤖apk 📲
✔️ 72b9a0c #14 2024-05-17 15:37:19 ~8 min android 🤖apk 📲
✔️ 72b9a0c #14 2024-05-17 15:40:58 ~11 min ios 📱ipa 📲
20d31a0 #15 2024-05-21 08:42:42 ~4 min tests 📄log
✔️ 20d31a0 #15 2024-05-21 08:47:53 ~9 min ios 📱ipa 📲
✔️ 20d31a0 #15 2024-05-21 08:50:11 ~12 min android-e2e 🤖apk 📲
✔️ 20d31a0 #15 2024-05-21 08:50:18 ~12 min android 🤖apk 📲
80931fe #16 2024-05-21 14:28:56 ~4 min tests 📄log
✔️ 80931fe #16 2024-05-21 14:36:10 ~11 min ios 📱ipa 📲
✔️ 80931fe #16 2024-05-21 14:36:36 ~12 min android-e2e 🤖apk 📲
✔️ 80931fe #16 2024-05-21 14:36:41 ~12 min android 🤖apk 📲
b043786 #17 2024-05-21 18:02:58 ~2 min tests 📄log
✔️ b043786 #17 2024-05-21 18:08:13 ~7 min android 🤖apk 📲
✔️ b043786 #17 2024-05-21 18:09:47 ~9 min ios 📱ipa 📲
✔️ b043786 #17 2024-05-21 18:12:59 ~12 min android-e2e 🤖apk 📲
879eec4 #18 2024-05-22 16:59:24 ~4 min tests 📄log
✔️ 879eec4 #18 2024-05-22 17:04:10 ~9 min ios 📱ipa 📲
✔️ 879eec4 #18 2024-05-22 17:06:36 ~11 min android-e2e 🤖apk 📲
✔️ 879eec4 #18 2024-05-22 17:06:46 ~12 min android 🤖apk 📲
59f260f #19 2024-05-23 13:19:11 ~4 min tests 📄log
✔️ 59f260f #19 2024-05-23 13:24:15 ~9 min ios 📱ipa 📲
5053177 #21 2024-05-23 13:27:18 ~2 min tests 📄log
✔️ 5053177 #21 2024-05-23 13:35:49 ~10 min android-e2e 🤖apk 📲
✔️ 5053177 #21 2024-05-23 13:35:59 ~10 min android 🤖apk 📲
✔️ 5053177 #21 2024-05-23 13:37:51 ~12 min ios 📱ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 53e324d #22 2024-05-23 13:49:57 ~4 min tests 📄log
✔️ 53e324d #22 2024-05-23 13:53:45 ~8 min android 🤖apk 📲
✔️ 53e324d #22 2024-05-23 13:55:22 ~10 min ios 📱ipa 📲
✔️ 53e324d #22 2024-05-23 13:57:18 ~12 min android-e2e 🤖apk 📲
✔️ 4e19bdb #23 2024-05-24 09:43:49 ~5 min tests 📄log
✔️ 4e19bdb #23 2024-05-24 09:44:08 ~6 min android-e2e 🤖apk 📲
✔️ 4e19bdb #23 2024-05-24 09:47:28 ~9 min ios 📱ipa 📲
✔️ 4e19bdb #23 2024-05-24 09:47:45 ~9 min android 🤖apk 📲

Base automatically changed from connected-dapps to develop May 13, 2024 13:50
@alwx alwx force-pushed the dapp-list branch 3 times, most recently from 184da9b to a3553a3 Compare May 16, 2024 10:54
@alwx alwx marked this pull request as ready for review May 17, 2024 10:06
@alwx alwx changed the title Connected dApps: a list with empty state, plus button, etc etc Connected dApps: a list with empty state, plus button, etc etc / fetching dApps / disconnecting dApps May 23, 2024
@alwx
Copy link
Contributor Author

alwx commented May 23, 2024

Now it also includes the disconnect flow and includes fetching of dApps from the WalletConnect API.

Simulator.Screen.Recording.-.iPhone.15.-.2024-05-23.at.15.11.44.mp4

Comment on lines +10 to +12
[{:keys [wallet-account dapp on-disconnect]}]
(let [{:keys [avatar name]} dapp
{:keys [color]} wallet-account]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to improve performance, might be better to pass only the props it needs (avatar, name, color, on-disconnect) instead of the entire maps

:style (style/header-text (when subtitle true))}
title]])
[{:keys [title wallet-account on-close on-add]}]
(let [{:keys [color]} wallet-account]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, if only the color is needed, then we should just pass it instead of passing the whole account map

Comment on lines +101 to +102
[rn/flat-list
{:data pairings
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should normalize the pairings data in the db, so that we have in the db a list of pairing topics and a map with topics->pairing-data. This way we would only pass the id to the flatlist item, and the item component can retrieve the pairing data with a subscription. Otherwise, we always have to map over the pairings vector to find the relevant one, which might cause perf issues in the future.

{:db (assoc db :wallet-connect/web3-wallet web3-wallet)
:fx [[:dispatch [:wallet-connect/register-event-listeners]]]}))
{:db (assoc-in db [:wallet :wallet-connect :web3-wallet] web3-wallet)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should keep the :wallet-connect/... keys as roots and avoid nesting unless necessary. I remember there was a conversation at the offsite about this topic @J-Son89 @cammellos

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my point here is that it becomes pretty much a mess but interesting to hear other opinions

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can have a session to discuss the db structure next week, but for now I'd propose to keep the structure with root keys, otherwise there's going to be some nasty conflicts. WDYT?

Comment on lines +38 to +40
:on-press (fn []
(rf/dispatch [:navigate-to
:screen/wallet.connected-dapps]))})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the fn can go outside the component

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Pipeline for QA
  
REVIEW
Development

Successfully merging this pull request may close these issues.

Add WC disconnect dApp flow Add WC connected dApps list
3 participants