diff --git a/ui/js/actions/rewards.js b/ui/js/actions/rewards.js
index 751bd79df..95ae3b25b 100644
--- a/ui/js/actions/rewards.js
+++ b/ui/js/actions/rewards.js
@@ -1,4 +1,5 @@
import * as types from "constants/action_types";
+import * as modals from "constants/modal_types";
import lbryio from "lbryio";
import rewards from "rewards";
import { selectRewardsByType } from "selectors/rewards";
@@ -58,6 +59,12 @@ export function doClaimReward(reward, saveError = false) {
reward,
},
});
+ if (reward.reward_type == rewards.TYPE_NEW_USER) {
+ dispatch({
+ type: types.OPEN_MODAL,
+ data: { modal: modals.FIRST_REWARD },
+ });
+ }
};
const failure = error => {
diff --git a/ui/js/actions/user.js b/ui/js/actions/user.js
index dad5e7624..e2fa9b917 100644
--- a/ui/js/actions/user.js
+++ b/ui/js/actions/user.js
@@ -1,8 +1,9 @@
import * as types from "constants/action_types";
import lbryio from "lbryio";
import { setLocal } from "utils";
-import { doRewardList } from "actions/rewards";
+import { doRewardList, doClaimRewardType } from "actions/rewards";
import { selectEmailToVerify, selectUser } from "selectors/user";
+import rewards from "rewards";
export function doAuthenticate() {
return function(dispatch, getState) {
@@ -152,6 +153,7 @@ export function doUserIdentityVerify(stripeToken) {
type: types.USER_IDENTITY_VERIFY_SUCCESS,
data: { user },
});
+ dispatch(doClaimRewardType(rewards.TYPE_NEW_USER));
} else {
throw new Error(
"Your identity is still not verified. This should not happen."
@@ -159,18 +161,6 @@ export function doUserIdentityVerify(stripeToken) {
}
})
.catch(error => {
- // let user = selectUser(getState());
- // user.is_identity_verified = true;
- // if (user.is_identity_verified) {
- // dispatch({
- // type: types.USER_IDENTITY_VERIFY_SUCCESS,
- // data: { user },
- // });
- // } else {
- // throw new Error(
- // "Your identity is still not verified. This should not happen."
- // ); //shouldn't happen
- // }
dispatch({
type: types.USER_IDENTITY_VERIFY_FAILURE,
data: { error: error.toString() },
diff --git a/ui/js/component/app/view.jsx b/ui/js/component/app/view.jsx
index 5447580af..e364c0db0 100644
--- a/ui/js/component/app/view.jsx
+++ b/ui/js/component/app/view.jsx
@@ -6,6 +6,7 @@ import ModalDownloading from "component/modalDownloading";
import ModalInsufficientCredits from "component/modalInsufficientCredits";
import ModalUpgrade from "component/modalUpgrade";
import ModalWelcome from "component/modalWelcome";
+import ModalFirstReward from "component/modalFirstReward";
import lbry from "lbry";
import * as modals from "constants/modal_types";
@@ -72,6 +73,7 @@ class App extends React.PureComponent {
{modal == modals.ERROR &&
+ {__("You earned a reward of")}
+ {" "}
+ {__(
+ "This reward will show in your Wallet momentarily, shown in the top right, probably while you are reading this message."
+ )}
+
+ {__(
+ "LBC is used to compensate creators, to publish, and to have say in how the network works."
+ )}
+
+ {__(
+ "No need to understand it all just yet! Try watching or downloading something next."
+ )}
+
+ {__(
+ "Finally, pleaseh know that LBRY is an early beta and that it earns the name."
+ )}
+
- {__(
- "Using LBRY is like dating a centaur. Totally normal up top, and"
- )}
- {" "}{__("way different")} {__("underneath.")}
- {__("Up top, LBRY is similar to popular media sites.")}
- {__(
- "Below, LBRY is controlled by users -- you -- via blockchain and decentralization."
- )}
-
- {__("Please have")} {" "}
- {reward &&
-
- {__("You earned a reward of")}
- {" "}
- {__(
- "This reward will show in your Wallet momentarily, probably while you are reading this message."
- )}
-
- {__(
- "LBC is used to compensate creators, to publish, and to have say in how the network works."
- )}
-
- {__(
- "No need to understand it all just yet! Try watching or downloading something next."
- )}
-
- {__(
- "Finally, know that LBRY is an early beta and that it earns the name."
- )}
-
+ {__(
+ "Using LBRY is like dating a centaur. Totally normal up top, and"
+ )}
+ {" "}{__("way different")} {__("underneath.")}
+ {__("Up top, LBRY is similar to popular media sites.")}
+ {__(
+ "Below, LBRY is controlled by users -- you -- via blockchain and decentralization."
+ )}
+
+ {__("Please have")} {" "}
+ {reward &&
+ {__("About Your Reward")}
+ {__("Welcome to LBRY.")}
- {__("About Your Reward")}
- {__("Welcome to LBRY.")}
+
- {__("You will receive an email when this process is complete.")} + {__( + "We apologize for this inconvenience, but have added this additional step to prevent fraud." + )}
- {__("Please enjoy free content in the meantime!")} + {__("You will receive an email when this process is complete.") + + " " + + __("Please enjoy free content in the meantime!")}