status-im / status-mobile

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

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

Open ilmotta opened 2 weeks ago

ilmotta commented 2 weeks 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 days 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 days ago

Network issue solved

yqrashawn commented 2 days 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 2 days 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).