Skip to content

Commit

Permalink
merge: production v4.27.1
Browse files Browse the repository at this point in the history
  • Loading branch information
stackchain committed Jun 17, 2024
2 parents 6910ba4 + c2111c6 commit ae03168
Show file tree
Hide file tree
Showing 20 changed files with 1,064 additions and 22 deletions.
3 changes: 3 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
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>
4 changes: 2 additions & 2 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 @@ -101,7 +101,7 @@
"@emurgo/msl-mobile-bridge": "^1.0.4",
"@emurgo/react-native-blockies-svg": "^0.0.2",
"@emurgo/react-native-hid": "^5.15.6",
"@emurgo/yoroi-lib": "0.15.5-alpha.7",
"@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
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 />
})
121 changes: 121 additions & 0 deletions apps/wallet-mobile/src/Staking/FailedTx/FailedTxScreen.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
import {useNavigation} from '@react-navigation/native'
import {useTheme} from '@yoroi/theme'
import React from 'react'
import {defineMessages, useIntl} from 'react-intl'
import {StyleSheet, View} from 'react-native'

import {Button, Spacer, Text} from '../../components'
import {Space} from '../../components/Space/Space'
import {FailedTxImage} from './FailedTxImage'

export const FailedTxScreen = () => {
const strings = useStrings()
const styles = useStyles()
const navigateTo = useNavigateTo()

return (
<View style={styles.container}>
<FailedTxImage />

<Space height="l" />

<Text style={styles.title}>{strings.notEnoughFunds}</Text>

<Text style={styles.text}>{strings.noFundsToProcess}</Text>

<Spacer height={22} />

<Button onPress={navigateTo.buyAda} title={strings.buyAda} shelleyTheme />

<Space height="l" />

<Button onPress={navigateTo.main} title={strings.goToMain} textStyles={styles.outlineText} outline />
</View>
)
}

const useNavigateTo = () => {
const navigation = useNavigation()

return {
buyAda: () =>
navigation.navigate('manage-wallets', {
screen: 'main-wallet-routes',
params: {
screen: 'history',
params: {
screen: 'exchange-create-order',
},
},
}),
main: () =>
navigation.navigate('manage-wallets', {
screen: 'main-wallet-routes',
params: {
screen: 'history',
params: {
screen: 'history-list',
},
},
}),
}
}

const useStyles = () => {
const {theme} = useTheme()
const {color, typography, padding} = theme
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
...padding['l'],
},
title: {
color: color.gray.max,
...typography['heading-3-medium'],
...padding['x-s'],
textAlign: 'center',
},
text: {
color: color.gray[600],
...typography['body-2-m-regular'],
textAlign: 'center',
maxWidth: 330,
},
outlineText: {
color: theme.color.primary[500],
},
})
return styles
}

const useStrings = () => {
const intl = useIntl()

return {
notEnoughFunds: intl.formatMessage(messages.notEnoughFunds),
noFundsToProcess: intl.formatMessage(messages.noFundsToProcess),
buyAda: intl.formatMessage(messages.buyAda),
goToMain: intl.formatMessage(messages.goToMain),
}
}

const messages = defineMessages({
notEnoughFunds: {
id: 'components.stakingcenter.failedDelegation.notEnoughFunds',
defaultMessage: '!!!Not enough funds',
},
noFundsToProcess: {
id: 'components.stakingcenter.failedDelegation.noFundsToProcess',
defaultMessage: '!!!Your transaction cannot be processed due to lack of funds on your wallet balance',
},
buyAda: {
id: 'components.stakingcenter.failedDelegation.buyAda',
defaultMessage: '!!!Buy ada',
},
goToMain: {
id: 'components.stakingcenter.failedDelegation.goToMain',
defaultMessage: '!!!Go to main wallet page',
},
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import {PoolTransition} from '@emurgo/yoroi-lib'
import {action} from '@storybook/addon-actions'
import {storiesOf} from '@storybook/react-native'
import * as React from 'react'
import {View} from 'react-native'

import {PoolTransitionModal} from './PoolTransitionModal'

const mock: PoolTransition = {
current: {
id: '',
hash: '',
saturation: '',
taxFix: '',
stake: '',
share: '',
pic: 'https://img.cexplorer.io/a/5/5/f/2/pool12eht6dqxpzqj87xuextrpufz2gxmt4reuesuw26r2utzw0kw906.png',
ticker: 'EMRG',
name: 'emurgo old',
roa: '0',
taxRatio: '0.05',
},
suggested: {
hash: '',
saturation: '',
taxFix: '',
stake: '',
share: '',
pic: 'https://img.cexplorer.io/e/c/2/3/1/pool1dkww2vlysa8lsnuf5rca979zdsyr3zvt59hu7e420yxfunkka2z.png',
id: 'df1750df9b2df285fcfb50f4740657a18ee3af42727d410c37b86207',
name: 'emurgo new',
roa: '5.1',
ticker: 'EMRG',
taxRatio: '0.02',
},
deadlineMilliseconds: Date.now() + 2999777000,
}

storiesOf('PoolTransitionModal', module)
.add('Future deadline', () => (
<View style={{flex: 1, justifyContent: 'flex-end'}}>
<View style={{height: 600, padding: 8}}>
<PoolTransitionModal onContinue={action('Navigate')} poolTransition={mock} />
</View>
</View>
))
.add('Past deadline', () => (
<View style={{flex: 1, justifyContent: 'flex-end'}}>
<View style={{height: 600, padding: 8}}>
<PoolTransitionModal onContinue={action('Navigate')} poolTransition={{...mock, deadlineMilliseconds: 0}} />
</View>
</View>
))
Loading

0 comments on commit ae03168

Please sign in to comment.