-
-
Save shreykoo/2f52b172cb69abd640be6697f0ace5ac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useEffect } from 'react'; | |
import Connex from '@vechain/connex'; | |
const App = () => { | |
const [walletClient, setWalletClient] = useState(null); | |
const connectWallet = async() => { | |
const client = new Connex({ | |
node: 'https://testnet.veblocks.net/', | |
network: 'test' | |
}); | |
const clientDetails = client.thor.block().get(); | |
setWalletClient(clientDetails); | |
}; | |
return ( | |
<div> | |
<button onClick={connectWallet}>Connect wallet</button> | |
<p> | |
{JSON.stringify(walletClient, 2, null)} | |
</p> | |
</div> | |
); | |
}; | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment