Commentron: min tip API now uses float again
This commit is contained in:
parent
e9a2f44899
commit
474da87c11
2 changed files with 0 additions and 16 deletions
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue