Skip to content

Commit

Permalink
fix: Merge branch 'alpha' into alpha-deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammeds1992 committed Sep 25, 2023
2 parents 236f166 + 986f0b0 commit 7efc3ab
Show file tree
Hide file tree
Showing 4 changed files with 639 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ const ChatViewComponentTest = () => {
<div>
<h2>Chat UI Test page</h2>
<ChatViewComponentCard>
<ChatViewComponent onGetTokenClick={() => console.log("BOIIII RETURNNNSSSSS")} chatId='b8e068e02fe12d7136bc2f24408835573f30c6fbf0b65ea26ab4c7055a2c85f1' limit={10} isConnected={true} autoConnect={true}/>

<ChatViewComponent onGetTokenClick={() => console.log("BOIIII RETURNNNSSSSS")} chatId='b8e068e02fe12d7136bc2f24408835573f30c6fbf0b65ea26ab4c7055a2c85f1' limit={10} isConnected={true} autoConnect={false}/>


</ChatViewComponentCard>
</div>
);
Expand Down
1 change: 1 addition & 0 deletions packages/uiweb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"@livepeer/react": "^2.6.0",
"@pushprotocol/socket": "^0.5.0",
"@unstoppabledomains/resolution": "^8.5.0",
"@web3-onboard/coinbase": "^2.2.5",
"@web3-onboard/core": "^2.21.1",
"@web3-onboard/injected-wallets": "^2.10.5",
"@web3-onboard/react": "^2.8.9",
Expand Down
14 changes: 10 additions & 4 deletions packages/uiweb/src/lib/components/chat/ConnectButton/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { IChatTheme } from '../theme';

import coinbaseWalletModule from '@web3-onboard/coinbase'
import { ConnectButtonSub } from './ConnectButton';
import { InfuraAPIKey } from '../../../config';
import { Web3OnboardProvider } from '@web3-onboard/react';
import injectedModule from '@web3-onboard/injected-wallets';
import injectedModule, { ProviderLabel } from '@web3-onboard/injected-wallets';
import walletConnectModule from '@web3-onboard/walletconnect'
import init from '@web3-onboard/core';
import { ethers } from 'ethers';
Expand All @@ -23,6 +24,7 @@ const wcv2InitOptions = {
}

const walletConnect = walletConnectModule(wcv2InitOptions)
const coinbaseWalletSdk = coinbaseWalletModule({ darkMode: true })
const chains = [
{
id: '0x1',
Expand Down Expand Up @@ -61,11 +63,15 @@ const chains = [
rpcUrl: 'https://rpc.ankr.com/arbitrum'
}
]
const wallets = [injectedModule(), walletConnect]

const wallets = [injectedModule({
displayUnavailable: [ProviderLabel.MetaMask]
}), walletConnect, coinbaseWalletSdk]


const appMetadata = {
name: 'Push Protocol',
icon: 'https://files.slack.com/files-pri/T011WQBLH39-F05QWQA0MSR/pushlogoblocknative.png',
icon: 'https://push.org/static/media/PushLogoTextBlack.fa01629c2ebd2149bab979861756591d.svg',
description: 'Example showcasing how to connect a wallet.',

recommendedInjectedWallets: [
Expand Down Expand Up @@ -94,7 +100,7 @@ interface IConnectButtonCompProps {
autoConnect?: boolean;
}

export const ConnectButtonComp:React.FC<IConnectButtonCompProps> = ({ autoConnect }) => {
export const ConnectButtonComp: React.FC<IConnectButtonCompProps> = ({ autoConnect }) => {
return (
<Web3OnboardProvider web3Onboard={web3OnBoard}>
<ConnectButtonSub autoConnect={autoConnect} />
Expand Down
Loading

0 comments on commit 7efc3ab

Please sign in to comment.