lbry-desktop/ui/util/claim.js
infinite-persistence 23f273356a
Explain that "Block" leads to modal with more options. (#7039)
## Issue
7035 Make it clearer that delegated mods can block via Block menu
2021-09-08 12:31:45 -04:00

21 lines
484 B
JavaScript

// @flow
export function getChannelIdFromClaim(claim: ?Claim) {
if (claim) {
if (claim.value_type === 'channel') {
return claim.claim_id;
} else if (claim.signing_channel) {
return claim.signing_channel.claim_id;
}
}
}
export function getChannelFromClaim(claim: ?Claim) {
return !claim
? null
: claim.value_type === 'channel'
? claim
: claim.signing_channel && claim.is_channel_signature_valid
? claim.signing_channel
: null;
}