@@ -7,6 +7,9 @@ import Footer from "../components/footer";
77import ConnectLedger from "../components/connectLedger" ;
88import CreateUser from "../components/createUser" ;
99import { useRouter } from "next/router" ;
10+ import initKeplr from "../helpers/keplr" ;
11+ import { unlockKeplrWallet } from "../store/actions/wallet" ;
12+ import { connect } from "react-redux" ;
1013
1114/*
1215Wizard Steps
@@ -16,7 +19,7 @@ Wizard Steps
16194 - Recover existing wallet
1720*/
1821
19- export default function Login ( props ) {
22+ function Login ( props ) {
2023 const { query } = useRouter ( ) ;
2124 const [ step , setStep ] = useState ( Number ( query . step ) || 1 ) ;
2225
@@ -76,6 +79,16 @@ export default function Login(props) {
7679 < img src = "/existing-wallet.svg" className = "w-20 h-20" />
7780 < div className = "ml-8" > Recover exisiting wallet</ div >
7881 </ button >
82+ < button
83+ className = "flex-1 border-2 border-grey rounded-md bg-base-100 overflow-hidden px-8 py-2 btn-ghost focus:outline-none flex items-center"
84+ onClick = { async ( e ) => {
85+ await initKeplr ( ) ;
86+ props . unlockKeplrWallet ( ) ;
87+ } }
88+ >
89+ < img src = "/keplr-logo.svg" className = "w-20 h-20 p-2" />
90+ < div className = "ml-8" > Connect Keplr</ div >
91+ </ button >
7992 </ div >
8093 </ div >
8194 < div className = "text-sm mt-2 mb-16 max-w-md text-center" >
@@ -117,3 +130,11 @@ export default function Login(props) {
117130 </ div >
118131 ) ;
119132}
133+
134+ const mapStateToProps = ( state ) => {
135+ return { } ;
136+ } ;
137+
138+ export default connect ( mapStateToProps , {
139+ unlockKeplrWallet,
140+ } ) ( Login ) ;
0 commit comments