use string for channel bid amount

This commit is contained in:
Sean Yesmunt 2018-10-31 13:11:32 -04:00
parent 639f99555f
commit 1837cef751

View file

@ -23,6 +23,7 @@ import {
doNotify, doNotify,
makeSelectChannelForClaimUri, makeSelectChannelForClaimUri,
parseURI, parseURI,
creditsToString,
} from 'lbry-redux'; } from 'lbry-redux';
import { makeSelectClientSetting, selectosNotificationsEnabled } from 'redux/selectors/settings'; import { makeSelectClientSetting, selectosNotificationsEnabled } from 'redux/selectors/settings';
import setBadge from 'util/setBadge'; import setBadge from 'util/setBadge';
@ -373,7 +374,7 @@ export function doFetchChannelListMine() {
}; };
} }
export function doCreateChannel(name, amount) { export function doCreateChannel(name: string, amount: number) {
return dispatch => { return dispatch => {
dispatch({ dispatch({
type: ACTIONS.CREATE_CHANNEL_STARTED, type: ACTIONS.CREATE_CHANNEL_STARTED,
@ -382,7 +383,7 @@ export function doCreateChannel(name, amount) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
Lbry.channel_new({ Lbry.channel_new({
channel_name: name, channel_name: name,
amount: parseFloat(amount), amount: creditsToString(amount),
}).then( }).then(
newChannelClaim => { newChannelClaim => {
const channelClaim = newChannelClaim; const channelClaim = newChannelClaim;