Creator: Enable "min tips" and "min hyperchat" #6824

Merged
infinite-persistence merged 6 commits from ip/min.tips into master 2021-08-13 04:41:02 +02:00
2 changed files with 0 additions and 16 deletions
Showing only changes of commit 474da87c11 - Show all commits

View file

@ -1429,15 +1429,6 @@ export const doUpdateCreatorSettings = (channelClaim: ChannelClaim, settings: Pe
return; return;
} }
const BTC_SATOSHIS = 100000000;
if (settings.min_tip_amount_comment !== undefined) {
settings.min_tip_amount_comment *= BTC_SATOSHIS;
}
if (settings.min_tip_amount_super_chat !== undefined) {
settings.min_tip_amount_super_chat *= BTC_SATOSHIS;
}
return Comments.setting_update({ return Comments.setting_update({
channel_name: channelClaim.name, channel_name: channelClaim.name,
channel_id: channelClaim.claim_id, channel_id: channelClaim.claim_id,

View file

@ -4,8 +4,6 @@ import { handleActions } from 'util/redux-utils';
import { BLOCK_LEVEL } from 'constants/comment'; import { BLOCK_LEVEL } from 'constants/comment';
import { isURIEqual } from 'lbry-redux'; import { isURIEqual } from 'lbry-redux';
const BTC_SATOSHIS = 100000000;
const defaultState: CommentsState = { const defaultState: CommentsState = {
commentById: {}, // commentId -> Comment commentById: {}, // commentId -> Comment
byId: {}, // ClaimID -> list of fetched comment IDs. byId: {}, // ClaimID -> list of fetched comment IDs.
@ -1023,11 +1021,6 @@ export default handleActions(
} }
} }
// Both partial and full update will always include these,
// so safe to always re-compute without accidentally double-converting.
settingsByChannelId[channelId].min_tip_amount_comment /= BTC_SATOSHIS;
settingsByChannelId[channelId].min_tip_amount_super_chat /= BTC_SATOSHIS;
return { return {
...state, ...state,
settingsByChannelId, settingsByChannelId,