status-im / status-mobile

a free (libre) open source, mobile OS for Ethereum
https://status.app
Mozilla Public License 2.0
3.9k stars 987 forks source link

[dApp Notifications] Show successful dApp connection in Activity Center #20467

Open ilmotta opened 4 months ago

ilmotta commented 4 months ago

Feature

Figma reference: https://www.figma.com/design/JZqS95JKcpZU13NHbJ9qVT/dApp-Interactions?node-id=47-30832&t=71hDvlz63qdheZ2z-0

Notes

Out of scope

Pressing on the notification to execute its default action will be a separate GH issue.

Resources

yqrashawn commented 4 months ago

Stuck at the event below after scanning qr code at https://react-app.walletconnect.com/, no on-success or on-fail

(rf/reg-event-fx
 :wallet-connect/pair
 (fn [{:keys [db]} [url]]
   (let [web3-wallet (get db :wallet-connect/web3-wallet)]
     {:fx [[(log/spy :info :effects.wallet-connect/pair)
            {:web3-wallet web3-wallet
             :url         (log/spy :info url)
             :on-fail     #(log/error (log/spy :info "Failed to pair with dApp") {:error %})
             :on-success  #(log/info (log/spy :info "dApp paired successfully"))}]]})))
yqrashawn commented 4 months ago

Network issue solved

yqrashawn commented 4 months ago

Updates:


Next up:


wallet-connect proposer has dapp icons

    "proposer": {
      "publicKey": "...",
      "metadata": {
        "description": "React App for WalletConnect",
        "url": "https://react-app.walletconnect.com",
        "icons": [
          "https://avatars.githubusercontent.com/u/37784886"
        ],
        "name": "React App"
      }
    }

CleanShot 2024-06-28 at 14 44 09@2x

CleanShot 2024-06-28 at 14 47 03@2x

clauxx commented 4 months ago

where to get dapp logo, do we have it persisted in mobile db already? How to identify dapp between mobile and go without relying on wallet connect?

We are persisting the dapps data (including the icon) when connecting in services/walletconnect/walletconnect.go.

Figma uses token context tag for dapp, but dapp log is not always a token logo

Not sure I follow. Is it that figma designs expect a token type and don't have a dapp type? If so, I guess we would need to add an extra type to the context tag (and update the design system as well).

yqrashawn commented 4 months ago

Thanks for the info @clauxx

I posted some questions about wakuext_addWalletConnectSession and wallet_addWalletConnectSession at https://discord.com/channels/1210237582470807632/1217175655729467492/1257161311566168136

yqrashawn commented 4 months ago

updates: working on other issue, will come back to this once mobile migrated to wallet connect v2 api

clauxx commented 3 months ago

Blocked till https://github.com/status-im/status-mobile/issues/20637 is merged

ilmotta commented 3 months ago

FYI @yqrashawn, we are postponing this issue for 2.31 as we believe it's risky to push it for 2.30.

yqrashawn commented 3 months ago

next up: when ready merge status-go PR, push new tag, update status-go-version.json and merge mobile PR

churik commented 1 month ago

defer due to https://github.com/status-im/status-mobile/pull/20905#issuecomment-2352132939