This is an example repo to show how to connect a React app to Valora using Wallet Connect version 1.
The relevant code is in ./src/App.js
.
The additional packages required are:
Install dependencies with
yarn
Run the demo application with
yarn start
The app should show a "Connect" button when there is not a wallet connected. A wallet connect modal will appear that you should scan with Valora.
Once the app is connected, it should show a "Send cUSD" button. Click the button and Valora will ask you to approve the transaction. The recipient and amount of the transaction are hardcoded, but feel free to edit and test. The transaction receipt will be logged in the browser console.
You can read more about using Wallet Connect v1 here.
This example was started with Create React App. Unnecessary files were deleted.