More stripe integration2 #6734

Closed
mayeaux wants to merge 50 commits from more-stripe-integration2 into master
3 changed files with 24 additions and 4 deletions
Showing only changes of commit c59c093be6 - Show all commits

View file

@ -1,9 +1,11 @@
// @flow // @flow
import * as ICONS from 'constants/icons'; import * as ICONS from 'constants/icons';
import * as PAGES from 'constants/pages';
import React from 'react'; import React from 'react';
import Button from 'component/button'; import Button from 'component/button';
import Card from 'component/common/card'; import Card from 'component/common/card';
import Page from 'component/page'; import Page from 'component/page';
import { Lbryio } from 'lbryinc'; import { Lbryio } from 'lbryinc';
import { URL, WEBPACK_WEB_PORT, STRIPE_PUBLIC_KEY } from 'config'; import { URL, WEBPACK_WEB_PORT, STRIPE_PUBLIC_KEY } from 'config';
import moment from 'moment'; import moment from 'moment';
@ -265,6 +267,14 @@ class StripeAccountConnection extends React.Component<Props, State> {
)} )}
</div> </div>
} }
actions={
<Button
button="primary"
label={__('View Transactions')}
icon={ICONS.SETTINGS}
navigate={`/$/${PAGES.WALLET}?tab=account-history`}
/>
}
/> />
<br /> <br />
</Page> </Page>

View file

@ -11,6 +11,8 @@ import Plastic from 'react-plastic';
import Button from 'component/button'; import Button from 'component/button';
import * as ICONS from 'constants/icons'; import * as ICONS from 'constants/icons';
import * as MODALS from 'constants/modal_types'; import * as MODALS from 'constants/modal_types';
import * as PAGES from 'constants/pages';
let stripeEnvironment = 'test'; let stripeEnvironment = 'test';
// if the key contains pk_live it's a live key // if the key contains pk_live it's a live key
@ -435,6 +437,14 @@ class SettingsStripeCard extends React.Component<Props, State> {
/> />
</> </>
} }
actions={
<Button
button="primary"
label={__('View Transactions')}
icon={ICONS.SETTINGS}
navigate={`/$/${PAGES.WALLET}?tab=payment-history`}
/>
}
/> />
<br /> <br />
</div> </div>

View file

@ -153,11 +153,11 @@ const WalletPage = (props: Props) => {
// select the first tab // select the first tab
React.useEffect(() => { React.useEffect(() => {
// if (tab === 'account-history') { if (tab === 'account-history') {
if (1 === 2) { // if (1 === 2) {
focusAccountHistoryTab(); focusAccountHistoryTab();
// } else if (tab === 'payment-history'){ } else if (tab === 'payment-history'){
} else if (1 === 2){ // } else if (1 === 2){
focusPaymentHistoryTab(); focusPaymentHistoryTab();
} }
}, []); }, []);