From 375cc397d8c33cc335f1735c951741c15ae31181 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Sun, 3 Feb 2019 22:30:32 -0500 Subject: [PATCH] show error snackbar instead of modal for reward fail --- dist/bundle.js | 2 +- src/redux/actions/rewards.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/bundle.js b/dist/bundle.js index 9a39448..656a41a 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -8052,7 +8052,7 @@ function doClaimRewardType(rewardType) { }); if (options.notifyError) { - dispatch((0, _lbryRedux.doError)(error.message)); + dispatch((0, _lbryRedux.doToast)({ message: error.message, isError: true })); } }; diff --git a/src/redux/actions/rewards.js b/src/redux/actions/rewards.js index 4a0df89..22eb19e 100644 --- a/src/redux/actions/rewards.js +++ b/src/redux/actions/rewards.js @@ -1,5 +1,5 @@ import Lbryio from 'lbryio'; -import { ACTIONS, doError } from 'lbry-redux'; +import { ACTIONS, doToast } from 'lbry-redux'; import { selectUnclaimedRewards } from 'redux/selectors/rewards'; import { selectUserIsRewardApproved } from 'redux/selectors/user'; import { doFetchInviteStatus } from 'redux/actions/user'; @@ -90,7 +90,7 @@ export function doClaimRewardType(rewardType, options = {}) { }); if (options.notifyError) { - dispatch(doError(error.message)); + dispatch(doToast({ message: error.message, isError: true })); } };