From 2f1fae23cf89adf82738c2862e872d42bcf9c80f Mon Sep 17 00:00:00 2001 From: jessopb <36554050+jessopb@users.noreply.github.com> Date: Fri, 22 Jan 2021 10:47:21 -0500 Subject: [PATCH] vanity referrals (#5353) --- ui/redux/actions/user.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ui/redux/actions/user.js b/ui/redux/actions/user.js index f730ca018..e9c036c93 100644 --- a/ui/redux/actions/user.js +++ b/ui/redux/actions/user.js @@ -1,4 +1,11 @@ -import { Lbry, doFetchChannelListMine, batchActions, makeSelectClaimForUri, isURIValid } from 'lbry-redux'; +import { + Lbry, + doFetchChannelListMine, + batchActions, + makeSelectClaimForUri, + isURIValid, + normalizeURI, +} from 'lbry-redux'; import * as ACTIONS from 'constants/action_types'; import { doClaimRewardType, doRewardList } from 'redux/actions/rewards'; import { selectEmailToVerify, selectPhoneToVerify, selectUserCountryCode, selectUser } from 'redux/selectors/user'; @@ -684,7 +691,7 @@ export function doUserSetReferrer(referrer, shouldClaim) { let referrerCode; const isValid = isURIValid(referrer); if (isValid) { - const uri = `lbry://${referrer}`; + const uri = normalizeURI(referrer); claim = makeSelectClaimForUri(uri)(getState()); if (!claim) { try {