File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ const Broker = () => {
49
49
} ) ;
50
50
getFees ( )
51
51
. then ( res => {
52
- if ( res . trades )
52
+ if ( res )
53
53
setFees ( res ) ;
54
54
} )
55
55
. catch ( error => {
@@ -151,13 +151,13 @@ const Broker = () => {
151
151
fields = { generateForm ( ) }
152
152
handleSubmitBroker = { handleSubmitBroker }
153
153
/>
154
- { feesData . trades
154
+ { Object . keys ( feesData ) . length
155
155
? < Card
156
156
className = "card-title m-top"
157
157
title = "Quick Trades Fees"
158
158
style = { { textAlign : 'center' } }
159
159
>
160
- { Object . entries ( feesData . trades ) . map ( ( [ currency , amount ] , index ) => (
160
+ { Object . entries ( feesData ) . map ( ( [ currency , amount ] , index ) => (
161
161
< div
162
162
key = { index }
163
163
className = "list-group-item list-group-item-action"
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
import { Divider , Button } from 'antd' ;
3
- import { reduxForm } from 'redux-form' ;
3
+ import { reduxForm , reset } from 'redux-form' ;
4
4
5
5
import { AdminHocForm } from '../../../components' ;
6
6
import { generateAdminSettings } from './Utils' ;
@@ -138,6 +138,6 @@ const LinksForm = ({
138
138
export const LinksSettingsForm = reduxForm ( {
139
139
form : 'ADMIN_LINKS_SETTINGS_FORM' ,
140
140
// onSubmitFail: (result, dispatch) => dispatch(reset(FORM_NAME)),
141
- // onSubmitSuccess: (result, dispatch) => dispatch(reset(name )),
141
+ onSubmitSuccess : ( result , dispatch ) => dispatch ( reset ( 'ADMIN_LINKS_SETTINGS_FORM' ) ) ,
142
142
enableReinitialize : true
143
143
} ) ( LinksForm ) ;
Original file line number Diff line number Diff line change @@ -164,6 +164,8 @@ export default class Settings extends Component {
164
164
formValues [ val ] = formProps [ val ] ;
165
165
}
166
166
} ) ;
167
+ } else if ( formKey === 'links' ) {
168
+ formValues . links = { ...formProps }
167
169
}
168
170
this . setState ( { loading : true , error : '' } ) ;
169
171
updatePlugins ( formValues )
You can’t perform that action at this time.
0 commit comments