Skip to content

Commit

Permalink
fix pool transition
Browse files Browse the repository at this point in the history
  • Loading branch information
jorbuedo committed May 3, 2024
1 parent a7b0a67 commit c7ec5d1
Show file tree
Hide file tree
Showing 9 changed files with 80 additions and 91 deletions.
2 changes: 1 addition & 1 deletion apps/wallet-mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"@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.4-alpha.5",
"@emurgo/yoroi-lib": "0.15.4-alpha.6",
"@formatjs/intl-datetimeformat": "^6.7.0",
"@formatjs/intl-getcanonicallocales": "^2.1.0",
"@formatjs/intl-locale": "^3.2.1",
Expand Down
14 changes: 2 additions & 12 deletions apps/wallet-mobile/src/Staking/FailedTx/FailedTxScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,11 @@ export const FailedTxScreen = () => {

<Spacer height={22} />

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

<Space height="lg" />

<Button
onPress={navigateTo.main}
title={strings.goToMain}
style={styles.button}
textStyles={styles.outlineText}
outline
/>
<Button onPress={navigateTo.main} title={strings.goToMain} textStyles={styles.outlineText} outline />
</View>
)
}
Expand Down Expand Up @@ -88,10 +82,6 @@ const useStyles = () => {
textAlign: 'center',
maxWidth: 330,
},
button: {
...atoms.p_lg,
...atoms.button_2_md,
},
outlineText: {
color: color.primary_c500,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ const useStyles = () => {

const styles = StyleSheet.create({
modal: {
backgroundColor: color.web_overlay,
alignItems: 'center',
flex: 1,
justifyContent: 'flex-end',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {init} from '@emurgo/cross-csl-mobile'
import {PoolInfoApi} from '@emurgo/yoroi-lib'
import {useNavigation} from '@react-navigation/native'
import BigNumber from 'bignumber.js'
Expand Down Expand Up @@ -38,13 +39,13 @@ export const usePoolTransition = () => {
const poolTransitionQuery = useQuery({
enabled: isStaked,
retry: false,
staleTime: 20 * 1000,
staleTime: Infinity,
queryKey: [wallet.id, 'poolTransition', currentPoolId],
queryFn: () => (features.poolTransition ? poolInfoApi.getTransition(currentPoolId) : null),
queryFn: () => (features.poolTransition ? poolInfoApi.getTransition(currentPoolId, init) : null),
})

const poolTransition = poolTransitionQuery.data ?? null
const poolId = poolTransition?.suggested.id ?? ''
const poolId = poolTransition?.suggested.hash ?? ''

const navigateToUpdate = React.useCallback(async () => {
try {
Expand Down
2 changes: 1 addition & 1 deletion apps/wallet-mobile/src/components/Modal/ModalScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const useStyles = () => {
},
sheet: {
flex: 1,
backgroundColor: color.gray_c50,
backgroundColor: color.gray_cmin,
alignSelf: 'stretch',
paddingHorizontal: 16,
paddingBottom: 16,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ const useStyles = () => {
const styles = StyleSheet.create({
modal: {
flex: 1,
backgroundColor: color.gray_c200,
alignItems: 'center',
justifyContent: 'space-between',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,59 +4,59 @@
"defaultMessage": "!!!Not enough funds",
"file": "src/Staking/FailedTx/FailedTxScreen.tsx",
"start": {
"line": 114,
"line": 104,
"column": 18,
"index": 2650
"index": 2490
},
"end": {
"line": 117,
"line": 107,
"column": 3,
"index": 2766
"index": 2606
}
},
{
"id": "components.stakingcenter.failedDelegation.noFundsToProcess",
"defaultMessage": "!!!Your transaction cannot be processed due to lack of funds on your wallet balance",
"file": "src/Staking/FailedTx/FailedTxScreen.tsx",
"start": {
"line": 118,
"line": 108,
"column": 20,
"index": 2788
"index": 2628
},
"end": {
"line": 121,
"line": 111,
"column": 3,
"index": 2970
"index": 2810
}
},
{
"id": "components.stakingcenter.failedDelegation.buyAda",
"defaultMessage": "!!!Buy ada",
"file": "src/Staking/FailedTx/FailedTxScreen.tsx",
"start": {
"line": 122,
"line": 112,
"column": 10,
"index": 2982
"index": 2822
},
"end": {
"line": 125,
"line": 115,
"column": 3,
"index": 3081
"index": 2921
}
},
{
"id": "components.stakingcenter.failedDelegation.goToMain",
"defaultMessage": "!!!Go to main wallet page",
"file": "src/Staking/FailedTx/FailedTxScreen.tsx",
"start": {
"line": 126,
"line": 116,
"column": 12,
"index": 3095
"index": 2935
},
"end": {
"line": 129,
"line": 119,
"column": 3,
"index": 3211
"index": 3051
}
}
]

0 comments on commit c7ec5d1

Please sign in to comment.