more cleanup

This commit is contained in:
Anthony 2021-08-13 16:07:12 +02:00
parent 5908f90d74
commit e5ef460e7e
No known key found for this signature in database
GPG key ID: C386D3C93D50E356
4 changed files with 5 additions and 65 deletions

View file

@ -1,40 +1,3 @@
import { connect } from 'react-redux';
import {
selectBalance,
selectClaimsBalance,
selectSupportsBalance,
selectTipsBalance,
selectIsFetchingUtxoCounts,
selectUtxoCounts,
doFetchUtxoCounts,
doUtxoConsolidate,
selectIsConsolidatingUtxos,
selectIsMassClaimingTips,
selectPendingConsolidateTxid,
selectPendingMassClaimTxid,
} from 'lbry-redux';
import { doOpenModal } from 'redux/actions/app';
import { selectSyncHash } from 'redux/selectors/sync';
import { selectClaimedRewards } from 'redux/selectors/rewards';
import WalletBalance from './view';
const select = state => ({
balance: selectBalance(state),
claimsBalance: selectClaimsBalance(state) || 0,
supportsBalance: selectSupportsBalance(state) || 0,
tipsBalance: selectTipsBalance(state) || 0,
rewards: selectClaimedRewards(state),
hasSynced: Boolean(selectSyncHash(state)),
fetchingUtxoCounts: selectIsFetchingUtxoCounts(state),
consolidatingUtxos: selectIsConsolidatingUtxos(state),
massClaimingTips: selectIsMassClaimingTips(state),
utxoCounts: selectUtxoCounts(state),
consolidateIsPending: selectPendingConsolidateTxid(state),
massClaimIsPending: selectPendingMassClaimTxid(state),
});
export default connect(select, {
doOpenModal,
doFetchUtxoCounts,
doUtxoConsolidate,
})(WalletBalance);
export default WalletBalance;

View file

@ -1,12 +1,9 @@
import { connect } from 'react-redux';
import { withRouter } from 'react-router';
import StripeAccountConnection from './view';
import { selectUser } from 'redux/selectors/user';
import { doToast } from 'redux/actions/notifications';
const select = (state) => ({
user: selectUser(state),
});
const select = (state) => ({});
const perform = (dispatch) => ({
doToast: (options) => dispatch(doToast(options)),

View file

@ -31,7 +31,6 @@ if (isDev) {
type Props = {
source: string,
user: User,
doOpenModal: (string, {}) => void,
doToast: ({ message: string }) => void,
};
@ -41,13 +40,11 @@ type State = {
loading: boolean,
content: ?string,
stripeConnectionUrl: string,
// alreadyUpdated: boolean,
accountConfirmed: boolean,
accountPendingConfirmation: boolean,
accountNotConfirmedButReceivedTips: boolean,
unpaidBalance: number,
pageTitle: string,
accountTransactions: any, // define this type
stillRequiringVerification: boolean
};
@ -64,20 +61,13 @@ class StripeAccountConnection extends React.Component<Props, State> {
unpaidBalance: 0,
stripeConnectionUrl: '',
pageTitle: 'Add Payout Method',
accountTransactions: [],
stillRequiringVerification: true,
// alreadyUpdated: false,
};
}
componentDidMount() {
const { user } = this.props;
let doToast = this.props.doToast;
// $FlowFixMe
this.experimentalUiEnabled = user && user.experimental_ui;
var that = this;
function getAndSetAccountLink(stillNeedToConfirmAccount) {
@ -200,7 +190,6 @@ class StripeAccountConnection extends React.Component<Props, State> {
accountNotConfirmedButReceivedTips,
pageTitle,
stillRequiringVerification,
// accountTransactions,
} = this.state;
return (

View file

@ -42,18 +42,8 @@ const WalletPage = (props: Props) => {
environment: stripeEnvironment,
},
'post'
); };
// function getCustomerStatus() {
// return Lbryio.call(
// 'customer',
// 'status',
// {
// environment: stripeEnvironment,
// },
// 'post'
// );
// }
);
}
function getAccountStatus() {
return Lbryio.call(
@ -117,6 +107,7 @@ const WalletPage = (props: Props) => {
})();
}, []);
// TODO: use built in tabs functionality
function focusLBCTab() {
document.getElementsByClassName('lbc-transactions')[0].style.display = 'inline';
document.getElementsByClassName('fiat-transactions')[0].style.display = 'none';