From 474da87c114eb7d225ec23081f8a8d71f5ed0604 Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Mon, 9 Aug 2021 21:51:32 +0800 Subject: [PATCH] Commentron: min tip API now uses float again --- ui/redux/actions/comments.js | 9 --------- ui/redux/reducers/comments.js | 7 ------- 2 files changed, 16 deletions(-) diff --git a/ui/redux/actions/comments.js b/ui/redux/actions/comments.js index a97fe6a7f..78f1397bc 100644 --- a/ui/redux/actions/comments.js +++ b/ui/redux/actions/comments.js @@ -1429,15 +1429,6 @@ export const doUpdateCreatorSettings = (channelClaim: ChannelClaim, settings: Pe 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({ channel_name: channelClaim.name, channel_id: channelClaim.claim_id, diff --git a/ui/redux/reducers/comments.js b/ui/redux/reducers/comments.js index 5371bc5df..4e539e67c 100644 --- a/ui/redux/reducers/comments.js +++ b/ui/redux/reducers/comments.js @@ -4,8 +4,6 @@ import { handleActions } from 'util/redux-utils'; import { BLOCK_LEVEL } from 'constants/comment'; import { isURIEqual } from 'lbry-redux'; -const BTC_SATOSHIS = 100000000; - const defaultState: CommentsState = { commentById: {}, // commentId -> Comment 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 { ...state, settingsByChannelId,