![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@gnosis.pm/safe-apps-wagmi
Advanced tools
A connector to be used with wagmi library
yarn add @gnosis.pm/safe-apps-wagmi @wagmi/core
npm install @gnosis.pm/safe-apps-wagmi @wagmi/core
import { SafeConnector } from '@gnosis.pm/safe-apps-wagmi';
const chains = ...
const client = createClient({
connectors: [
new SafeConnector({ chains }),
new MetaMaskConnector({ chains }),
new WalletConnectConnector({
chains,
options: {
qrcode: true,
},
}),
new InjectedConnector({
chains,
options: {
name: 'Injected',
shimDisconnect: true,
},
}),
],
...
});
Make sure to omit the autoConnect
property or set it to false. Wagmi library automatically connects to the last used provider, but instead we want to automatically connect to the Safe if the app is loaded in the Safe Context. Autoconnect logic may be implemented via a separate hook.
import { useConnect } from 'wagmi';
import { useEffect } from 'react';
const AUTOCONNECTED_CONNECTOR_IDS = ['safe'];
function useAutoConnect() {
const { connect, connectors } = useConnect();
useEffect(() => {
AUTOCONNECTED_CONNECTOR_IDS.forEach((connector) => {
const connectorInstance = connectors.find((c) => c.id === connector && c.ready);
if (connectorInstance) {
connect({ connector: connectorInstance });
}
});
}, [connect, connectors]);
}
export { useAutoConnect };
This hook tries to connect to the Safe wallet automatically on the app load. The hook can be extended with other connectors that use a similar iframe approach (e.g., Ledger Live). It can also be extended with fallback logic such as the last used wallet if the connection to the Safe doesn't succeed.
An example application can be found here
For the SDK overview documentation, please refer to the safe-apps-sdk documentation
FAQs
WAGMI connector for Safe Apps
The npm package @gnosis.pm/safe-apps-wagmi receives a total of 869 weekly downloads. As such, @gnosis.pm/safe-apps-wagmi popularity was classified as not popular.
We found that @gnosis.pm/safe-apps-wagmi demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 18 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.