Skip to content

Commit

Permalink
added error handling if user is barred and wants to get blocked adver…
Browse files Browse the repository at this point in the history
…tisers list
  • Loading branch information
ameerul-deriv committed Sep 22, 2022
1 parent 2dc44f4 commit 17d365c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/p2p/src/stores/my-profile-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,14 @@ export default class MyProfileStore extends BaseStore {
requestWS({
p2p_advertiser_relations: 1,
}).then(response => {
this.setBlockedAdvertisersList(response.p2p_advertiser_relations.blocked_advertisers);
this.loadMoreBlockedAdvertisers();
if (response) {
if (!response.error) {
this.setBlockedAdvertisersList(response.p2p_advertiser_relations?.blocked_advertisers);
this.loadMoreBlockedAdvertisers();
} else {
this.root_store.general_store.setBlockUnblockUserError(response.error.message);
}
}
this.setIsLoading(false);
});
}
Expand Down

0 comments on commit 17d365c

Please sign in to comment.