File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed
src/dashboard/src/pages/ChainCode Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,16 @@ class ChainCode extends PureComponent {
140140 } ) ;
141141 } ;
142142
143+ handleApprove = ( values , callback ) => {
144+ const { dispatch } = this . props ;
145+
146+ dispatch ( {
147+ type : 'chainCode/approveChainCode' ,
148+ payload : values ,
149+ callback,
150+ } ) ;
151+ } ;
152+
143153 onUploadChainCode = ( ) => {
144154 this . handleModalVisible ( true ) ;
145155 } ;
@@ -192,6 +202,7 @@ class ChainCode extends PureComponent {
192202
193203 const approveFormProps = {
194204 approveModalVisible,
205+ handleApprove : this . handleApprove ,
195206 handleApproveModalVisible : this . handleApproveModalVisible ,
196207 fetchChainCodes : this . fetchChainCodes ,
197208 approving,
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ const ApproveForm = props => {
1212 const [ channels , setChannels ] = useState ( [ ] ) ;
1313 const {
1414 approveModalVisible,
15+ handleApprove,
1516 handleApproveModalVisible,
1617 approving,
1718 fetchChainCodes,
@@ -31,16 +32,6 @@ const ApproveForm = props => {
3132 fetchData ( ) ;
3233 } , [ ] ) ;
3334
34- handleApprove = ( values , callback ) => {
35- const { dispatch } = this . props ;
36-
37- dispatch ( {
38- type : 'chainCode/approveChainCode' ,
39- payload : values ,
40- callback,
41- } ) ;
42- } ;
43-
4435 const approveCallback = response => {
4536 if ( response . status !== 'successful' ) {
4637 message . error (
You can’t perform that action at this time.
0 commit comments