Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- handleOriginCurrencyChange(event) {
- var newCurrency = event.target.value;
- this.props.dispatch(actions.changeOriginCurrency(newCurrency));
- // will the dispatch above affects `this.props`?
- // cause I think the dispatch will trigger the update
- var payload = {
- originAmount: this.props.originAmount,
- originCurrency: newCurrency,
- destCurrency: this.props.destinationCurrency,
- calcOriginAmount: false,
- };
- // this one is a async ajax dispatch,
- // will the function stop here
- // when resolve then continue the func
- // finally do the last diapatch?
- this.props.dispatch(actions.fetchConversionRate(payload));
- var feePayload = {
- originAmount: this.props.originAmount,
- originCurrency: newCurrency,
- destCurrency: this.props.destinationCurrency,
- };
- this.props.dispatch(actions.fetchFees(feePayload));
- }
Add Comment
Please, Sign In to add comment