@@ -8,9 +8,10 @@ import { useDisputeDetailsQuery } from "queries/useDisputeDetailsQuery";
8
8
import { Periods } from "src/consts/periods" ;
9
9
import { Period } from "src/graphql/graphql" ;
10
10
11
+ import { EnsureChain } from "components/EnsureChain" ;
11
12
import { Overlay } from "components/Overlay" ;
12
13
13
- import DistributeRewards from "./DistributeRewads " ;
14
+ import DistributeRewards from "./DistributeRewards " ;
14
15
import DrawButton from "./DrawButton" ;
15
16
import ExecuteRulingButton from "./ExecuteRuling" ;
16
17
import MenuButton from "./MenuButton" ;
@@ -86,24 +87,29 @@ const MaintenanceButtons: React.FC = () => {
86
87
return ( ) => clearInterval ( intervalId ) ;
87
88
} , [ dispute ] ) ;
88
89
90
+ const toggle = ( ) => setIsOpen ( ( prevValue ) => ! prevValue ) ;
89
91
return (
90
92
< Container >
91
93
{ isOpen ? (
92
94
< >
93
95
< Overlay onClick = { ( ) => setIsOpen ( false ) } />
94
96
< PopupContainer >
95
- < DrawButton { ...{ id, setIsOpen } } numberOfVotes = { dispute ?. currentRound . nbVotes } />
96
- < PassPeriodButton { ...{ id, setIsOpen } } />
97
- < DistributeRewards
98
- { ...{ id, setIsOpen } }
99
- roundIndex = { dispute ?. currentRoundIndex }
100
- numberOfVotes = { dispute ?. currentRound . nbVotes }
101
- />
102
- < ExecuteRulingButton { ...{ id, setIsOpen } } />
97
+ < EnsureChain >
98
+ < >
99
+ < DrawButton { ...{ id, setIsOpen } } numberOfVotes = { dispute ?. currentRound . nbVotes } />
100
+ < PassPeriodButton { ...{ id, setIsOpen } } />
101
+ < DistributeRewards
102
+ { ...{ id, setIsOpen } }
103
+ roundIndex = { dispute ?. currentRoundIndex }
104
+ numberOfVotes = { dispute ?. currentRound . nbVotes }
105
+ />
106
+ < ExecuteRulingButton { ...{ id, setIsOpen } } />
107
+ </ >
108
+ </ EnsureChain >
103
109
</ PopupContainer >
104
110
</ >
105
111
) : null }
106
- < MenuButton { ...{ setIsOpen , displayRipple } } />
112
+ < MenuButton { ...{ toggle , displayRipple } } />
107
113
</ Container >
108
114
) ;
109
115
} ;
0 commit comments