catch claim error on referrer set
This commit is contained in:
parent
1100a07108
commit
7678eedf4d
1 changed files with 8 additions and 8 deletions
|
@ -647,14 +647,7 @@ export function doUserSetReferrer(referrer, shouldClaim) {
|
|||
if (!claim) {
|
||||
try {
|
||||
const response = await Lbry.resolve({ urls: [uri] });
|
||||
claim = response && response[uri];
|
||||
} catch (error) {
|
||||
dispatch({
|
||||
type: ACTIONS.USER_SET_REFERRER_FAILURE,
|
||||
data: { error },
|
||||
});
|
||||
}
|
||||
}
|
||||
if (response && response[uri] && !response[uri].error) claim = response && response[uri];
|
||||
if (claim) {
|
||||
if (claim.signing_channel) {
|
||||
referrerCode = claim.signing_channel.permanent_url.replace('lbry://', '');
|
||||
|
@ -662,6 +655,13 @@ export function doUserSetReferrer(referrer, shouldClaim) {
|
|||
referrerCode = claim.permanent_url.replace('lbry://', '');
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
dispatch({
|
||||
type: ACTIONS.USER_SET_REFERRER_FAILURE,
|
||||
data: { error },
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!referrerCode) {
|
||||
|
|
Loading…
Add table
Reference in a new issue