diff --git a/app/README.md b/app/README.md
index 02aac3f..793431c 100644
--- a/app/README.md
+++ b/app/README.md
@@ -19,6 +19,8 @@ You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
+NB: All tests are located under `src/tests`.
+
### `yarn build`
Builds the app for production to the `build` folder.\
diff --git a/app/package.json b/app/package.json
index 14adca2..b368a79 100644
--- a/app/package.json
+++ b/app/package.json
@@ -7,7 +7,8 @@
"@material-ui/core": "^4.11.4",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
- "@testing-library/user-event": "^12.1.10",
+ "@testing-library/react-hooks": "^8.0.1",
+ "@testing-library/user-event": "14",
"metamask-react": "^2.4.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
diff --git a/app/src/components/BglToWbgl.js b/app/src/components/BglToWbgl.js
index 29ddab1..42438ae 100644
--- a/app/src/components/BglToWbgl.js
+++ b/app/src/components/BglToWbgl.js
@@ -37,9 +37,9 @@ function BglToWbgl() {
return !sendAddress ? (
-
) : (
- Send BGL to: {sendAddress}
+ Send BGL to: {sendAddress}
- The currently available WBGL balance is {balance}. If you send more BGL than is available to complete the exchange, your BGL will be returned to your address.
+ The currently available WBGL balance is {balance}. If you send more BGL than is available to complete the exchange, your BGL will be returned to your address.
- Please note, that a fee of {feePercentage}% will be automatically deducted from the transfer amount. This exchange pair is active for 7 days.
+ Please note, that a fee of {feePercentage}% will be automatically deducted from the transfer amount. This exchange pair is active for 7 days.
)
diff --git a/app/src/components/ConnectWallet.js b/app/src/components/ConnectWallet.js
index 97ad3f3..26d100f 100644
--- a/app/src/components/ConnectWallet.js
+++ b/app/src/components/ConnectWallet.js
@@ -21,6 +21,9 @@ function ConnectWallet() {
case 'connected':
return ()
+ default:
+ return ()
+
}
}
diff --git a/app/src/components/WbglToBgl.js b/app/src/components/WbglToBgl.js
index d44f034..7938e15 100644
--- a/app/src/components/WbglToBgl.js
+++ b/app/src/components/WbglToBgl.js
@@ -1,6 +1,6 @@
-import {Fragment, useState} from 'react'
-import {useMetaMask} from 'metamask-react'
-import {useForm} from 'react-hook-form'
+import { Fragment, useState } from 'react'
+import { useMetaMask } from 'metamask-react'
+import { useForm } from 'react-hook-form'
import {
Box,
Button,
@@ -8,8 +8,8 @@ import {
TextField,
Typography,
} from '@material-ui/core'
-import {chainLabel, isChainBsc, post, url} from '../utils'
-import {sendWbgl, useWbglBalance} from '../utils/wallet'
+import { chainLabel, isChainBsc, post, url } from '../utils'
+import { sendWbgl, useWbglBalance } from '../utils/wallet'
import CheckWalletConnection from './CheckWalletConnection'
function WbglToBgl() {
@@ -18,11 +18,11 @@ function WbglToBgl() {
const [balance, setBalance] = useState(0)
const [feePercentage, setFeePercentage] = useState(0)
const wbglBalance = useWbglBalance()
- const {chainId, account, ethereum} = useMetaMask()
+ const { chainId, account, ethereum } = useMetaMask()
const chain = isChainBsc(chainId) ? 'bsc' : 'eth'
const AddressForm = () => {
- const {register, handleSubmit, setError, setFocus, formState: {errors}} = useForm()
+ const { register, handleSubmit, setError, setFocus, formState: { errors } } = useForm()
const onSubmit = async data => {
setSubmitting(true)
@@ -48,40 +48,41 @@ function WbglToBgl() {
setFeePercentage(response.feePercentage)
}).catch(result => {
if (result.hasOwnProperty('field')) {
- setError(result.field, {type: 'manual', message: result.message})
+ setError(result.field, { type: 'manual', message: result.message })
setFocus(result.field)
}
}).finally(() => setSubmitting(false))
}
return (
-