1.1.9 • Published 11 months ago
@unipasswallet/web3-react v1.1.9
@web3-react/unipass
Installation
npm install @@unipasswallet/web3-react
or
yarn add @@unipasswallet/web3-react
Parameters
options.connect.chainId
-- Default chainId.options.connect.returnEmail
-- If true, email will return when connect function been called.options.connect.appSettings
-- Config appName, appIcon and theme.
Usage
import { UniPassTheme } from "@unipasswallet/popup-types";
import { initializeConnector } from "@web3-react/core";
import { UniPass } from "@unipasswallet/web3-react";
export const [uniPassWallet, hooks] = initializeConnector<UniPass>(
(actions) =>
new UniPass({
actions,
options: {
chainId: 5,
returnEmail: true,
appSettings: {
appName: "web3-react test for unipass",
appIcon: "your icon url",
theme: UniPassTheme.DARK,
},
},
})
);
import { hooks, uniPassWallet } from "./connector";
const { useProvider, useAccount } = hooks;
const provider = useProvider();
const account = useAccount();
const connect = () => {
return uniPassWallet.activate().catch((e) => {
console.error(e);
});
};
Example
A demo app for web3-react is available here
1.1.8-alpha.2
11 months ago
1.1.8-alpha.1
12 months ago
1.1.9
12 months ago
1.0.2
1 year ago
1.1.8-alpha.0
1 year ago
1.1.7
1 year ago
1.1.0
1 year ago
1.0.1
1 year ago
0.0.1-alpha.6
1 year ago
0.0.1-alpha.5
1 year ago
0.0.1-beta.5
1 year ago
0.0.1-beta.2
1 year ago
0.0.1-beta.1
1 year ago
0.0.1-beta.0
1 year ago