diff --git a/src/components/Garden/Agreement/Agreement.js b/src/components/Garden/Agreement/Agreement.js
index 71a1e5e68..f2aa90dec 100644
--- a/src/components/Garden/Agreement/Agreement.js
+++ b/src/components/Garden/Agreement/Agreement.js
@@ -13,12 +13,14 @@ import MultiModal from '@components/MultiModal/MultiModal'
import SignAgreementScreens from '../ModalFlows/SignAgreementScreens/SignAgreementScreens'
import { useAgreement } from '@hooks/useAgreement'
import { useWallet } from '@providers/Wallet'
+import useGardenLogic from '@/logic/garden-logic'
import warningSvg from './assets/warning.svg'
function Agreement() {
const [agreement, loading] = useAgreement()
const [signModalVisible, setSignModalVisible] = useState(false)
+ const { actions } = useGardenLogic()
const signed = agreement.signedLatest
@@ -46,7 +48,10 @@ function Agreement() {
/>
-
+
)
diff --git a/src/components/Garden/DecisionDetail/DecisionDetail.js b/src/components/Garden/DecisionDetail/DecisionDetail.js
index 5fecd4eef..2b40bdb1b 100644
--- a/src/components/Garden/DecisionDetail/DecisionDetail.js
+++ b/src/components/Garden/DecisionDetail/DecisionDetail.js
@@ -324,9 +324,23 @@ function DecisionDetail({ proposal, actions }) {
/>
)}
{modalMode === 'settle' && (
-
+
+ )}
+ {modalMode === 'dispute' && (
+
)}
- {modalMode === 'dispute' && }
)
diff --git a/src/components/Garden/Home.js b/src/components/Garden/Home.js
index 7ce54b296..0aa3255f9 100644
--- a/src/components/Garden/Home.js
+++ b/src/components/Garden/Home.js
@@ -32,7 +32,6 @@ const Home = React.memo(function Home() {
proposals,
proposalsFetchedCount,
} = useGardenLogic()
-
const history = useHistory()
const { account } = useWallet()
@@ -216,9 +215,14 @@ const Home = React.memo(function Home() {
)}
{(modalMode === 'wrap' || modalMode === 'unwrap') && (
-
+
+ )}
+ {modalMode === 'claim' && (
+
)}
- {modalMode === 'claim' && }
)}
diff --git a/src/components/Garden/ModalFlows/ClaimRewardsScreens/ClaimRewardsScreens.js b/src/components/Garden/ModalFlows/ClaimRewardsScreens/ClaimRewardsScreens.js
index 1f3aa1dc4..91626c1d2 100644
--- a/src/components/Garden/ModalFlows/ClaimRewardsScreens/ClaimRewardsScreens.js
+++ b/src/components/Garden/ModalFlows/ClaimRewardsScreens/ClaimRewardsScreens.js
@@ -2,11 +2,8 @@ import React, { useCallback, useMemo, useState } from 'react'
import ClaimRewards from './ClaimRewards'
import ModalFlowBase from '../ModalFlowBase'
-import useActions from '@hooks/useActions'
-
-function ClaimRewardsScreens() {
+function ClaimRewardsScreens({ unipoolActions }) {
const [transactions, setTransactions] = useState([])
- const { unipoolActions } = useActions()
const getTransactions = useCallback(
async onComplete => {
diff --git a/src/components/Garden/ModalFlows/ExecuteProposalScreens/ExecuteProposalScreens.js b/src/components/Garden/ModalFlows/ExecuteProposalScreens/ExecuteProposalScreens.js
index dbf80c24c..62ff01144 100644
--- a/src/components/Garden/ModalFlows/ExecuteProposalScreens/ExecuteProposalScreens.js
+++ b/src/components/Garden/ModalFlows/ExecuteProposalScreens/ExecuteProposalScreens.js
@@ -2,11 +2,8 @@ import React, { useMemo, useState, useCallback } from 'react'
import ModalFlowBase from '../ModalFlowBase'
import ExecuteProposal from './ExecuteProposal'
-import useActions from '@hooks/useActions'
-
-function ExecuteProposalScreens({ proposal }) {
+function ExecuteProposalScreens({ proposal, convictionActions }) {
const [transactions, setTransactions] = useState([])
- const { convictionActions } = useActions()
const { id: proposalId } = proposal
diff --git a/src/components/Garden/ModalFlows/RaiseDisputeScreens/RaiseDisputeScreens.js b/src/components/Garden/ModalFlows/RaiseDisputeScreens/RaiseDisputeScreens.js
index ad6c7baa0..f4eb1f4a2 100644
--- a/src/components/Garden/ModalFlows/RaiseDisputeScreens/RaiseDisputeScreens.js
+++ b/src/components/Garden/ModalFlows/RaiseDisputeScreens/RaiseDisputeScreens.js
@@ -3,18 +3,16 @@ import PropTypes from 'prop-types'
import ModalFlowBase from '../ModalFlowBase'
import RaiseDisputeRequirements from './RaiseDisputeRequirements'
-import useActions from '@hooks/useActions'
import { useCelesteSynced } from '@hooks/useCeleste'
import { useDisputeFees } from '@hooks/useDispute'
import BigNumber from '@lib/bigNumber'
const ZERO_BN = new BigNumber('0')
-function RaiseDisputeScreens({ proposal }) {
+function RaiseDisputeScreens({ proposal, agreementActions }) {
const [transactions, setTransactions] = useState([])
const [celesteSynced, celesteSyncLoading] = useCelesteSynced()
const disputeFees = useDisputeFees()
- const { agreementActions } = useActions()
const temporatyTrx = useRef([])
diff --git a/src/components/Garden/ModalFlows/RemoveProposalScreens/RemoveProposalScreens.js b/src/components/Garden/ModalFlows/RemoveProposalScreens/RemoveProposalScreens.js
index 9daf309fc..6d93a52b3 100644
--- a/src/components/Garden/ModalFlows/RemoveProposalScreens/RemoveProposalScreens.js
+++ b/src/components/Garden/ModalFlows/RemoveProposalScreens/RemoveProposalScreens.js
@@ -2,11 +2,8 @@ import React, { useMemo, useState, useCallback } from 'react'
import ModalFlowBase from '../ModalFlowBase'
import RemoveProposal from './RemoveProposal'
-import useActions from '@hooks/useActions'
-
-function RemoveProposalScreens({ proposal, mode }) {
+function RemoveProposalScreens({ proposal, mode, convictionActions }) {
const [transactions, setTransactions] = useState([])
- const { convictionActions } = useActions()
const { id: proposalId } = proposal
diff --git a/src/components/Garden/ModalFlows/SettleProposalScreens/SettleProposalScreens.js b/src/components/Garden/ModalFlows/SettleProposalScreens/SettleProposalScreens.js
index 47d0e7ada..36640d3d9 100644
--- a/src/components/Garden/ModalFlows/SettleProposalScreens/SettleProposalScreens.js
+++ b/src/components/Garden/ModalFlows/SettleProposalScreens/SettleProposalScreens.js
@@ -2,14 +2,12 @@ import React, { useState, useCallback, useMemo } from 'react'
import { addressesEqual } from '@1hive/1hive-ui'
import ModalFlowBase from '../ModalFlowBase'
import SettlementDetails from './SettlementDetails'
-import useActions from '@hooks/useActions'
import { useWallet } from '@providers/Wallet'
-function SettleProposalScreens({ proposal }) {
+function SettleProposalScreens({ proposal, agreementActions }) {
const [transactions, setTransactions] = useState([])
const { account } = useWallet()
- const { agreementActions } = useActions()
const isChallenger = addressesEqual(account, proposal.challenger)
diff --git a/src/components/Garden/ModalFlows/SignAgreementScreens/SignAgreementScreens.js b/src/components/Garden/ModalFlows/SignAgreementScreens/SignAgreementScreens.js
index 5026eaeb4..640d85b17 100644
--- a/src/components/Garden/ModalFlows/SignAgreementScreens/SignAgreementScreens.js
+++ b/src/components/Garden/ModalFlows/SignAgreementScreens/SignAgreementScreens.js
@@ -4,12 +4,10 @@ import { useHistory } from 'react-router'
import { Button } from '@1hive/1hive-ui'
import ModalFlowBase from '../ModalFlowBase'
import SignOverview from './SignOverview'
-import useActions from '@hooks/useActions'
import { buildGardenPath } from '@utils/routing-utils'
-function SignAgreementScreens({ versionId }) {
- const actions = useActions()
+function SignAgreementScreens({ versionId, agreementActions }) {
const [transactions, setTransactions] = useState([])
const history = useHistory()
@@ -32,12 +30,12 @@ function SignAgreementScreens({ versionId }) {
const getTransactions = useCallback(
async onComplete => {
- await actions.agreementActions.signAgreement({ versionId }, intent => {
+ await agreementActions.signAgreement({ versionId }, intent => {
setTransactions(intent.transactions)
onComplete()
})
},
- [actions, versionId]
+ [agreementActions, versionId]
)
const screens = useMemo(
diff --git a/src/components/Garden/ModalFlows/SupportProposal/SupportProposalScreens.js b/src/components/Garden/ModalFlows/SupportProposal/SupportProposalScreens.js
index 43b0a58a7..00b6c1c99 100644
--- a/src/components/Garden/ModalFlows/SupportProposal/SupportProposalScreens.js
+++ b/src/components/Garden/ModalFlows/SupportProposal/SupportProposalScreens.js
@@ -3,11 +3,8 @@ import ModalFlowBase from '../ModalFlowBase'
import ChangeSupport from './ChangeSupport'
import SupportProposal from './SupportProposal'
-import useActions from '@hooks/useActions'
-
-function SupportProposalScreens({ proposal, mode }) {
+function SupportProposalScreens({ proposal, mode, convictionActions }) {
const [transactions, setTransactions] = useState([])
- const { convictionActions } = useActions()
const { id: proposalId } = proposal
diff --git a/src/components/Garden/ModalFlows/WrapTokenScreens/WrapTokenScreens.js b/src/components/Garden/ModalFlows/WrapTokenScreens/WrapTokenScreens.js
index d6140f774..8ea95f27c 100644
--- a/src/components/Garden/ModalFlows/WrapTokenScreens/WrapTokenScreens.js
+++ b/src/components/Garden/ModalFlows/WrapTokenScreens/WrapTokenScreens.js
@@ -3,16 +3,14 @@ import ModalFlowBase from '../ModalFlowBase'
import WrapUnwrap from './WrapUnwrap'
import { useGardenState } from '@providers/GardenState'
-import useActions from '@hooks/useActions'
import BigNumber from '@lib/bigNumber'
const ZERO_BN = new BigNumber(0)
-function WrapTokenScreens({ mode }) {
+function WrapTokenScreens({ mode, hookedTokenManagerActions }) {
const [transactions, setTransactions] = useState([])
const { token, wrappableToken } = useGardenState()
- const { hookedTokenManagerActions } = useActions()
const temporatyTrx = useRef([])
diff --git a/src/components/Garden/ProposalDetail/ProposalDetail.js b/src/components/Garden/ProposalDetail/ProposalDetail.js
index d2c7291e7..8a0b0691a 100644
--- a/src/components/Garden/ProposalDetail/ProposalDetail.js
+++ b/src/components/Garden/ProposalDetail/ProposalDetail.js
@@ -441,17 +441,48 @@ function ProposalDetail({
/>
)}
{modalMode === 'settle' && (
-
+
+ )}
+ {modalMode === 'dispute' && (
+
)}
- {modalMode === 'dispute' && }
{(modalMode === 'support' || modalMode === 'update') && (
-
+
)}
{modalMode === 'remove' && (
-
+
)}
{modalMode === 'execute' && (
-
+
)}