🔬
Product Docs
  • 👋Welcome to WalletChat
  • Overview
    • 💡Demos
    • ✨Our Features
    • 🏗️Architecture
    • 💁Customer Support Features
    • 🔒Security Features
  • ⚒️Developer Docs
    • 🪛Integrating the Widget
      • Chat With Owner
      • Integrated Sign-In (Single-Sign-On)
      • Custom Endpoints
    • ❓FAQ
    • API Docs
  • 🦊Metamask Integration
    • Example Notifications
    • WalletChat Metamask Snap FAQ
  • ☎️Support
Powered by GitBook
On this page
  1. Developer Docs
  2. Integrating the Widget

Chat With Owner

Many dApps wish to enable and encourage two owners to interact and discuss a swap or sale. WalletChat chat-with-owner feature enables this use case:

PreviousIntegrating the WidgetNextIntegrated Sign-In (Single-Sign-On)

Last updated 1 year ago

Chat With Owner

To implement a "Chat With Owner" type feature as demonstrated at :

  1. Ensure your NPM package is up to date yarn upgrade react-wallet-chat

  2. Import the ChatWithOwner button:

import { ChatWithOwner } from 'react-wallet-chat'
  1. The owner address is the message recipient, and is set via the ownerAddress parameter. Here is a code snipped to render a Chat WIth Owner button and the underlying functionality:

{ && (
  <ChatWithOwner
    ownerAddress=
    render={<Button css={buttonCss} color="gray3" />}
  />
)}
  1. Add the following to the main App code, in this case the activeConnector is from the WAGMI package, and could be substituted as needed to get the wallet name/type.

<WalletChatProvider>
  

  <WalletChatWidget
    connectedWallet={
      address && activeConnector && chainId
        ? {
            walletName: activeConnector.name,
            account: address,
            chainId: chain.id,
          }
        : undefined
    }
  />
</WalletChatProvider>

⚒️
🪛
nft.walletchat.fun