fix: reset seller state after submitting an offer
This commit is contained in:
parent
233b60996c
commit
81fdc7dccb
|
@ -8,6 +8,7 @@ import {
|
|||
SET_ARBITRATOR
|
||||
} from './constants';
|
||||
import {RESET_STATE, PURGE_STATE} from "../network/constants";
|
||||
import {ADD_OFFER_SUCCEEDED} from '../metadata/constants';
|
||||
|
||||
const DEFAULT_STATE = {
|
||||
asset: '',
|
||||
|
@ -60,6 +61,7 @@ function reducer(state = DEFAULT_STATE, action) {
|
|||
username: action.username,
|
||||
statusContactCode: action.statusContactCode
|
||||
};
|
||||
case ADD_OFFER_SUCCEEDED:
|
||||
case PURGE_STATE:
|
||||
case RESET_STATE: {
|
||||
return DEFAULT_STATE;
|
||||
|
|
|
@ -38,7 +38,7 @@ class Margin extends Component {
|
|||
};
|
||||
|
||||
componentDidMount() {
|
||||
if (!this.props.seller.currency) {
|
||||
if (!this.props.seller.currency && this.props.addOfferStatus !== States.success) {
|
||||
this.props.wizard.previous();
|
||||
} else {
|
||||
this.setState({ready: true});
|
||||
|
|
Loading…
Reference in New Issue