Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
@mojito-inc/connect-wallet
Advanced tools
Connecting wallet via metamask, wallet connect, email
👨💻 React components for the Mojito Platform, Reference App and third-party projects, including Connect Wallet.
Version: 1.0.1
You can install this project with one of these commands:
npm install @mojito-inc/connect-wallet
yarn add @mojito-inc/connect-wallet
import { ConnectWalletProvider } from '@mojitoinc/mojito-connect-wallet';
const WalletProvider = ({ children }: WalletProviderProps) => {
const [token, setToken] = useState<string>();
const client = useMemo(
() => ({
uri: Configuration.API_HOSTNAME,
token: token ? `Bearer ${ token }` : undefined,
}),
[token],
);
return (
<ConnectWalletProvider
theme={ theme }
onAuthenticated={ setToken }
clientOptions={ client }>
{ children }
</ConnectWalletProvider>
);
};
export default WalletProvider;
After setup ConnectWallet Provider
Following step:
import { ConnectWalletContainer } from '@mojitoinc/mojito-connect-wallet';
const ConnectWalletPage = () => {
const config = {
ORG_ID: Configuration.ORG_ID ?? '',
paperClientId: Configuration.PAPER_CLIENT_ID ?? '',
paperNetworkName: Configuration.PAPER_NETWORK_NAME ?? '',
projectId: Configuration.PROJECT_ID ?? '',
}
const walletOptions = {
enableMetamask: true,
enableWalletConnect: true,
enableEmail: true,
}
const image = {
logo: 'https://res.cloudinary.com/duwztsuxj/image/upload/v1683870261/Frame_238173_cpwne5.png',
metamask: Images.METAMASK.src,
walletConnect: Images.WALLET_CONNECT.src,
error: 'https://res.cloudinary.com/duwztsuxj/image/upload/v1683870261/Frame_238173_cpwne5.png',
}
return (
<ConnectWalletContainer
open={ openModal }
config={ config }
walletOptions={ walletOptions }
image={ image }
isDisConnect={ disconnect }
walletAddress={ walletDetails.walletAddress }
onChangeWalletAddress={ onChangeWalletAddress }
onCloseModal={ onClickCloseModal } />
);
};
export default ConnectWalletPage;
Param | type | Required | Description |
---|---|---|---|
open | boolean | ✅ | |
walletAddress | string | ✅ | |
isDisConnect | boolean | ✅ | |
config | Object | ✅ | config |
walletOptions | Object | ✅ | walletOptions |
image | Object | ✅ | image |
content | Object | ContentData | |
isRefetchBalance | boolean | ||
onCloseModal | function | ✅ | To close the Modal |
Param | type | Required | Description |
---|---|---|---|
ORG_ID | string | ✅ | |
paperClientId | string | ||
projectId | string | ||
paperNetworkName | any |
Param | type | Required | Description |
---|---|---|---|
enableMetamask | boolean | ✅ | |
enableWalletConnect | boolean | ✅ | |
enableEmail | boolean | ✅ |
Param | type | Required | Description |
---|---|---|---|
logo | string | ✅ | |
metamask | string | ✅ | |
walletConnect | string | ✅ | |
error | string | ✅ |
Param | type | Required | Description |
---|---|---|---|
title | string | ||
description | string |
FAQs
Connecting wallet via metamask, wallet connect, email
The npm package @mojito-inc/connect-wallet receives a total of 191 weekly downloads. As such, @mojito-inc/connect-wallet popularity was classified as not popular.
We found that @mojito-inc/connect-wallet demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.