Compare commits

..

7 commits

Author SHA1 Message Date
Akinwale Ariwodola
7bcf3fc350 fix edit mode on owned publishes 2020-03-20 14:19:59 +01:00
Akinwale Ariwodola
744680d78d show/hide advanced link 2020-03-20 14:14:29 +01:00
Akinwale Ariwodola
01758dda5e update index 2020-03-20 11:16:30 +01:00
Akinwale Ariwodola
24b264bde3 display reposts properly on publishes page 2020-03-20 10:49:49 +01:00
Akinwale Ariwodola
1df7e617eb create reposts 2020-03-20 10:26:42 +01:00
Akinwale Ariwodola
7ae91d9d7a Merge remote-tracking branch 'origin/master' into repost-creation 2020-03-20 08:37:14 +01:00
Akinwale Ariwodola
9f3e93017e create repost view 2020-03-17 21:50:19 +01:00
38 changed files with 110 additions and 432 deletions

@ -1 +1 @@
Subproject commit ff30e7f6a4358fd997a9e6d9f75bfe6959eafcb6 Subproject commit 4d1f142f9cf4f221a2110b7d7aa77b9f42731253

View file

@ -304,23 +304,5 @@
"This content cannot be viewed at this time. Please try again in a bit.": "This content cannot be viewed at this time. Please try again in a bit.", "This content cannot be viewed at this time. Please try again in a bit.": "This content cannot be viewed at this time. Please try again in a bit.",
"Download file": "Download file", "Download file": "Download file",
"Save %title% (%size%) to your device": "Save %title% (%size%) to your device", "Save %title% (%size%) to your device": "Save %title% (%size%) to your device",
"Save \"%title%\" (%size%) to your device": "Save \"%title%\" (%size%) to your device", "Save \"%title%\" (%size%) to your device": "Save \"%title%\" (%size%) to your device"
"Find Channels to follow": "Find Channels to follow",
"LBRY works better if you follow at least 5 creators you like. Sign in to show creators you follow if you already have an account.": "LBRY works better if you follow at least 5 creators you like. Sign in to show creators you follow if you already have an account.",
"%remaining% more...": "%remaining% more...",
"Did you know that you can earn free credits worth up to %amount%?": "Did you know that you can earn free credits worth up to %amount%?",
"SHOW ME": "SHOW ME",
"Convert credits to USD on Bittrex": "Convert credits to USD on Bittrex",
"You also have": "You also have",
"in tips": "in tips",
"Earn more tips by uploading cool videos": "Earn more tips by uploading cool videos",
"You staked": "You staked",
"in your publishes": "in your publishes",
"in your supports": "in your supports",
"Your wallet is not currently synced with lbry.tv. You are responsible for backing up your wallet.": "Your wallet is not currently synced with lbry.tv. You are responsible for backing up your wallet.",
"A backup of your wallet is synced with lbry.tv": "A backup of your wallet is synced with lbry.tv",
"What does this mean?": "What does this mean?",
"LBRY credits allow you to publish or purchase content.": "LBRY credits allow you to publish or purchase content.",
"You can obtain free credits worth %amount% after you provide an email address.": "You can obtain free credits worth %amount% after you provide an email address.",
"up to": "up to"
} }

View file

@ -16,7 +16,7 @@
"@expo/vector-icons": "^8.1.0", "@expo/vector-icons": "^8.1.0",
"gfycat-style-urls": "^1.0.3", "gfycat-style-urls": "^1.0.3",
"lbry-redux": "lbryio/lbry-redux#69ffd110dbf3633e5847f61f008751edec033017", "lbry-redux": "lbryio/lbry-redux#69ffd110dbf3633e5847f61f008751edec033017",
"lbryinc": "lbryio/lbryinc#667024ebb7cb207609273174ca422cee47469270", "lbryinc": "lbryio/lbryinc#021ac75d9aa2db488cfff8e9be320402f038f955",
"lodash": ">=4.17.11", "lodash": ">=4.17.11",
"merge": ">=1.2.1", "merge": ">=1.2.1",
"moment": "^2.22.1", "moment": "^2.22.1",

View file

@ -54,9 +54,7 @@ import {
} from 'lbry-redux'; } from 'lbry-redux';
import { import {
Lbryio, Lbryio,
rewards as REWARD_TYPES,
doBlackListedOutpointsSubscribe, doBlackListedOutpointsSubscribe,
doClaimRewardType,
doFilteredOutpointsSubscribe, doFilteredOutpointsSubscribe,
doGetSync, doGetSync,
doUserCheckEmailVerified, doUserCheckEmailVerified,
@ -374,28 +372,6 @@ class AppWithNavigationState extends React.Component {
); );
}; };
checkNewAndroidReward = () => {
const { dispatch, doToast } = this.props;
const claimRewardCallback = err => {
if (err) {
// an error occurred, do not display anything
return;
}
// reward successfully claimed
NativeModules.UtilityModule.setNativeBooleanSetting(Constants.SETTING_NEW_ANDROID_REWARD_CLAIMED, true);
};
NativeModules.UtilityModule.getNativeBooleanSetting(Constants.SETTING_NEW_ANDROID_REWARD_CLAIMED, false).then(
rewardClaimed => {
if (!rewardClaimed) {
dispatch(
doClaimRewardType(REWARD_TYPES.TYPE_NEW_ANDROID, { notifyError: false, callback: claimRewardCallback }),
);
}
},
);
};
handleSdkReady = () => { handleSdkReady = () => {
const { dispatch } = this.props; const { dispatch } = this.props;
dispatch(doSetSdkReady()); dispatch(doSetSdkReady());
@ -422,8 +398,6 @@ class AppWithNavigationState extends React.Component {
} }
}); });
}); });
this.checkNewAndroidReward();
}; };
handleAccountUnlockFailed() { handleAccountUnlockFailed() {

View file

@ -1,14 +1,12 @@
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { doToast, selectBalance, selectMyChannelClaims } from 'lbry-redux'; import { doToast, selectMyChannelClaims } from 'lbry-redux';
import { selectUnclaimedRewardValue, selectUser } from 'lbryinc'; import { selectUser } from 'lbryinc';
import { selectSdkReady } from 'redux/selectors/settings'; import { selectSdkReady } from 'redux/selectors/settings';
import DrawerContent from './view'; import DrawerContent from './view';
const select = state => ({ const select = state => ({
balance: selectBalance(state),
channels: selectMyChannelClaims(state), channels: selectMyChannelClaims(state),
sdkReady: selectSdkReady(state), sdkReady: selectSdkReady(state),
unclaimedRewardAmount: selectUnclaimedRewardValue(state),
user: selectUser(state), user: selectUser(state),
}); });

View file

@ -6,8 +6,6 @@ import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
import Icon from 'react-native-vector-icons/FontAwesome5'; import Icon from 'react-native-vector-icons/FontAwesome5';
import channelIconStyle from 'styles/channelIcon'; import channelIconStyle from 'styles/channelIcon';
import discoverStyle from 'styles/discover'; import discoverStyle from 'styles/discover';
import { Lbryio } from 'lbryinc';
import { formatUsd } from 'utils/helper';
const groupedMenuItems = { const groupedMenuItems = {
'Find content': [ 'Find content': [
@ -44,18 +42,6 @@ const routesRequiringSdkReady = [
]; ];
class DrawerContent extends React.PureComponent { class DrawerContent extends React.PureComponent {
state = {
usdExchangeRate: 0,
};
componentDidMount() {
Lbryio.getExchangeRates().then(rates => {
if (!isNaN(rates.LBC_USD)) {
this.setState({ usdExchangeRate: rates.LBC_USD });
}
});
}
getAvatarImageUrl = () => { getAvatarImageUrl = () => {
const { channels = [] } = this.props; const { channels = [] } = this.props;
if (channels) { if (channels) {
@ -96,7 +82,7 @@ class DrawerContent extends React.PureComponent {
}; };
render() { render() {
const { activeTintColor, balance, navigation, unclaimedRewardAmount, user, onItemPress } = this.props; const { activeTintColor, navigation, user, onItemPress } = this.props;
const { state } = navigation; const { state } = navigation;
const activeItemKey = state.routes[state.index] ? state.routes[state.index].key : null; const activeItemKey = state.routes[state.index] ? state.routes[state.index].key : null;
@ -203,15 +189,6 @@ class DrawerContent extends React.PureComponent {
</View> </View>
<Text style={[discoverStyle.menuItem, focused ? discoverStyle.menuItemFocused : null]}> <Text style={[discoverStyle.menuItem, focused ? discoverStyle.menuItemFocused : null]}>
{__(item.label)} {__(item.label)}
{item.label === 'Wallet' && this.state.usdExchangeRate > 0 && (
<Text> ({formatUsd(parseFloat(balance) * parseFloat(this.state.usdExchangeRate))})</Text>
)}
{item.label === 'Rewards' && this.state.usdExchangeRate > 0 && (
<Text>
{' '}
({formatUsd(parseFloat(unclaimedRewardAmount) * parseFloat(this.state.usdExchangeRate))})
</Text>
)}
</Text> </Text>
</TouchableOpacity> </TouchableOpacity>
); );

View file

@ -70,9 +70,7 @@ class FileItem extends React.PureComponent {
const outpointsToHide = !blackListedOutpoints const outpointsToHide = !blackListedOutpoints
? filteredOutpoints ? filteredOutpoints
: blackListedOutpoints.concat(filteredOutpoints); : blackListedOutpoints.concat(filteredOutpoints);
shouldHide = outpointsToHide.some( shouldHide = outpointsToHide.some(outpoint => outpoint.txid === claim.txid && outpoint.nout === claim.nout);
outpoint => outpoint && outpoint.txid === claim.txid && outpoint.nout === claim.nout,
);
} }
if (shouldHide) { if (shouldHide) {
// don't display blacklisted or filtered outpoints on the Your tags page // don't display blacklisted or filtered outpoints on the Your tags page

View file

@ -2,7 +2,7 @@ import { connect } from 'react-redux';
import { makeSelectClientSetting } from 'redux/selectors/settings'; import { makeSelectClientSetting } from 'redux/selectors/settings';
import { selectBalance } from 'lbry-redux'; import { selectBalance } from 'lbry-redux';
import { selectUnclaimedRewardValue } from 'lbryinc'; import { selectUnclaimedRewardValue } from 'lbryinc';
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api import Constants from 'constants';
import FloatingWalletBalance from './view'; import FloatingWalletBalance from './view';
const select = state => ({ const select = state => ({
@ -11,4 +11,7 @@ const select = state => ({
rewardsNotInterested: makeSelectClientSetting(Constants.SETTING_REWARDS_NOT_INTERESTED)(state), rewardsNotInterested: makeSelectClientSetting(Constants.SETTING_REWARDS_NOT_INTERESTED)(state),
}); });
export default connect(select, null)(FloatingWalletBalance); export default connect(
select,
null
)(FloatingWalletBalance);

View file

@ -17,7 +17,7 @@ export default class ModalRepostView extends React.PureComponent {
state = { state = {
channelName: null, channelName: null,
creditsInputFocused: false, creditsInputFocused: false,
depositAmount: '0.01', depositAmount: '0.1',
repostName: null, repostName: null,
repostStarted: false, repostStarted: false,
showAdvanced: false, showAdvanced: false,

View file

@ -1,11 +1,9 @@
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { doSendTip, doToast, selectBalance } from 'lbry-redux'; import { doSendTip, doToast, selectBalance } from 'lbry-redux';
import { selectSdkReady } from 'redux/selectors/settings';
import ModalTipView from './view'; import ModalTipView from './view';
const select = state => ({ const select = state => ({
balance: selectBalance(state), balance: selectBalance(state),
sdkReady: selectSdkReady(state),
}); });
const perform = dispatch => ({ const perform = dispatch => ({
@ -14,4 +12,7 @@ const perform = dispatch => ({
dispatch(doSendTip(amount, claimId, isSupport, successCallback, errorCallback)), dispatch(doSendTip(amount, claimId, isSupport, successCallback, errorCallback)),
}); });
export default connect(select, perform)(ModalTipView); export default connect(
select,
perform
)(ModalTipView);

View file

@ -18,18 +18,9 @@ export default class ModalTipView extends React.PureComponent {
}; };
handleSendTip = () => { handleSendTip = () => {
const { claim, balance, notify, onSendTipFailed, onSendTipSuccessful, sdkReady, sendTip } = this.props; const { claim, balance, notify, onSendTipFailed, onSendTipSuccessful, sendTip } = this.props;
const { tipAmount } = this.state; const { tipAmount } = this.state;
if (!sdkReady) {
notify({
message: __(
'The background service is still initializing. You can still explore and watch content during the initialization process.',
),
});
return;
}
if (tipAmount > balance) { if (tipAmount > balance) {
notify({ notify({
message: 'Insufficient credits', message: 'Insufficient credits',

View file

@ -1,11 +1,10 @@
// @flow // @flow
import React from 'react'; import React from 'react';
import { ActivityIndicator, Text, TouchableOpacity, View } from 'react-native'; import { ActivityIndicator, Text, TouchableOpacity, View } from 'react-native';
import { formatUsd } from 'utils/helper'; import Colors from '../../styles/colors';
import Colors from 'styles/colors';
import Icon from 'react-native-vector-icons/FontAwesome5'; import Icon from 'react-native-vector-icons/FontAwesome5';
import Link from 'component/link'; import Link from '../link';
import rewardStyle from 'styles/reward'; import rewardStyle from '../../styles/reward';
type Props = { type Props = {
canClaim: boolean, canClaim: boolean,
@ -62,7 +61,7 @@ class RewardCard extends React.PureComponent<Props> {
if (reward) { if (reward) {
const claimed = !!reward.transaction_id; const claimed = !!reward.transaction_id;
if (!claimed && reward.reward_range && reward.reward_range.includes('-')) { if (!claimed && reward.reward_range && reward.reward_range.includes('-')) {
return reward.reward_range.split('-')[1]; return reward.reward_range.split('-')[0] + '+'; // ex: 5+
} else if (reward.reward_amount > 0) { } else if (reward.reward_amount > 0) {
return reward.reward_amount; return reward.reward_amount;
} }
@ -73,7 +72,7 @@ class RewardCard extends React.PureComponent<Props> {
}; };
render() { render() {
const { canClaim, isPending, onClaimPress, reward, usdExchangeRate } = this.props; const { canClaim, isPending, onClaimPress, reward } = this.props;
const claimed = !!reward.transaction_id; const claimed = !!reward.transaction_id;
return ( return (
@ -118,16 +117,8 @@ class RewardCard extends React.PureComponent<Props> {
)} )}
</View> </View>
<View style={rewardStyle.rightCol}> <View style={rewardStyle.rightCol}>
{reward.reward_range && reward.reward_range.indexOf('-') > -1 && (
<Text style={rewardStyle.rightColHeader}>{__('up to')}</Text>
)}
<Text style={rewardStyle.rewardAmount}>{this.getDisplayAmount()}</Text> <Text style={rewardStyle.rewardAmount}>{this.getDisplayAmount()}</Text>
<Text style={rewardStyle.rewardCurrency}>LBC</Text> <Text style={rewardStyle.rewardCurrency}>LBC</Text>
{usdExchangeRate > 0 && (
<Text style={rewardStyle.rewardUsd}>
&asymp;{formatUsd(parseFloat(this.getDisplayAmount()) * parseFloat(usdExchangeRate))}
</Text>
)}
</View> </View>
</TouchableOpacity> </TouchableOpacity>
); );

View file

@ -7,7 +7,6 @@ import Link from 'component/link';
import Colors from 'styles/colors'; import Colors from 'styles/colors';
import Icon from 'react-native-vector-icons/FontAwesome5'; import Icon from 'react-native-vector-icons/FontAwesome5';
import rewardStyle from 'styles/reward'; import rewardStyle from 'styles/reward';
import { formatUsd } from '../../utils/helper';
class RewardEnrolment extends React.Component { class RewardEnrolment extends React.Component {
componentDidMount() { componentDidMount() {
@ -30,7 +29,7 @@ class RewardEnrolment extends React.Component {
}; };
render() { render() {
const { unclaimedRewardAmount, usdExchangeRate } = this.props; const { fetching, navigation, unclaimedRewardAmount, user } = this.props;
return ( return (
<View style={rewardStyle.enrollContainer}> <View style={rewardStyle.enrollContainer}>
@ -44,11 +43,9 @@ class RewardEnrolment extends React.Component {
<View style={rewardStyle.onboarding}> <View style={rewardStyle.onboarding}>
<Text style={rewardStyle.enrollDescText}> <Text style={rewardStyle.enrollDescText}>
{__('LBRY credits allow you to publish or purchase content.')} {__('LBRY credits allow you to purchase content, publish content, and influence the network.')}
{'\n\n'} {'\n\n'}
{__('You can obtain free credits worth %amount% after you provide an email address.', { {__('You get credits for free for providing an email address and taking other basic actions.')}
amount: formatUsd(parseFloat(unclaimedRewardAmount) * parseFloat(usdExchangeRate)),
})}
{'\n\n'} {'\n\n'}
<Link style={rewardStyle.learnMoreLink} text={__('Learn more')} onPress={this.onLearnMorePressed} />. <Link style={rewardStyle.learnMoreLink} text={__('Learn more')} onPress={this.onLearnMorePressed} />.
</Text> </Text>

View file

@ -58,7 +58,7 @@ class SuggestedSubscriptionsGrid extends React.PureComponent {
const uris = claimSearchByQuery[claimSearchKey]; const uris = claimSearchByQuery[claimSearchKey];
if ( if (
lastPageReached[claimSearchKey] || lastPageReached[claimSearchKey] ||
(uris.length > 0 && uris.length < suggestedPageSize) || uris.length >= softLimit ((uris.length > 0 && uris.length < suggestedPageSize) || uris.length >= softLimit)
) { ) {
return; return;
} }
@ -81,7 +81,7 @@ class SuggestedSubscriptionsGrid extends React.PureComponent {
} }
render() { render() {
const { claimSearchByQuery, inModal, navigation } = this.props; const { claimSearchByQuery, suggested, inModal, navigation } = this.props;
const options = this.buildClaimSearchOptions(); const options = this.buildClaimSearchOptions();
const claimSearchKey = createNormalizedClaimSearchKey(options); const claimSearchKey = createNormalizedClaimSearchKey(options);
const claimSearchUris = claimSearchByQuery[claimSearchKey]; const claimSearchUris = claimSearchByQuery[claimSearchKey];
@ -92,7 +92,7 @@ class SuggestedSubscriptionsGrid extends React.PureComponent {
maxToRenderPerBatch={48} maxToRenderPerBatch={48}
removeClippedSubviews removeClippedSubviews
itemDimension={120} itemDimension={120}
spacing={1} spacing={2}
items={claimSearchUris} items={claimSearchUris}
style={inModal ? subscriptionsStyle.modalScrollContainer : subscriptionsStyle.scrollContainer} style={inModal ? subscriptionsStyle.modalScrollContainer : subscriptionsStyle.scrollContainer}
contentContainerStyle={ contentContainerStyle={

View file

@ -6,4 +6,7 @@ const select = state => ({
balance: selectBalance(state), balance: selectBalance(state),
}); });
export default connect(select, null)(WalletBalance); export default connect(
select,
null
)(WalletBalance);

View file

@ -1,9 +1,9 @@
// @flow // @flow
import React from 'react'; import React from 'react';
import { Image, Text, View } from 'react-native'; import { Image, Text, View } from 'react-native';
import { formatCredits } from 'lbry-redux'; import { Lbry, formatCredits } from 'lbry-redux';
import { Lbryio } from 'lbryinc'; import Address from 'component/address';
import { formatUsd } from 'utils/helper'; import Button from 'component/button';
import walletStyle from 'styles/wallet'; import walletStyle from 'styles/wallet';
type Props = { type Props = {
@ -11,18 +11,6 @@ type Props = {
}; };
class WalletBalance extends React.PureComponent<Props> { class WalletBalance extends React.PureComponent<Props> {
state = {
usdExchangeRate: 0,
};
componentDidMount() {
Lbryio.getExchangeRates().then(rates => {
if (!isNaN(rates.LBC_USD)) {
this.setState({ usdExchangeRate: rates.LBC_USD });
}
});
}
render() { render() {
const { balance } = this.props; const { balance } = this.props;
return ( return (
@ -33,13 +21,6 @@ class WalletBalance extends React.PureComponent<Props> {
<Text style={walletStyle.balance}> <Text style={walletStyle.balance}>
{(balance || balance === 0) && formatCredits(parseFloat(balance), 2) + ' LBC'} {(balance || balance === 0) && formatCredits(parseFloat(balance), 2) + ' LBC'}
</Text> </Text>
<Text style={walletStyle.usdBalance}>
{this.state.usdExchangeRate > 0 && (
<Text>
&asymp;{formatUsd(isNaN(balance) ? 0 : parseFloat(balance) * parseFloat(this.state.usdExchangeRate))}
</Text>
)}
</Text>
</View> </View>
); );
} }

View file

@ -1,14 +1,14 @@
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { selectClaimsBalance, selectSupportsBalance, selectTipsBalance } from 'lbry-redux'; import { selectClaimsBalance, selectSupportsBalance, selectTipsBalance } from 'lbry-redux';
import { makeSelectClientSetting } from 'redux/selectors/settings';
import WalletBalanceExtra from './view'; import WalletBalanceExtra from './view';
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
const select = state => ({ const select = state => ({
claimsBalance: selectClaimsBalance(state) || 0, claimsBalance: selectClaimsBalance(state) || 0,
deviceWalletSynced: makeSelectClientSetting(Constants.SETTING_DEVICE_WALLET_SYNCED)(state),
supportsBalance: selectSupportsBalance(state) || 0, supportsBalance: selectSupportsBalance(state) || 0,
tipsBalance: selectTipsBalance(state) || 0, tipsBalance: selectTipsBalance(state) || 0,
}); });
export default connect(select, null)(WalletBalanceExtra); export default connect(
select,
null,
)(WalletBalanceExtra);

View file

@ -1,14 +1,12 @@
// @flow // @flow
import React from 'react'; import React from 'react';
import { Text, View } from 'react-native'; import { Image, Text, View } from 'react-native';
import { formatCredits } from 'lbry-redux'; import { Lbry, formatCredits } from 'lbry-redux';
import { Lbryio } from 'lbryinc'; import Address from 'component/address';
import { formatUsd } from 'utils/helper'; import Button from 'component/button';
import Colors from 'styles/colors'; import Colors from 'styles/colors';
import Icon from 'react-native-vector-icons/FontAwesome5'; import Icon from 'react-native-vector-icons/FontAwesome5';
import Link from 'component/link';
import walletStyle from 'styles/wallet'; import walletStyle from 'styles/wallet';
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
type Props = { type Props = {
claimsBalance: number, claimsBalance: number,
@ -17,95 +15,36 @@ type Props = {
}; };
class WalletBalanceExtra extends React.PureComponent<Props> { class WalletBalanceExtra extends React.PureComponent<Props> {
state = {
usdExchangeRate: 0,
};
componentDidMount() {
Lbryio.getExchangeRates().then(rates => {
if (!isNaN(rates.LBC_USD)) {
this.setState({ usdExchangeRate: rates.LBC_USD });
}
});
}
render() { render() {
const { claimsBalance, deviceWalletSynced, navigation, supportsBalance, tipsBalance } = this.props; const { claimsBalance, supportsBalance, tipsBalance } = this.props;
return ( return (
<View style={walletStyle.balanceExtra}> <View style={walletStyle.balanceExtraCard}>
<View style={walletStyle.usdInfoCard}> <View style={walletStyle.walletExtraRow}>
<Text style={walletStyle.usdInfoText}> <View style={walletStyle.walletExtraCol}>
You can convert your credits to USD and withdraw the converted amount using an exchange.{' '} <Icon style={walletStyle.walletExtraIcon} color={Colors.LbryGreen} name={'gift'} size={16} />
<Link <Text style={walletStyle.walletExtraCaption}>{__('You also have')}</Text>
style={walletStyle.usdConvertFaqLink} <View style={walletStyle.balanceRow}>
href={'https://lbry.com/faq/exchanges'} <Text style={walletStyle.walletExtraBalance}>{formatCredits(parseFloat(tipsBalance), 2)}</Text>
text={__('Learn more')} <Text style={walletStyle.walletExtraCurrency}>LBC</Text>
/>
.
</Text>
<Link
style={walletStyle.usdConvertLink}
href={'https://bittrex.com/Account/Register?referralCode=4M1-P30-BON'}
text={__('Convert credits to USD on Bittrex')}
/>
</View>
<View style={walletStyle.balanceExtraCard}>
<View style={walletStyle.walletExtraRow}>
<View style={walletStyle.walletExtraCol}>
<Icon style={walletStyle.walletExtraIcon} color={Colors.LbryGreen} name={'gift'} size={16} />
<Text style={walletStyle.walletExtraCaption}>{__('You also have')}</Text>
<View style={walletStyle.balanceRow}>
<Text style={walletStyle.walletExtraBalance}>{formatCredits(parseFloat(tipsBalance), 2)}</Text>
<Text style={walletStyle.walletExtraCurrency}>LBC</Text>
</View>
<Text style={walletStyle.usdWalletExtraBalance}>
&asymp;{formatUsd(parseFloat(tipsBalance) * parseFloat(this.state.usdExchangeRate))}
</Text>
<Text style={walletStyle.text}>{__('in tips')}</Text>
<Link
style={walletStyle.earnTipsLink}
onPress={() => {
navigation.navigate({ routeName: Constants.DRAWER_ROUTE_PUBLISH });
}}
text={__('Earn more tips by uploading cool videos')}
/>
</View>
<View style={walletStyle.walletExtraCol}>
<Icon style={walletStyle.walletExtraIcon} color={Colors.LbryGreen} name={'lock'} size={16} />
<Text style={walletStyle.walletExtraCaption}>{__('You staked')}</Text>
<View style={walletStyle.balanceRow}>
<Text style={walletStyle.walletExtraBalance}>{formatCredits(parseFloat(claimsBalance), 2)}</Text>
<Text style={walletStyle.walletExtraCurrency}>LBC</Text>
</View>
<Text style={walletStyle.text}>{__('in your publishes')}</Text>
<View style={[walletStyle.balanceRow, walletStyle.walletExtraTopMargin]}>
<Text style={walletStyle.walletExtraBalance}>{formatCredits(parseFloat(supportsBalance), 2)}</Text>
<Text style={walletStyle.walletExtraCurrency}>LBC</Text>
</View>
<Text style={walletStyle.text}>{__('in your supports')}</Text>
</View> </View>
<Text style={walletStyle.text}>{__('in tips')}</Text>
</View> </View>
</View>
<View style={walletStyle.syncDriverCustody}> <View style={walletStyle.walletExtraCol}>
<Text style={walletStyle.syncInfoText}> <Icon style={walletStyle.walletExtraIcon} color={Colors.LbryGreen} name={'lock'} size={16} />
{deviceWalletSynced <Text style={walletStyle.walletExtraCaption}>{__('You staked')}</Text>
? __('A backup of your wallet is synced with lbry.tv') <View style={walletStyle.balanceRow}>
: __('Your wallet is not currently synced with lbry.tv. You are responsible for backing up your wallet.')} <Text style={walletStyle.walletExtraBalance}>{formatCredits(parseFloat(claimsBalance), 2)}</Text>
</Text> <Text style={walletStyle.walletExtraCurrency}>LBC</Text>
<Link </View>
text={__('What does this mean?')} <Text style={walletStyle.text}>{__('in your publishes')}</Text>
href={ <View style={[walletStyle.balanceRow, walletStyle.walletExtraTopMargin]}>
deviceWalletSynced <Text style={walletStyle.walletExtraBalance}>{formatCredits(parseFloat(supportsBalance), 2)}</Text>
? 'https://lbry.com/faq/account-sync' <Text style={walletStyle.walletExtraCurrency}>LBC</Text>
: 'https://lbry.com/faq/how-to-backup-wallet#android' </View>
} <Text style={walletStyle.text}>{__('in your supports')}</Text>
style={walletStyle.syncInfoLink} </View>
/>
</View> </View>
</View> </View>
); );

View file

@ -27,7 +27,7 @@ class WalletSyncDriver extends React.PureComponent<Props> {
}, },
}, },
], ],
{ cancelable: true }, { cancelable: true }
); );
} }
}; };

View file

@ -45,7 +45,6 @@ const Constants = {
SETTING_REWARDS_NOT_INTERESTED: 'rewardsNotInterested', SETTING_REWARDS_NOT_INTERESTED: 'rewardsNotInterested',
SETTING_DEVICE_WALLET_SYNCED: 'deviceWalletSynced', SETTING_DEVICE_WALLET_SYNCED: 'deviceWalletSynced',
SETTING_DHT_ENABLED: 'dhtEnabled', SETTING_DHT_ENABLED: 'dhtEnabled',
SETTING_NEW_ANDROID_REWARD_CLAIMED: 'newAndroidRewardClaimed',
ACTION_SDK_READY: 'SDK_READY', ACTION_SDK_READY: 'SDK_READY',

View file

@ -47,7 +47,7 @@ export default class ChannelCreator extends React.PureComponent {
channelNameUserEdited: false, channelNameUserEdited: false,
newChannelTitle: '', newChannelTitle: '',
newChannelName: '', newChannelName: '',
newChannelBid: 0.01, newChannelBid: 0.1,
addingChannel: false, addingChannel: false,
creatingChannel: false, creatingChannel: false,
editChannelUrl: null, editChannelUrl: null,
@ -280,7 +280,7 @@ export default class ChannelCreator extends React.PureComponent {
handleCreateCancel = () => { handleCreateCancel = () => {
const { clearChannelFormState } = this.props; const { clearChannelFormState } = this.props;
clearChannelFormState(); // explicitly clear state on cancel? clearChannelFormState(); // explicitly clear state on cancel?
this.setState({ showCreateChannel: false, newChannelName: '', newChannelBid: 0.01 }); this.setState({ showCreateChannel: false, newChannelName: '', newChannelBid: 0.1 });
}; };
handlePickerValueChange = (itemValue, itemIndex) => { handlePickerValueChange = (itemValue, itemIndex) => {
@ -589,7 +589,7 @@ export default class ChannelCreator extends React.PureComponent {
channelNameUserEdited: false, channelNameUserEdited: false,
newChannelTitle: '', newChannelTitle: '',
newChannelName: '', newChannelName: '',
newChannelBid: 0.01, newChannelBid: 0.1,
addingChannel: false, addingChannel: false,
creatingChannel: false, creatingChannel: false,
newChannelNameError: '', newChannelNameError: '',

View file

@ -820,16 +820,7 @@ class FilePage extends React.PureComponent {
}; };
onDownloadPressed = () => { onDownloadPressed = () => {
const { claim, notify, sdkReady, title } = this.props; const { claim, title } = this.props;
if (!sdkReady) {
notify({
message: __(
'The background service is still initializing. You can still explore and watch content during the initialization process.',
),
});
return;
}
const fileSize = claim && claim.value && claim.value.source ? claim.value.source.size : 0; const fileSize = claim && claim.value && claim.value.source ? claim.value.source.size : 0;
Alert.alert( Alert.alert(
__('Download file'), __('Download file'),
@ -1029,6 +1020,7 @@ class FilePage extends React.PureComponent {
myClaimUris, myClaimUris,
navigation, navigation,
position, position,
purchaseUri,
pushDrawerStack, pushDrawerStack,
setPlayerVisible, setPlayerVisible,
thumbnail, thumbnail,

View file

@ -38,19 +38,15 @@ class LiteFilePage extends React.PureComponent {
player = null; player = null;
startTime = null;
state = { state = {
channelName: null, channelName: null,
channelUrl: null, channelUrl: null,
fileViewLogged: false, title: null,
fullscreenMode: false, fullscreenMode: false,
playbackStarted: false,
playerHeight: null, playerHeight: null,
isLandscape: false, isLandscape: false,
sdkReady: false, // TODO: progressively enable features (e.g. tip) when sdk is ready sdkReady: false, // TODO: progressively enable features (e.g. tip) when sdk is ready
showRecommended: false, showRecommended: false,
title: null,
viewCount: 0, viewCount: 0,
}; };
@ -131,10 +127,6 @@ class LiteFilePage extends React.PureComponent {
); );
}; };
componentDidMount() {
this.startTime = Date.now();
}
componentDidUpdate() { componentDidUpdate() {
const { navigation } = this.props; const { navigation } = this.props;
const { uri } = navigation.state.params; const { uri } = navigation.state.params;

View file

@ -121,7 +121,7 @@ class PublishPage extends React.PureComponent {
// input data // input data
hasEditedContentAddress: false, hasEditedContentAddress: false,
bid: 0.01, bid: 0.1,
description: null, description: null,
title: null, title: null,
language: 'en', language: 'en',

View file

@ -194,7 +194,7 @@ class PublishesPage extends React.PureComponent {
}); });
} else { } else {
// TODO: when shortUrl is available for my claims, navigate to that URL instead // TODO: when shortUrl is available for my claims, navigate to that URL instead
navigateToUri(navigation, claim.permanent_url); navigateToUri(navigation, item);
} }
} }
}} }}

View file

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { Lbryio } from 'lbryinc'; import { Lbry } from 'lbry-redux';
import { ActivityIndicator, NativeModules, ScrollView, Text, View } from 'react-native'; import { ActivityIndicator, NativeModules, ScrollView, Text, View } from 'react-native';
import Colors from 'styles/colors'; import Colors from 'styles/colors';
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
@ -17,14 +17,13 @@ const FILTER_CLAIMED = 'claimed';
class RewardsPage extends React.PureComponent { class RewardsPage extends React.PureComponent {
state = { state = {
currentFilter: FILTER_AVAILABLE,
firstRewardClaimed: false,
isEmailVerified: false, isEmailVerified: false,
isIdentityVerified: false, isIdentityVerified: false,
isRewardApproved: false, isRewardApproved: false,
revealVerification: true,
usdExchangeRate: 0,
verifyRequestStarted: false, verifyRequestStarted: false,
revealVerification: true,
firstRewardClaimed: false,
currentFilter: FILTER_AVAILABLE,
}; };
scrollView = null; scrollView = null;
@ -49,12 +48,6 @@ class RewardsPage extends React.PureComponent {
setPlayerVisible(); setPlayerVisible();
NativeModules.Firebase.setCurrentScreen('Rewards'); NativeModules.Firebase.setCurrentScreen('Rewards');
Lbryio.getExchangeRates().then(rates => {
if (!isNaN(rates.LBC_USD)) {
this.setState({ usdExchangeRate: rates.LBC_USD });
}
});
fetchRewards(); fetchRewards();
this.setState({ this.setState({
@ -165,7 +158,6 @@ class RewardsPage extends React.PureComponent {
canClaim={!isNotEligible} canClaim={!isNotEligible}
reward={reward} reward={reward}
reward_type={reward.reward_type} reward_type={reward.reward_type}
usdExchangeRate={this.state.usdExchangeRate}
/> />
))} ))}
<CustomRewardCard canClaim={!isNotEligible} showVerification={this.showVerification} /> <CustomRewardCard canClaim={!isNotEligible} showVerification={this.showVerification} />
@ -219,9 +211,7 @@ class RewardsPage extends React.PureComponent {
return ( return (
<View style={rewardStyle.container}> <View style={rewardStyle.container}>
<UriBar navigation={navigation} /> <UriBar navigation={navigation} />
{(!this.state.isEmailVerified || !this.state.isRewardApproved) && ( {(!this.state.isEmailVerified || !this.state.isRewardApproved) && <RewardEnrolment navigation={navigation} />}
<RewardEnrolment usdExchangeRate={this.state.usdExchangeRate} navigation={navigation} />
)}
{this.state.isEmailVerified && this.state.isRewardApproved && ( {this.state.isEmailVerified && this.state.isRewardApproved && (
<ScrollView <ScrollView

View file

@ -2,7 +2,6 @@ import { connect } from 'react-redux';
import { SETTINGS, doUpdateBlockHeight, doPopulateSharedUserState, doToast } from 'lbry-redux'; import { SETTINGS, doUpdateBlockHeight, doPopulateSharedUserState, doToast } from 'lbry-redux';
import { import {
doAuthenticate, doAuthenticate,
doClaimRewardType,
doInstallNewWithParams, doInstallNewWithParams,
doFetchMySubscriptions, doFetchMySubscriptions,
doFetchRewardedContent, doFetchRewardedContent,

View file

@ -159,7 +159,6 @@ class SplashScreen extends React.PureComponent {
this.getUserSettings(); this.getUserSettings();
}); });
}); });
this.navigateToMain(); this.navigateToMain();
return; return;
} }

View file

@ -12,8 +12,6 @@ import {
selectViewMode, selectViewMode,
selectFirstRunCompleted, selectFirstRunCompleted,
selectShowSuggestedSubs, selectShowSuggestedSubs,
selectUnclaimedRewardValue,
selectUser,
} from 'lbryinc'; } from 'lbryinc';
import { doToast, selectFetchingClaimSearch } from 'lbry-redux'; import { doToast, selectFetchingClaimSearch } from 'lbry-redux';
import { doPushDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer'; import { doPushDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
@ -34,12 +32,9 @@ const select = state => ({
unreadSubscriptions: selectUnreadSubscriptions(state), unreadSubscriptions: selectUnreadSubscriptions(state),
viewMode: selectViewMode(state), viewMode: selectViewMode(state),
firstRunCompleted: selectFirstRunCompleted(state), firstRunCompleted: selectFirstRunCompleted(state),
rewardsNotInterested: makeSelectClientSetting(Constants.SETTING_REWARDS_NOT_INTERESTED)(state),
showSuggestedSubs: selectShowSuggestedSubs(state), showSuggestedSubs: selectShowSuggestedSubs(state),
timeItem: selectTimeItem(state), timeItem: selectTimeItem(state),
sdkReady: selectSdkReady(state), sdkReady: selectSdkReady(state),
unclaimedRewardAmount: selectUnclaimedRewardValue(state),
user: selectUser(state),
}); });
const perform = dispatch => ({ const perform = dispatch => ({

View file

@ -11,7 +11,7 @@ import {
View, View,
} from 'react-native'; } from 'react-native';
import { buildURI, parseURI } from 'lbry-redux'; import { buildURI, parseURI } from 'lbry-redux';
import { formatUsd, getOrderBy } from 'utils/helper'; import { getOrderBy } from 'utils/helper';
import AsyncStorage from '@react-native-community/async-storage'; import AsyncStorage from '@react-native-community/async-storage';
import moment from 'moment'; import moment from 'moment';
import Button from 'component/button'; import Button from 'component/button';
@ -31,21 +31,16 @@ import SuggestedSubscriptions from 'component/suggestedSubscriptions';
import SuggestedSubscriptionsGrid from 'component/suggestedSubscriptionsGrid'; import SuggestedSubscriptionsGrid from 'component/suggestedSubscriptionsGrid';
import UriBar from 'component/uriBar'; import UriBar from 'component/uriBar';
import SdkLoadingStatus from 'component/sdkLoadingStatus'; import SdkLoadingStatus from 'component/sdkLoadingStatus';
import Snackbar from 'react-native-snackbar';
import { Lbryio } from 'lbryinc';
class SubscriptionsPage extends React.PureComponent { class SubscriptionsPage extends React.PureComponent {
state = { state = {
currentSortByItem: Constants.CLAIM_SEARCH_SORT_BY_ITEMS[1], // should always default to sorting subscriptions by new
filteredChannels: [],
orderBy: ['release_time'],
showRewardsNag: true,
showingSuggestedSubs: false, showingSuggestedSubs: false,
showSortPicker: false, showSortPicker: false,
showTimePicker: false, showTimePicker: false,
showModalSuggestedSubs: false, showModalSuggestedSubs: false,
usdExchangeRate: 0, orderBy: ['release_time'],
userEmailVerified: false, filteredChannels: [],
currentSortByItem: Constants.CLAIM_SEARCH_SORT_BY_ITEMS[1], // should always default to sorting subscriptions by new
}; };
didFocusListener; didFocusListener;
@ -62,7 +57,15 @@ class SubscriptionsPage extends React.PureComponent {
} }
onComponentFocused = () => { onComponentFocused = () => {
const { currentRoute, doFetchMySubscriptions, pushDrawerStack, sdkReady, setPlayerVisible, user } = this.props; const {
currentRoute,
doFetchMySubscriptions,
doFetchRecommendedSubscriptions,
doSetViewMode,
pushDrawerStack,
setPlayerVisible,
subscriptionsViewMode,
} = this.props;
if (currentRoute === Constants.DRAWER_ROUTE_SUBSCRIPTIONS) { if (currentRoute === Constants.DRAWER_ROUTE_SUBSCRIPTIONS) {
pushDrawerStack(); pushDrawerStack();
@ -70,17 +73,6 @@ class SubscriptionsPage extends React.PureComponent {
setPlayerVisible(); setPlayerVisible();
NativeModules.Firebase.setCurrentScreen('Subscriptions'); NativeModules.Firebase.setCurrentScreen('Subscriptions');
Lbryio.getExchangeRates().then(rates => {
if (!isNaN(rates.LBC_USD)) {
this.setState({ usdExchangeRate: rates.LBC_USD }, () => {
if (sdkReady && parseFloat(this.state.usdExchangeRate) > 0 && user && !user.is_reward_approved) {
this.showRewardsAvailable();
}
});
}
});
this.setState({ userEmailVerified: user && user.has_verified_email });
doFetchMySubscriptions(); doFetchMySubscriptions();
}; };
@ -89,56 +81,15 @@ class SubscriptionsPage extends React.PureComponent {
} }
componentWillReceiveProps(nextProps) { componentWillReceiveProps(nextProps) {
const { currentRoute, user, sdkReady } = nextProps; const { currentRoute } = nextProps;
const { currentRoute: prevRoute, doFetchMySubscriptions } = this.props; const { currentRoute: prevRoute } = this.props;
if (Constants.DRAWER_ROUTE_SUBSCRIPTIONS === currentRoute && currentRoute !== prevRoute) { if (Constants.DRAWER_ROUTE_SUBSCRIPTIONS === currentRoute && currentRoute !== prevRoute) {
this.onComponentFocused(); this.onComponentFocused();
} }
if (user && user.has_verified_email && !this.state.userEmailVerified) {
// user just signed in
this.setState({ showingSuggestedSubs: false, userEmailVerified: true }, () => {
doFetchMySubscriptions();
});
}
if (
sdkReady &&
parseFloat(this.state.usdExchangeRate) > 0 &&
this.state.showRewardsNag &&
user &&
!user.is_reward_approved
) {
this.showRewardsAvailable();
}
this.unsubscribeShortChannelUrls(); this.unsubscribeShortChannelUrls();
} }
showRewardsAvailable = () => {
const { navigation, unclaimedRewardAmount, rewardsNotInterested } = this.props;
if (rewardsNotInterested) {
this.setState({ showRewardsNag: false });
return;
}
this.setState({ showRewardsNag: false }, () => {
Snackbar.show({
title: __('Did you know that you can earn free credits worth up to %amount%?', {
amount: formatUsd(parseFloat(this.state.usdExchangeRate) * parseFloat(unclaimedRewardAmount)),
}),
duration: Snackbar.LENGTH_LONG,
action: {
title: __('SHOW ME'),
color: Colors.LbryGreen,
onPress: () => {
navigation.navigate({ routeName: Constants.DRAWER_ROUTE_REWARDS });
},
},
});
});
};
handleSortByItemSelected = item => { handleSortByItemSelected = item => {
this.setState({ currentSortByItem: item, orderBy: getOrderBy(item), showSortPicker: false }); this.setState({ currentSortByItem: item, orderBy: getOrderBy(item), showSortPicker: false });
}; };

View file

@ -94,7 +94,7 @@ class WalletPage extends React.PureComponent {
> >
{!rewardsNotInterested && (!balance || balance === 0) && <WalletRewardsDriver navigation={navigation} />} {!rewardsNotInterested && (!balance || balance === 0) && <WalletRewardsDriver navigation={navigation} />}
<WalletBalance /> <WalletBalance />
<WalletBalanceExtra navigation={navigation} /> <WalletBalanceExtra />
<WalletAddress /> <WalletAddress />
<WalletSend /> <WalletSend />
<TransactionListRecent navigation={navigation} /> <TransactionListRecent navigation={navigation} />

View file

@ -445,8 +445,8 @@ const publishStyle = StyleSheet.create({
}, },
publishesFooter: { publishesFooter: {
marginTop: 2, marginTop: 2,
marginLeft: 16, marginLeft: 8,
marginRight: 16, marginRight: 8,
}, },
publishesFooterButton: { publishesFooterButton: {
alignSelf: 'flex-start', alignSelf: 'flex-start',

View file

@ -147,10 +147,6 @@ const rewardStyle = StyleSheet.create({
width: '18%', width: '18%',
alignItems: 'center', alignItems: 'center',
}, },
rightColHeader: {
fontFamily: 'Inter-Regular',
fontSize: 12,
},
rewardAmount: { rewardAmount: {
fontFamily: 'Inter-Regular', fontFamily: 'Inter-Regular',
fontSize: 26, fontSize: 26,
@ -158,7 +154,6 @@ const rewardStyle = StyleSheet.create({
}, },
rewardCurrency: { rewardCurrency: {
fontFamily: 'Inter-Regular', fontFamily: 'Inter-Regular',
fontSize: 12,
}, },
rewardTitle: { rewardTitle: {
fontFamily: 'Inter-Regular', fontFamily: 'Inter-Regular',
@ -327,12 +322,6 @@ const rewardStyle = StyleSheet.create({
activeFilterLink: { activeFilterLink: {
fontFamily: 'Inter-SemiBold', fontFamily: 'Inter-SemiBold',
}, },
rewardUsd: {
fontFamily: 'Inter-Regular',
fontSize: 12,
color: Colors.DescriptionGrey,
marginTop: 6,
},
}); });
export default rewardStyle; export default rewardStyle;

View file

@ -192,6 +192,8 @@ const subscriptionsStyle = StyleSheet.create({
suggestedItem: { suggestedItem: {
alignItems: 'center', alignItems: 'center',
marginBottom: 16, marginBottom: 16,
marginLeft: 16,
marginRight: 16,
height: 140, height: 140,
}, },
suggestedItemThumbnailContainer: { suggestedItemThumbnailContainer: {
@ -207,8 +209,8 @@ const subscriptionsStyle = StyleSheet.create({
height: '100%', height: '100%',
}, },
suggestedItemDetails: { suggestedItemDetails: {
marginLeft: 8, marginLeft: 16,
marginRight: 8, marginRight: 16,
alignItems: 'center', alignItems: 'center',
}, },
suggestedItemSubscribe: { suggestedItemSubscribe: {
@ -227,7 +229,7 @@ const subscriptionsStyle = StyleSheet.create({
suggestedItemTitle: { suggestedItemTitle: {
fontFamily: 'Inter-Regular', fontFamily: 'Inter-Regular',
textAlign: 'center', textAlign: 'center',
fontSize: 13, fontSize: 14,
marginTop: 4, marginTop: 4,
marginBottom: 2, marginBottom: 2,
}, },

View file

@ -23,7 +23,7 @@ const tagStyle = StyleSheet.create({
}, },
text: { text: {
fontFamily: 'Inter-Regular', fontFamily: 'Inter-Regular',
fontSize: 12, fontSize: 14,
marginRight: 8, marginRight: 8,
}, },
tagResultsList: { tagResultsList: {

View file

@ -103,12 +103,10 @@ const walletStyle = StyleSheet.create({
marginLeft: 16, marginLeft: 16,
marginRight: 16, marginRight: 16,
}, },
balanceExtra: {
marginLeft: 16,
marginRight: 16,
},
balanceExtraCard: { balanceExtraCard: {
backgroundColor: Colors.White, backgroundColor: Colors.White,
marginLeft: 16,
marginRight: 16,
padding: 16, padding: 16,
}, },
balanceBackground: { balanceBackground: {
@ -137,13 +135,6 @@ const walletStyle = StyleSheet.create({
fontFamily: 'Inter-Bold', fontFamily: 'Inter-Bold',
fontSize: 36, fontSize: 36,
marginLeft: 16, marginLeft: 16,
},
usdBalance: {
color: Colors.White,
fontFamily: 'Inter-Regular',
fontSize: 20,
marginLeft: 16,
marginTop: 2,
marginBottom: 16, marginBottom: 16,
}, },
balanceFocus: { balanceFocus: {
@ -261,22 +252,6 @@ const walletStyle = StyleSheet.create({
borderBottomWidth: 1, borderBottomWidth: 1,
borderBottomColor: Colors.PageBackground, borderBottomColor: Colors.PageBackground,
}, },
syncDriverCustody: {
backgroundColor: Colors.LbryGreen,
padding: 16,
},
syncInfoText: {
color: Colors.White,
fontFamily: 'Inter-Regular',
fontSize: 16,
marginBottom: 8,
},
syncInfoLink: {
color: Colors.White,
fontFamily: 'Inter-Regular',
fontSize: 14,
textDecorationLine: 'underline',
},
syncDriverLink: { syncDriverLink: {
color: Colors.LbryGreen, color: Colors.LbryGreen,
fontFamily: 'Inter-Regular', fontFamily: 'Inter-Regular',
@ -409,11 +384,6 @@ const walletStyle = StyleSheet.create({
fontFamily: 'Inter-SemiBold', fontFamily: 'Inter-SemiBold',
fontSize: 28, fontSize: 28,
}, },
usdWalletExtraBalance: {
fontFamily: 'Inter-Regular',
fontSize: 16,
color: Colors.DescriptionGrey,
},
balanceRow: { balanceRow: {
flexDirection: 'row', flexDirection: 'row',
alignItems: 'center', alignItems: 'center',
@ -436,34 +406,6 @@ const walletStyle = StyleSheet.create({
left: 0, left: 0,
top: 0, top: 0,
}, },
usdInfoCard: {
backgroundColor: Colors.White,
padding: 16,
borderBottomColor: Colors.VeryLightGrey,
borderBottomWidth: 1,
},
usdInfoText: {
fontFamily: 'Inter-Regular',
fontSize: 14,
marginBottom: 8,
},
usdConvertLink: {
fontFamily: 'Inter-Regular',
fontSize: 16,
color: Colors.LbryGreen,
},
usdConvertFaqLink: {
fontFamily: 'Inter-Regular',
fontSize: 14,
color: Colors.LbryGreen,
},
earnTipsLink: {
fontFamily: 'Inter-Regular',
fontSize: 14,
color: Colors.LbryGreen,
marginTop: 12,
marginRight: 16,
},
}); });
export default walletStyle; export default walletStyle;

View file

@ -436,10 +436,3 @@ export function fetchReferralCode(successCallback, errorCallback) {
export function decode(value) { export function decode(value) {
return decodeURIComponent(value).replace(/\+/g, ' '); return decodeURIComponent(value).replace(/\+/g, ' ');
} }
export function formatUsd(value) {
if (isNaN(parseFloat(value))) {
value = 0;
}
return '$' + parseFloat(value).toFixed(2);
}

View file

@ -4599,9 +4599,9 @@ lbry-redux@lbryio/lbry-redux#69ffd110dbf3633e5847f61f008751edec033017:
reselect "^3.0.0" reselect "^3.0.0"
uuid "^3.3.2" uuid "^3.3.2"
lbryinc@lbryio/lbryinc#667024ebb7cb207609273174ca422cee47469270: lbryinc@lbryio/lbryinc#021ac75d9aa2db488cfff8e9be320402f038f955:
version "0.0.1" version "0.0.1"
resolved "https://codeload.github.com/lbryio/lbryinc/tar.gz/667024ebb7cb207609273174ca422cee47469270" resolved "https://codeload.github.com/lbryio/lbryinc/tar.gz/021ac75d9aa2db488cfff8e9be320402f038f955"
dependencies: dependencies:
reselect "^3.0.0" reselect "^3.0.0"