diff --git a/dapp/.eslintrc b/dapp/.eslintrc
index 091b6b126..e0ec22303 100644
--- a/dapp/.eslintrc
+++ b/dapp/.eslintrc
@@ -21,18 +21,6 @@
// This is temporary solution after changes of the eslint-config version: @thesis-co/eslint-config: "github:thesis/eslint-config#7b9bc8c"
// Overrides rules should be fixed file by file.
"overrides": [
- {
- "files": [
- "src/components/Header/ConnectWallet.tsx",
- "src/components/Modals/Support/MissingAccount.tsx",
- "src/components/Modals/Staking/SignMessage.tsx",
- "src/hooks/useDepositBTCTransaction.ts",
- "src/components/shared/Form/FormTokenBalanceInput.tsx"
- ],
- "rules": {
- "@typescript-eslint/no-misused-promises": "off"
- }
- },
{
"files": [
"src/hooks/useSignMessage.ts"
diff --git a/dapp/src/components/Header/ConnectWallet.tsx b/dapp/src/components/Header/ConnectWallet.tsx
index 5319a04ca..41be77ac0 100644
--- a/dapp/src/components/Header/ConnectWallet.tsx
+++ b/dapp/src/components/Header/ConnectWallet.tsx
@@ -24,12 +24,18 @@ function ConnectButton({
}: ConnectButtonsProps) {
const colorScheme = !account ? "error" : undefined
+ const handleClick = () => {
+ requestAccount().catch((error) => {
+ throw error
+ })
+ }
+
return (
}
- onClick={requestAccount}
+ onClick={handleClick}
>
{account ? truncateAddress(account.address) : "Not connected"}
diff --git a/dapp/src/components/Modals/Staking/SignMessage.tsx b/dapp/src/components/Modals/Staking/SignMessage.tsx
index e3cda7886..4bc8f7554 100644
--- a/dapp/src/components/Modals/Staking/SignMessage.tsx
+++ b/dapp/src/components/Modals/Staking/SignMessage.tsx
@@ -9,8 +9,14 @@ export default function SignMessage() {
const { goNext } = useModalFlowContext()
const { signMessage } = useSignMessage(goNext)
+ const handleClick = () => {
+ signMessage().catch((error) => {
+ throw error
+ })
+ }
+
return (
-
+
{/* TODO: Add the correct action after click */}
{}}>
diff --git a/dapp/src/components/Modals/Support/MissingAccount.tsx b/dapp/src/components/Modals/Support/MissingAccount.tsx
index 89ca3effd..b859f3cc8 100644
--- a/dapp/src/components/Modals/Support/MissingAccount.tsx
+++ b/dapp/src/components/Modals/Support/MissingAccount.tsx
@@ -25,6 +25,12 @@ export default function MissingAccount({
}: MissingAccountProps) {
const { name, symbol } = getCurrencyByType(currency)
+ const handleClick = () => {
+ requestAccount().catch((error) => {
+ throw error
+ })
+ }
+
return (
<>
{name} account not installed
@@ -44,13 +50,7 @@ export default function MissingAccount({
-
diff --git a/dapp/src/components/shared/Form/FormTokenBalanceInput.tsx b/dapp/src/components/shared/Form/FormTokenBalanceInput.tsx
index 8571ed27e..817f840d0 100644
--- a/dapp/src/components/shared/Form/FormTokenBalanceInput.tsx
+++ b/dapp/src/components/shared/Form/FormTokenBalanceInput.tsx
@@ -11,12 +11,18 @@ export function FormTokenBalanceInput({
}: FormTokenBalanceInputProps) {
const [field, meta, helpers] = useField(name)
+ const setAmount = (value?: bigint) => {
+ helpers.setValue(value).catch((error) => {
+ throw error
+ })
+ }
+
return (
diff --git a/dapp/src/hooks/useDepositBTCTransaction.ts b/dapp/src/hooks/useDepositBTCTransaction.ts
index 0bef0c4be..a3feb0507 100644
--- a/dapp/src/hooks/useDepositBTCTransaction.ts
+++ b/dapp/src/hooks/useDepositBTCTransaction.ts
@@ -5,6 +5,8 @@ export function useDepositBTCTransaction(onSuccess?: OnSuccessCallback) {
// TODO: sending transactions using the SDK
const depositBTC = useCallback(() => {
if (onSuccess) {
+ // FIXME: enable eslint rule when SDK ready
+ // eslint-disable-next-line @typescript-eslint/no-misused-promises
setTimeout(onSuccess, 1000)
}
}, [onSuccess])