Skip to content
Permalink
Browse files

Merge remote-tracking branch 'origin/master'

  • Loading branch information...
yaroslav-fedyshyn-nordwhale committed Nov 8, 2019
2 parents 531aded + 9da6280 commit 2e4d3d332138f6bc67609e3a7b9ba9eeb7629c7d
@@ -1,5 +1,5 @@
REACT_ENV=development
REACT_APP_LOG_LEVEL=trace
REACT_APP_LOG_LEVEL=silent
REACT_APP_SERVER_URL=http://localhost:3003
REACT_APP_GUN_PUBLIC_URL=http://localhost:8765/gun
REACT_APP_INFURA_KEY=
@@ -43,7 +43,7 @@ const onRouteChange = (prevNav, nav, route) => {
fireEventFromNavigation(route)
}
const Router = () => {
userStorage.onlyForEToro()
userStorage.startSystemFeed()
return (
<GDStore.Container>
<SimpleStoreDialog />
@@ -15,6 +15,7 @@ import './components/appNavigation/blurFx.css'
import SimpleStore from './lib/undux/SimpleStore.js'
import { fireEventFromNavigation } from './lib/analytics/analytics'
import isWebApp from './lib/utils/isWebApp'
import { Support } from './components/webView/webViewInstances'

const initialRouteName = isMobileSafari && isWebApp ? 'IOSWebAppSignIn' : 'Auth'
const router = createSwitchNavigator(
@@ -23,6 +24,7 @@ const router = createSwitchNavigator(
Signup,
InvalidW3TokenError,
SigninInfo,
Support,
IOSWebAppSignIn,
},
{
@@ -8,6 +8,7 @@ import userStorage from '../../lib/gundb/UserStorage'
import RewardSvg from '../../components/common/view/RewardSvg'
import MarketPlaceSvg from '../../components/common/view/MarketPlaceSvg'
import config from '../../config/config'
import { withStyles } from '../../lib/styles'

type TabViewProps = {
routes: { [string]: any },
@@ -50,7 +51,7 @@ type TabViewProps = {
// )

const TabsView = (props: TabViewProps) => {
const { navigation } = props
const { navigation, styles } = props
const store = SimpleStore.useStore()

const goToRewards = () => {
@@ -70,7 +71,7 @@ const TabsView = (props: TabViewProps) => {
</TouchableOpacity>
<Appbar.Content />
{config.market && (
<TouchableOpacity onPress={goToMarketplace}>
<TouchableOpacity onPress={goToMarketplace} style={styles.marketIconBackground}>
<MarketPlaceSvg />
</TouchableOpacity>
)}
@@ -80,4 +81,16 @@ const TabsView = (props: TabViewProps) => {
)
}

export default TabsView
const styles = ({ theme }) => ({
marketIconBackground: {
backgroundColor: theme.colors.green,
borderWidth: 3,
borderStyle: 'solid',
borderColor: 'white',
borderRadius: '50%',
paddingVertical: 8,
paddingHorizontal: 4,
},
})

export default withStyles(styles)(TabsView)
@@ -150,7 +150,7 @@ class Auth extends React.Component<Props> {
return (
<Wrapper backgroundColor="#fff" style={styles.mainWrapper}>
<Text style={styles.headerText} fontSize={22} lineHeight={25} fontFamily="Roboto" fontWeight="medium">
{'Welcome to your\nfinancial future!'}
{'Welcome to\nGoodDollar Wallet'}
</Text>
<Image source={illustration} style={styles.illustration} resizeMode="contain" />
<Section style={styles.bottomContainer}>
@@ -221,8 +221,8 @@ exports[`Amount matches snapshot 1`] = `
}
}
>
Welcome to your
financial future!
Welcome to
GoodDollar Wallet
</div>
<div
className="css-view-1dbjc4n"
@@ -1,13 +1,14 @@
// @flow
import React, { useState } from 'react'
import { View } from 'react-native'
import { isMobile } from 'mobile-device-detect'
import CustomButton from '../buttons/CustomButton'
import ShareButton from '../buttons/ShareButton'
import logger from '../../../lib/logger/pino-logger'
import normalize from '../../../lib/utils/normalizeText'
import userStorage from '../../../lib/gundb/UserStorage'
import goodWallet from '../../../lib/wallet/GoodWallet'
import { generateSendShareObject, generateShareLink } from '../../../lib/share'
import { generateSendShareObject, generateSendShareText, generateShareLink } from '../../../lib/share'
import { useErrorDialog } from '../../../lib/undux/utils/dialog'
import { withStyles } from '../../../lib/styles'
import Text from '../view/Text'
@@ -59,8 +60,20 @@ const ModalActionsByFeedType = ({ theme, styles, item, handleModalClose, navigat
paymentCode: item.data.withdrawCode,
reason: item.data.message,
})

let result

if (isMobile && navigator.share) {
result = generateSendShareObject(url, item.data.amount, item.data.endpoint.fullName, currentUserName)
} else {
result = {
url: generateSendShareText(url, item.data.amount, item.data.endpoint.fullName, currentUserName),
}
}

fireEventAnalytics('Sharelink')
return generateSendShareObject(url, item.data.amount, item.data.endpoint.fullName, currentUserName)

return result
}

const readMore = () => {
@@ -81,8 +81,8 @@ const getStylesFromProps = ({ theme }) => ({
marginBottom: 15,
},
mainImage: {
height: getDesignRelativeHeight(110, false),
width: getDesignRelativeWidth(70, false),
height: getDesignRelativeHeight(110, true),
width: getDesignRelativeWidth(70, true),
},
mainPhotoContainer: {
display: 'flex',
@@ -5,7 +5,6 @@ import { getDesignRelativeWidth } from '../../../lib/utils/sizes'

import { withStyles } from '../../../lib/styles'

import Section from '../layout/Section'
import Avatar from './Avatar'

const AVATAR_DESIGN_WIDTH = 136
@@ -45,9 +44,6 @@ const UserAvatar = (props: AvatarProps) => {
<Avatar size={avatarSize} {...props} source={profile.avatar}>
{children}
</Avatar>
<Section.Title fontSize={22} textTransform="none" fontFamily="slab" style={styles.fullNameContainer}>
{profile.fullName}
</Section.Title>
</View>
</View>
)
@@ -163,26 +163,6 @@ exports[`UserAvatar matches snapshot 1`] = `
</div>
</div>
</div>
<div
className="css-text-901oao"
dir="auto"
style={
Object {
"color": "rgba(66,69,74,1.00)",
"direction": "ltr",
"fontFamily": "Roboto Slab",
"fontSize": "22px",
"fontWeight": "normal",
"lineHeight": "30px",
"marginTop": "8px",
"textAlign": "center",
"textDecoration": "none",
"textTransform": "none",
}
}
>
John Doe
</div>
</div>
</div>
</div>
@@ -1,7 +1,13 @@
// @flow
import React, { useMemo } from 'react'
import { isMobile } from 'mobile-device-detect'
import GDStore from '../../lib/undux/GDStore'
import { generateReceiveShareObject, generateSendShareObject } from '../../lib/share'
import {
generateReceiveShareObject,
generateReceiveShareText,
generateSendShareObject,
generateSendShareText,
} from '../../lib/share'
import BigGoodDollar from '../common/view/BigGoodDollar'
import QRCode from '../common/view/QRCode'
import Section from '../common/layout/Section'
@@ -25,13 +31,21 @@ const ReceiveConfirmation = ({ screenProps, styles, ...props }: ReceiveProps) =>
const { amount, code, reason, counterPartyDisplayName } = screenState
const { params } = props.navigation.state

const share = useMemo(
() =>
params.action === ACTION_RECEIVE
const share = useMemo(() => {
if (isMobile && navigator.share) {
return params.action === ACTION_RECEIVE
? generateReceiveShareObject(code, amount, counterPartyDisplayName, profile.fullName)
: generateSendShareObject(code, amount, counterPartyDisplayName, profile.fullName),
[code]
)
: generateSendShareObject(code, amount, counterPartyDisplayName, profile.fullName)
}

return params.action === ACTION_RECEIVE
? {
url: generateReceiveShareText(code, amount, counterPartyDisplayName, profile.fullName),
}
: {
url: generateSendShareText(code, amount, counterPartyDisplayName, profile.fullName),
}
}, [code])

return (
<Wrapper>
@@ -1771,11 +1771,11 @@ exports[`FeedModalItem - Send matches snapshot 1`] = `
Object {
"WebkitFlexBasis": "auto",
"flexBasis": "auto",
"height": "137.14285714285714px",
"height": "110px",
"msFlexPreferredSize": "auto",
"overflowX": "hidden",
"overflowY": "hidden",
"width": "199.11111111111111px",
"width": "70px",
"zIndex": 0,
}
}
@@ -2707,11 +2707,11 @@ exports[`FeedModalItem - Send with Error status matches snapshot 1`] = `
Object {
"WebkitFlexBasis": "auto",
"flexBasis": "auto",
"height": "137.14285714285714px",
"height": "110px",
"msFlexPreferredSize": "auto",
"overflowX": "hidden",
"overflowY": "hidden",
"width": "199.11111111111111px",
"width": "70px",
"zIndex": 0,
}
}
@@ -3644,11 +3644,11 @@ exports[`FeedModalItem - Withdraw matches snapshot 1`] = `
Object {
"WebkitFlexBasis": "auto",
"flexBasis": "auto",
"height": "137.14285714285714px",
"height": "110px",
"msFlexPreferredSize": "auto",
"overflowX": "hidden",
"overflowY": "hidden",
"width": "199.11111111111111px",
"width": "70px",
"zIndex": 0,
}
}
@@ -2,7 +2,7 @@
import React, { useEffect, useState } from 'react'
import { isMobile } from 'mobile-device-detect'
import GDStore from '../../lib/undux/GDStore'
import { generateSendShareObject } from '../../lib/share'
import { generateSendShareObject, generateSendShareText } from '../../lib/share'
import Config from '../../config/config'
import userStorage, { type TransactionEvent } from '../../lib/gundb/UserStorage'
import logger from '../../lib/logger/pino-logger'
@@ -54,13 +54,21 @@ const SendLinkSummary = ({ screenProps }: AmountProps) => {
e.message
}`,
dismissText: 'Ok',
onDismiss: () =>
screenProps.push('SendConfirmation', {
onDismiss: () => {
const desktopShareLink = generateSendShareText(
paymentLink,
amount,
counterPartyDisplayName,
profile.fullName
)

screenProps.push('SendConfirmation', {
paymentLink: desktopShareLink,
amount,
reason,
counterPartyDisplayName,
}),
})
},
})
}
}
@@ -85,9 +93,11 @@ const SendLinkSummary = ({ screenProps }: AmountProps) => {
if (isMobile && navigator.share) {
shareAction(paymentLink)
} else {
const desktopShareLink = generateSendShareText(paymentLink, amount, counterPartyDisplayName, profile.fullName)

// Show confirmation
screenProps.push('SendConfirmation', {
paymentLink,
paymentLink: desktopShareLink,
amount,
reason,
counterPartyDisplayName,
@@ -1,7 +1,7 @@
// @flow
import React from 'react'
import GDStore from '../../lib/undux/GDStore'
import { Section, UserAvatar, Wrapper } from '../common'
import { CustomButton, Section, UserAvatar, Wrapper } from '../common'
import { withStyles } from '../../lib/styles'
import { useWrappedUserStorage } from '../../lib/gundb/useWrappedStorage'
import { useErrorDialog } from '../../lib/undux/utils/dialog'
@@ -35,6 +35,10 @@ const ViewAvatar = props => {
props.screenProps.push('EditAvatar')
}

const goToProfile = () => {
props.screenProps.push('EditProfile')
}

return (
<Wrapper>
<Section style={styles.section}>
@@ -43,8 +47,8 @@ const ViewAvatar = props => {
<UserAvatar profile={profile} size={272} />
<CircleButtonWrapper
style={styles.closeButton}
iconName={'close'}
iconSize={20}
iconName={'trash'}
iconSize={22}
onPress={handleClosePress}
/>
<CameraButton style={styles.cameraButton} handleCameraPress={handleCameraPress} />
@@ -59,6 +63,9 @@ const ViewAvatar = props => {
</InputFile>
</>
)}
<CustomButton style={styles.doneButton} onPress={goToProfile}>
Done
</CustomButton>
</Section>
</Wrapper>
)
@@ -84,6 +91,9 @@ const getStylesFromProps = ({ theme }) => ({
position: 'absolute',
top: theme.sizes.defaultDouble,
},
doneButton: {
marginTop: 'auto',
},
})

export default withStyles(getStylesFromProps)(ViewAvatar)
@@ -723,24 +723,6 @@ exports[`Profile matches snapshot 1`] = `
</div>
</div>
</div>
<div
className="css-text-901oao"
dir="auto"
style={
Object {
"color": "rgba(66,69,74,1.00)",
"direction": "ltr",
"fontFamily": "Roboto Slab",
"fontSize": "22px",
"fontWeight": "normal",
"lineHeight": "30px",
"marginTop": "8px",
"textAlign": "center",
"textDecoration": "none",
"textTransform": "none",
}
}
/>
</div>
</div>
<div

0 comments on commit 2e4d3d3

Please sign in to comment.
You can’t perform that action at this time.