Skip to content

Commit

Permalink
release(wallet-mobile): v4.27.1 (#3291)
Browse files Browse the repository at this point in the history
  • Loading branch information
stackchain committed Jun 17, 2024
2 parents bcbf882 + f222ded commit c2111c6
Show file tree
Hide file tree
Showing 49 changed files with 1,626 additions and 220 deletions.
2 changes: 2 additions & 0 deletions apps/wallet-mobile/.storybook/storybook.requires.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apps/wallet-mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ android {
applicationId "com.emurgo"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 682
versionCode 688
versionName "4.27.0"
testBuildType System.getProperty('testBuildType', 'debug')
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
Expand Down
4 changes: 2 additions & 2 deletions apps/wallet-mobile/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ PODS:
- react-native-config/App (= 1.5.1)
- react-native-config/App (1.5.1):
- React-Core
- react-native-haskell-shelley (6.0.0-alpha.4):
- react-native-haskell-shelley (6.0.0-alpha.9):
- React
- react-native-mmkv (2.11.0):
- MMKV (>= 1.2.13)
Expand Down Expand Up @@ -816,7 +816,7 @@ SPEC CHECKSUMS:
react-native-background-timer: 17ea5e06803401a379ebf1f20505b793ac44d0fe
react-native-ble-plx: f10240444452dfb2d2a13a0e4f58d7783e92d76e
react-native-config: 86038147314e2e6d10ea9972022aa171e6b1d4d8
react-native-haskell-shelley: 46f5fa9068996637c969e9526c22bd3867c27810
react-native-haskell-shelley: 4015aef14eca3ecf5e8d8718e8d1b47cdcf60f84
react-native-mmkv: e97c0c79403fb94577e5d902ab1ebd42b0715b43
react-native-pager-view: 0ccb8bf60e2ebd38b1f3669fa3650ecce81db2df
react-native-quick-base64: 62290829c619fbabca4c41cfec75ae759d08fc1c
Expand Down
2 changes: 1 addition & 1 deletion apps/wallet-mobile/ios/nightly.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>569</string>
<string>575</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationCategoryType</key>
Expand Down
8 changes: 4 additions & 4 deletions apps/wallet-mobile/ios/yoroi.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@
CODE_SIGN_ENTITLEMENTS = yoroi/yoroi.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 569;
CURRENT_PROJECT_VERSION = 575;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = F8NVT2G2L4;
ENABLE_BITCODE = NO;
Expand Down Expand Up @@ -884,7 +884,7 @@
CODE_SIGN_ENTITLEMENTS = yoroi/yoroi.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 569;
CURRENT_PROJECT_VERSION = 575;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = F8NVT2G2L4;
ENVFILE = "$(PODS_ROOT)/../../.env.production";
Expand Down Expand Up @@ -1079,7 +1079,7 @@
CODE_SIGN_ENTITLEMENTS = nightly.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 569;
CURRENT_PROJECT_VERSION = 575;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = F8NVT2G2L4;
ENABLE_BITCODE = NO;
Expand Down Expand Up @@ -1124,7 +1124,7 @@
CODE_SIGN_ENTITLEMENTS = nightly.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 569;
CURRENT_PROJECT_VERSION = 575;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = F8NVT2G2L4;
ENVFILE = "$(PODS_ROOT)/../../.env.nightly";
Expand Down
2 changes: 1 addition & 1 deletion apps/wallet-mobile/ios/yoroi/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>569</string>
<string>575</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationCategoryType</key>
Expand Down
2 changes: 1 addition & 1 deletion apps/wallet-mobile/ios/yoroiTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>569</string>
<string>575</string>
</dict>
</plist>
18 changes: 9 additions & 9 deletions apps/wallet-mobile/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@yoroi/wallet-mobile",
"version": "4.27.0",
"version": "4.27.1",
"private": true,
"scripts": {
"android-bundle": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res",
Expand Down Expand Up @@ -90,16 +90,16 @@
]
},
"dependencies": {
"@amplitude/analytics-react-native": "^1.3.1",
"@amplitude/analytics-react-native": "1.3.1",
"@cardano-foundation/ledgerjs-hw-app-cardano": "^6.0.0",
"@emurgo/cip14-js": "^3.0.1",
"@emurgo/cip4-js": "1.0.7",
"@emurgo/cross-csl-core": "^4.2.0",
"@emurgo/cross-csl-mobile": "^4.2.0",
"@emurgo/csl-mobile-bridge": "6.0.0-alpha.4",
"@emurgo/cross-csl-core": "4.4.0",
"@emurgo/cross-csl-mobile": "4.4.0",
"@emurgo/csl-mobile-bridge": "6.0.0-alpha.9",
"@emurgo/react-native-blockies-svg": "^0.0.2",
"@emurgo/react-native-hid": "^5.15.6",
"@emurgo/yoroi-lib": "0.15.1",
"@emurgo/yoroi-lib": "0.15.5",
"@formatjs/intl-datetimeformat": "^6.7.0",
"@formatjs/intl-getcanonicallocales": "^2.1.0",
"@formatjs/intl-locale": "^3.2.1",
Expand Down Expand Up @@ -127,11 +127,11 @@
"@yoroi/exchange": "2.0.1",
"@yoroi/links": "1.5.4",
"@yoroi/resolver": "2.0.5",
"@yoroi/setup-wallet": "1.0.0",
"@yoroi/staking": "1.5.1",
"@yoroi/swap": "1.5.2",
"@yoroi/theme": "^1.0.0",
"@yoroi/transfer": "1.0.0",
"@yoroi/setup-wallet": "1.0.0",
"add": "2.0.6",
"assert": "^2.0.0",
"axios": "^1.5.0",
Expand Down Expand Up @@ -213,8 +213,8 @@
"@babel/preset-env": "^7.20.0",
"@babel/preset-react": "^7.16.7",
"@babel/runtime": "^7.20.0",
"@emurgo/cardano-serialization-lib-nodejs": "^9.1.4",
"@emurgo/cross-csl-nodejs": "^4.2.0",
"@emurgo/cardano-serialization-lib-nodejs": "12.0.0-alpha.28",
"@emurgo/cross-csl-nodejs": "4.4.0",
"@formatjs/cli": "^6.1.0",
"@formatjs/ts-transformer": "^3.13.0",
"@react-navigation/devtools": "^6.0.13",
Expand Down
98 changes: 61 additions & 37 deletions apps/wallet-mobile/src/Dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import {useNavigation} from '@react-navigation/native'
import {useTheme} from '@yoroi/theme'
import BigNumber from 'bignumber.js'
import React from 'react'
import {defineMessages, useIntl} from 'react-intl'
Expand All @@ -16,6 +17,8 @@ import {useSelectedWallet} from '../features/WalletManager/Context/SelectedWalle
import globalMessages from '../i18n/global-messages'
import {Modal} from '../legacy/Modal'
import {useWalletNavigation} from '../navigation'
import {PoolTransitionNotice} from '../Staking/PoolTransition/PoolTransitionNotice'
import {usePoolTransition} from '../Staking/PoolTransition/usePoolTransition'
import {isEmptyString} from '../utils/utils'
import {getCardanoNetworkConfigById} from '../yoroi-wallets/cardano/networks'
import {getCardanoBaseConfig} from '../yoroi-wallets/cardano/utils'
Expand All @@ -34,9 +37,11 @@ import {UserSummary} from './UserSummary'
import {WithdrawStakingRewards} from './WithdrawStakingRewards'

export const Dashboard = () => {
const {styles} = useStyles()
const intl = useIntl()
const navigateTo = useNavigateTo()
const governanceStrings = useGovernanceStrings()
const {isPoolRetiring} = usePoolTransition()

const wallet = useSelectedWallet()
const {isLoading: isSyncing, sync} = useSync(wallet)
Expand Down Expand Up @@ -90,6 +95,12 @@ export const Dashboard = () => {
>
{stakingInfo?.status !== 'staked' && <NotDelegatedInfo />}

{isPoolRetiring && (
<Row>
<PoolTransitionNotice />
</Row>
)}

<Row>
<EpochInfo />
</Row>
Expand Down Expand Up @@ -169,8 +180,6 @@ const useNavigateTo = () => {
}
}

const Row = ({style, ...props}: ViewProps) => <View {...props} style={[style, styles.row]} />

const SyncErrorBanner = ({showRefresh}: {showRefresh: boolean}) => {
const intl = useIntl()

Expand Down Expand Up @@ -239,45 +248,60 @@ const EpochInfo = () => {
)
}

const Actions = (props: ViewProps) => <View {...props} style={styles.actions} />

const messages = defineMessages({
stakingCenterButton: {
id: 'components.delegation.delegationnavigationbuttons.stakingCenterButton',
defaultMessage: '!!!Go to Staking Center',
},
})

const styles = StyleSheet.create({
root: {
flex: 1,
},
container: {
flexDirection: 'column',
flex: 1,
},
scrollView: {
flex: 1,
backgroundColor: '#fff',
},
contentContainer: {
paddingTop: 16,
paddingHorizontal: 16,
},
row: {
flex: 1,
paddingVertical: 12,
},
actions: {
flexDirection: 'row',
backgroundColor: '#fff',
padding: 16,
borderTopLeftRadius: 8,
borderTopRightRadius: 8,
elevation: 1,
shadowOpacity: 0.06,
shadowColor: 'black',
shadowRadius: 6,
shadowOffset: {width: 0, height: -8},
},
})
const useStyles = () => {
const {theme} = useTheme()
const {color} = theme

const styles = StyleSheet.create({
root: {
flex: 1,
},
container: {
flexDirection: 'column',
flex: 1,
},
scrollView: {
flex: 1,
backgroundColor: color.gray.min,
},
contentContainer: {
paddingTop: 16,
paddingHorizontal: 16,
},
row: {
flex: 1,
paddingVertical: 12,
},
actions: {
flexDirection: 'row',
backgroundColor: color.gray.min,
padding: 16,
borderTopLeftRadius: 8,
borderTopRightRadius: 8,
elevation: 1,
shadowOpacity: 0.06,
shadowColor: color['black-static'],
shadowRadius: 6,
shadowOffset: {width: 0, height: -8},
},
})

return {styles}
}

const Actions = (props: ViewProps) => {
const {styles} = useStyles()
return <View {...props} style={styles.actions} />
}

const Row = (props: ViewProps) => {
const {styles} = useStyles()
return <View {...props} style={styles.row} />
}
4 changes: 3 additions & 1 deletion apps/wallet-mobile/src/Dashboard/DashboardNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {SettingsButton} from '../components/Button'
import {useGovernanceManagerMaker} from '../features/Staking/Governance'
import {useSelectedWallet} from '../features/WalletManager/Context/SelectedWalletContext'
import {DashboardRoutes, defaultStackNavigationOptions, useWalletNavigation} from '../navigation'
import {DelegationConfirmation} from '../Staking'
import {DelegationConfirmation, FailedTxScreen} from '../Staking'
import {StakingCenter} from '../Staking/StakingCenter'
import {useWalletName} from '../yoroi-wallets/hooks'
import {Dashboard} from './Dashboard'
Expand Down Expand Up @@ -46,6 +46,8 @@ export const DashboardNavigator = () => {
component={DelegationConfirmation}
options={{title: strings.title}}
/>

<Stack.Screen name="delegation-failed-tx" component={FailedTxScreen} options={{title: strings.title}} />
</Stack.Navigator>
</GovernanceProvider>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {Balance} from '@yoroi/types'
import React, {useEffect, useState} from 'react'
import {defineMessages, useIntl} from 'react-intl'
import {Platform, ScrollView, StyleSheet, View, ViewProps} from 'react-native'
import {useQueryClient} from 'react-query'

import {KeyboardSpacer, Text, ValidatedTextInput} from '../../components'
import {ConfirmTx} from '../../components/ConfirmTx'
Expand Down Expand Up @@ -35,6 +36,7 @@ export const DelegationConfirmation = () => {
const wallet = useSelectedWallet()
const strings = useStrings()
const styles = useStyles()
const queryClient = useQueryClient()

const {poolId, yoroiUnsignedTx} = useParams<Params>(isParams)

Expand All @@ -50,6 +52,7 @@ export const DelegationConfirmation = () => {
}, [])

const onSuccess = () => {
queryClient.resetQueries([wallet.id, 'stakingInfo'])
resetToTxHistory()
}

Expand Down
47 changes: 47 additions & 0 deletions apps/wallet-mobile/src/Staking/FailedTx/FailedTxImage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import * as React from 'react'
import Svg, {Defs, LinearGradient, Path, Stop, SvgProps} from 'react-native-svg'

export const FailedTxImage = (props: SvgProps) => {
return (
<Svg width={201} height={200} viewBox="0 0 201 200" fill="none" {...props}>
<Path
d="M48.477 17.513l-7.55 4.102 5.251 7.501-.249 68.963c-.031 8.886 5.61 19.231 12.623 23.104l46.822 25.889c.219 1.907.504 3.988.867 6.256a32.813 32.813 0 002.081 7.316l-2.19-1.644 2.089 8.886 9.506 15.758 7.862-4.443a2.16 2.16 0 00.483-.266c.838-.575 1.086-1.657.577-2.511a30.503 30.503 0 01-2.72-6.805c-.91-3.13 1.004-7.765 2.599-10.849l17.05 9.427 6.787 9.694 8.641-4.295c3.148-1.207 5.237-4.762 5.237-10.093l.257-71.533c.031-8.886-5.61-19.23-12.623-23.104L58.918 17.468c-2.626-1.459-5.072-1.792-7.106-1.17a20.427 20.427 0 00-3.335 1.215z"
fill="url(#paint0_linear_20568_11560)"
/>

<Path
opacity={0.8}
d="M36.757 31.198c0-8.886 5.735-12.96 12.732-9.086l92.959 51.405c7.013 3.873 12.654 14.218 12.623 23.104l-.257 71.525c0 8.886-5.735 12.959-12.732 9.086l-28.714-15.876a23.321 23.321 0 001.605 13.292 80.522 80.522 0 003.398 6.435c.449.79.281 1.769-.409 2.383a2.165 2.165 0 01-2.529.231c-6.701-4.147-16.036-12.152-18.148-25.318a133.949 133.949 0 01-.88-6.405l-47.282-26.148c-7.013-3.872-12.654-14.217-12.623-23.103l.257-71.525z"
fill="#52FCFF"
/>

<Path
d="M54.364 77.083c-.317.137-.478.433-.478.889s.161.934.478 1.436c.315.5.714.897 1.19 1.193.477.295.891.4 1.24.311l6.242-2.1 6.242 9.84c.35.52.748.917 1.192 1.193.444.276.841.369 1.19.282.352-.087.526-.359.526-.814 0-.456-.174-.96-.526-1.509l-6.194-9.81 6.194-2.13c.352-.118.526-.406.526-.86 0-.455-.174-.944-.526-1.464-.349-.52-.746-.918-1.19-1.194-.444-.276-.843-.37-1.192-.284l-6.242 2.101-6.242-9.838a4.115 4.115 0 00-1.24-1.225c-.476-.294-.875-.39-1.19-.281-.317.105-.478.387-.478.843 0 .456.161.949.478 1.482l6.242 9.838-6.242 2.1zM109.146 109.906c-.317.137-.476.433-.476.891 0 .454.159.932.476 1.434.317.499.716.899 1.192 1.193.475.297.889.4 1.238.313l6.242-2.101 6.244 9.839c.349.52.746.917 1.192 1.193.444.276.839.371 1.188.284.351-.087.526-.359.526-.814 0-.456-.175-.96-.526-1.511l-6.194-9.809 6.194-2.13c.351-.119.526-.404.526-.86 0-.456-.175-.943-.526-1.463-.349-.52-.744-.92-1.188-1.196-.446-.275-.843-.369-1.192-.282l-6.244 2.101-6.242-9.84a4.116 4.116 0 00-1.238-1.222c-.476-.297-.875-.39-1.192-.282-.317.105-.476.387-.476.843 0 .456.159.95.476 1.48l6.244 9.838-6.244 2.101zM88.083 124.986c3.767 2.226 6.821 1.102 6.821-2.511 0-3.612-3.054-8.346-6.82-10.572-3.768-2.226-6.822-1.102-6.822 2.511 0 3.613 3.054 8.346 6.821 10.572z"
fill="#FF1351"
/>

<Defs>
<LinearGradient
id="paint0_linear_20568_11560"
x1={40.9268}
y1={183.645}
x2={164.5}
y2={183.645}
gradientUnits="userSpaceOnUse"
>
<Stop stopColor="#17D1AA" />

<Stop offset={0.15} stopColor="#1ACBAF" />

<Stop offset={0.37} stopColor="#21B8BC" />

<Stop offset={0.62} stopColor="#2E9BD3" />

<Stop offset={0.89} stopColor="#3F71F1" />

<Stop offset={1} stopColor="#475FFF" />
</LinearGradient>
</Defs>
</Svg>
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import {storiesOf} from '@storybook/react-native'
import React from 'react'

import {FailedTxScreen} from './FailedTxScreen'

storiesOf('Staking/Failed Tx Screen', module).add('initial', () => {
return <FailedTxScreen />
})
Loading

0 comments on commit c2111c6

Please sign in to comment.