Skip to content

Commit

Permalink
fix: add response check (binary-com#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
kate-deriv committed Apr 11, 2023
1 parent 5fdccc3 commit 24cba3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/trader/src/Stores/Modules/Trading/trade-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ export default class TradeStore extends BaseStore {

// Sometimes the initial barrier doesn't match with current barrier choices received from API.
// When this happens we want to populate the list of barrier choices to choose from since the value cannot be specified manually
if (this.is_turbos || this.is_vanilla) {
if ((this.is_turbos || this.is_vanilla) && response.error.details.barrier_choices) {
const { barrier_choices, max_stake, min_stake } = response.error.details;
this.setStakeBoundary(contract_type, min_stake, max_stake);
this.setBarrierChoices(barrier_choices);
Expand Down

0 comments on commit 24cba3f

Please sign in to comment.