From 3706bc593682b95b50ce15534cf7186a2f4165e0 Mon Sep 17 00:00:00 2001 From: akinwale Date: Thu, 3 May 2018 19:58:31 +0100 Subject: [PATCH] Wallet implementation (#92) * Created walletAddress and walletBalance components * Added walletSend and transaction list components. * added transaction history page --- app/src/assets/stripe@2x.png | Bin 0 -> 13474 bytes app/src/component/AppNavigator.js | 63 ++++++++- app/src/component/address/index.js | 7 + app/src/component/address/view.js | 29 ++++ app/src/component/button/index.js | 4 + app/src/component/button/view.js | 39 +++++ app/src/component/transactionList/index.js | 13 ++ .../internal/transaction-list-item.js | 45 ++++++ app/src/component/transactionList/view.js | 69 +++++++++ .../component/transactionListRecent/index.js | 20 +++ .../component/transactionListRecent/view.js | 46 ++++++ app/src/component/walletAddress/index.js | 20 +++ app/src/component/walletAddress/view.js | 47 +++++++ app/src/component/walletBalance/index.js | 9 ++ app/src/component/walletBalance/view.js | 29 ++++ app/src/component/walletSend/index.js | 22 +++ app/src/component/walletSend/view.js | 89 ++++++++++++ app/src/index.js | 7 +- app/src/page/discover/view.js | 2 +- app/src/page/splash/index.js | 8 +- app/src/page/splash/view.js | 3 +- app/src/page/transactionHistory/index.js | 18 +++ app/src/page/transactionHistory/view.js | 29 ++++ app/src/page/wallet/index.js | 4 + app/src/page/wallet/view.js | 21 +++ app/src/redux/actions/file.js | 4 +- app/src/styles/button.js | 30 ++++ app/src/styles/transactionList.js | 46 ++++++ app/src/styles/wallet.js | 133 ++++++++++++++++++ .../browser/reactmodules/MixpanelModule.java | 4 +- .../res/drawable-xhdpi/src_assets_stripe.png | Bin 0 -> 13474 bytes 31 files changed, 845 insertions(+), 15 deletions(-) create mode 100644 app/src/assets/stripe@2x.png create mode 100644 app/src/component/address/index.js create mode 100644 app/src/component/address/view.js create mode 100644 app/src/component/button/index.js create mode 100644 app/src/component/button/view.js create mode 100644 app/src/component/transactionList/index.js create mode 100644 app/src/component/transactionList/internal/transaction-list-item.js create mode 100644 app/src/component/transactionList/view.js create mode 100644 app/src/component/transactionListRecent/index.js create mode 100644 app/src/component/transactionListRecent/view.js create mode 100644 app/src/component/walletAddress/index.js create mode 100644 app/src/component/walletAddress/view.js create mode 100644 app/src/component/walletBalance/index.js create mode 100644 app/src/component/walletBalance/view.js create mode 100644 app/src/component/walletSend/index.js create mode 100644 app/src/component/walletSend/view.js create mode 100644 app/src/page/transactionHistory/index.js create mode 100644 app/src/page/transactionHistory/view.js create mode 100644 app/src/page/wallet/index.js create mode 100644 app/src/page/wallet/view.js create mode 100644 app/src/styles/button.js create mode 100644 app/src/styles/transactionList.js create mode 100644 app/src/styles/wallet.js create mode 100644 src/main/res/drawable-xhdpi/src_assets_stripe.png diff --git a/app/src/assets/stripe@2x.png b/app/src/assets/stripe@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..e377b6720ca63c342a62c7b655c0922bcbda515e GIT binary patch literal 13474 zcmbWecRZWl`#)~ho-wOYqiyUxliGX5ELx+)E@CED2Wka1sx3;?7BwnrQ#;hAl&C#g zL{MtATK(nq9-rU$kI&=#$2b4vKIdA`^E}sePVRHxL0LcznCP$4laY}z85!zYk&#g# z$;ik{X(>rPDKBz@NngC7diJ5#0iK~@uE8E;TJ8Zb4*?^8S1%7M4_EhypdpXjWMq^f zJ~sBD_GYGFw*Y@B*MD@R!u+MJXjoH(3Q40cBMwStS_-MOg^}IT=}HX&FUn86`;> zS+I->SWZ^pKOZ4dv|x8nu$8X9DXcsW5q|fM73aSyfe4X&E_b zIXOv^hGa+tJk&K@5*{M_Uk|z-A#TAwfuTMDaDjh3y21hwp=v@Tr2ig*f1sJ!|2T$+ z{D&wKWzylUfzq;4GSdG3|BUNj+99D<9{)d#|5ZE0CL+*7+R7s&01@m)nh#Im{~D9H z`@aYJN0EdEY#!`GniN+*-2gX)zXv?jNLNjWB$0CWaR)1@D!Rek73Cydl@(x;3hoN3 zk}7U;3X-mhGB8yIRaF&FWzYZm`QPkiOfMA<|0KflcfrWQKXh4W}K%jt* zj(~`ntD6t}pSI{fbM)^a>v{zHAU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awerOpen')} />, + headerRight: navigation.navigate('Search')} /> + }) + }, + TransactionHistory: { + screen: TransactionHistoryPage, + navigationOptions: { + title: 'Transaction History', + drawerLockMode: 'locked-closed' + } + } +}, { + headerMode: 'screen' +}); + const drawer = DrawerNavigator({ Discover: { screen: discoverStack }, + Wallet: { screen: walletStack }, Settings: { screen: SettingsPage, navigationOptions: { drawerLockMode: 'locked-closed' } }, About: { screen: AboutPage, navigationOptions: { drawerLockMode: 'locked-closed' } } }, { @@ -79,6 +103,8 @@ export const AppNavigator = new StackNavigator({ }); class AppWithNavigationState extends React.Component { + static supportedDisplayTypes = ['toast']; + componentWillMount() { AppState.addEventListener('change', this._handleAppStateChange); BackHandler.addEventListener('hardwareBackPress', function() { @@ -106,7 +132,33 @@ class AppWithNavigationState extends React.Component { AppState.removeEventListener('change', this._handleAppStateChange); BackHandler.removeEventListener('hardwareBackPress'); } - + + componentWillUpdate(nextProps) { + const { dispatch } = this.props; + const { notification } = nextProps; + if (notification) { + const { displayType, message } = notification; + let currentDisplayType; + if (displayType.length) { + for (let i = 0; i < displayType.length; i++) { + const type = displayType[i]; + if (AppWithNavigationState.supportedDisplayTypes.indexOf(type) > -1) { + currentDisplayType = type; + break; + } + } + } else if (AppWithNavigationState.supportedDisplayTypes.indexOf(displayType) > -1) { + currentDisplayType = displayType; + } + + if ('toast' === currentDisplayType) { + ToastAndroid.show(message, ToastAndroid.SHORT); + } + + dispatch(doHideNotification()); + } + } + _handleAppStateChange = (nextAppState) => { // Check if the app was suspended if (AppState.currentState && AppState.currentState.match(/inactive|background/)) { @@ -136,8 +188,9 @@ class AppWithNavigationState extends React.Component { const mapStateToProps = state => ({ nav: state.nav, + notification: selectNotification(state), keepDaemonRunning: makeSelectClientSetting(SETTINGS.KEEP_DAEMON_RUNNING)(state), showNsfw: makeSelectClientSetting(SETTINGS.SHOW_NSFW)(state) }); -export default connect(mapStateToProps)(AppWithNavigationState); \ No newline at end of file +export default connect(mapStateToProps)(AppWithNavigationState); diff --git a/app/src/component/address/index.js b/app/src/component/address/index.js new file mode 100644 index 0000000..9aaa4a3 --- /dev/null +++ b/app/src/component/address/index.js @@ -0,0 +1,7 @@ +import { connect } from 'react-redux'; +import { doNotify } from 'lbry-redux'; +import Address from './view'; + +export default connect(null, { + doNotify, +})(Address); diff --git a/app/src/component/address/view.js b/app/src/component/address/view.js new file mode 100644 index 0000000..1730dd2 --- /dev/null +++ b/app/src/component/address/view.js @@ -0,0 +1,29 @@ +// @flow +import * as React from 'react'; +import { Clipboard, Text, View } from 'react-native'; +import Button from '../button'; +import walletStyle from '../../styles/wallet'; + +type Props = { + address: string, + doNotify: ({ message: string, displayType: Array }) => void, +}; + +export default class Address extends React.PureComponent { + render() { + const { address, doNotify, style } = this.props; + + return ( + + {address || ''} +