Skip to content

Commit e0cc4ac

Browse files
committed
Merge branch v1.50.7
2 parents 15d927e + d3a4905 commit e0cc4ac

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+763
-447
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,4 @@ buck-out/
5959

6060
# Bundle artifact
6161
*.jsbundle
62+

android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ android {
133133
minSdkVersion rootProject.ext.minSdkVersion
134134
targetSdkVersion rootProject.ext.targetSdkVersion
135135
versionCode 1
136-
versionName "1.50.5"
136+
versionName "1.50.7"
137137

138138
missingDimensionStrategy 'react-native-camera', 'general'
139139
multiDexEnabled true
412 Bytes
Binary file not shown.

app/appstores/Actions/App/App.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import walletDS from '@app/appstores/DataSource/Wallet/Wallet'
1010

1111
import NavStore from '@app/components/navigation/NavStore'
1212

13-
import { setFilter, setSelectedWallet, setSortValue, setStakingCoins } from '@app/appstores/Stores/Main/MainStoreActions'
13+
import { setFilter, setSelectedWallet, setSortValue, setStakingCoins, setHomeFilterWithBalance } from '@app/appstores/Stores/Main/MainStoreActions'
1414
import { setInitState, setInitError } from '@app/appstores/Stores/Init/InitStoreActions'
1515
import walletActions from '@app/appstores/Stores/Wallet/WalletActions'
1616
import currencyActions from '@app/appstores/Stores/Currency/CurrencyActions'
@@ -178,6 +178,8 @@ class App {
178178

179179
await setSortValue(trusteeAsyncStorage.getSortValue() || null)
180180

181+
await setHomeFilterWithBalance(trusteeAsyncStorage.getHomeFilterWithBalance() || false)
182+
181183
await this.setAccountFilterData()
182184

183185
// first step of init

app/appstores/Actions/TransactionActions.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ const transactionActions = {
147147
if (typeof transaction.wayType === 'undefined' || !transaction.wayType) {
148148
transaction.wayType = transaction.transactionDirection
149149
}
150-
if (transaction?.bseOrderData) {
151-
transaction.wayType = TransactionFilterTypeDict.SWAP
152-
}
150+
// if (transaction?.bseOrderData) {
151+
// transaction.wayType = TransactionFilterTypeDict.SWAP
152+
// }
153153
if (transaction?.addressAmount === 0 || transaction?.transactionFilterType === TransactionFilterTypeDict.FEE) {
154154
transaction.addressAmountPrettyPrefix = '-'
155155
transaction.wayType = TransactionFilterTypeDict.FEE
@@ -260,7 +260,7 @@ const transactionActions = {
260260

261261
try {
262262
transaction.addressAmountNorm = BlocksoftPrettyNumbers.setCurrencyCode(account.currencyCode).makePretty(transaction.addressAmount, 'transactionActions.addressAmount')
263-
const res = BlocksoftPrettyNumbers.makeCut(transaction.addressAmountNorm)
263+
const res = BlocksoftPrettyNumbers.makeCut(transaction.addressAmountNorm, account.currencyCode === 'BTC' ? 8 : 5) // @todo settings for better
264264
if (res.isSatoshi) {
265265
addressAmountSatoshi = '...' + transaction.addressAmount
266266
transaction.addressAmountPretty = res.cutted

app/appstores/Stores/Currency/selectors.js

Lines changed: 36 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,50 @@ const hiddenAssets = ['ETH_ONE']
77
export const getVisibleCurrencies = createSelector(
88
[state => state.currencyStore.cryptoCurrencies],
99
(currencies => {
10-
let { walletNumber } = store.getState().mainStore.selectedWallet
11-
if (typeof walletNumber === 'undefined' || !walletNumber) {
12-
walletNumber = 1
13-
} else {
14-
walletNumber = walletNumber * 1
15-
}
10+
try {
11+
let { walletNumber } = store.getState().mainStore.selectedWallet
12+
if (typeof walletNumber === 'undefined' || !walletNumber) {
13+
walletNumber = 1
14+
} else {
15+
walletNumber = walletNumber * 1
16+
}
1617

17-
Log.log('ACT/Currency getVisibleCurrencies selectedWallet walletNumber ' + walletNumber)
18+
Log.log('ACT/Currency getVisibleCurrencies selectedWallet walletNumber ' + walletNumber + ' started')
1819

19-
const tmp = currencies.filter(c => {
20-
if (c.isHidden === null) {
21-
c.maskedHidden = true
22-
} else {
23-
const mask = Number(c.isHidden || 0).toString(2).split('').reverse() // split to binary
24-
if (typeof mask[walletNumber] === 'undefined') {
25-
c.maskedHidden = mask.length === 1 ? (mask[mask.length - 1] === '1') : false
20+
const tmp = currencies.filter(c => {
21+
if (c.isHidden === null) {
22+
c.maskedHidden = true
2623
} else {
27-
c.maskedHidden = mask[walletNumber] === '1'
24+
const mask = Number(c.isHidden || 0).toString(2).split('').reverse() // split to binary
25+
if (typeof mask[walletNumber] === 'undefined') {
26+
c.maskedHidden = mask.length === 1 ? (mask[mask.length - 1] === '1') : false
27+
} else {
28+
c.maskedHidden = mask[walletNumber] === '1'
29+
}
2830
}
31+
return !c.maskedHidden
32+
})
33+
if (!tmp) {
34+
return []
2935
}
30-
return !c.maskedHidden
31-
})
32-
return [...tmp]
36+
37+
Log.log('ACT/Currency getVisibleCurrencies selectedWallet walletNumber ' + walletNumber + ' finished')
38+
return [...tmp]
39+
} catch (e) {
40+
Log.err('ACT/Currency getVisibleCurrencies error ' + e.message)
41+
return []
42+
}
3343
})
3444
)
3545

3646
export const getVisibleAssets = createSelector(
3747
[state => state.currencyStore.cryptoCurrencies],
38-
(data => data.filter(item => !hiddenAssets.includes(item.currencyCode)))
48+
(data => {
49+
try {
50+
return data.filter(item => !hiddenAssets.includes(item.currencyCode))
51+
} catch (e) {
52+
Log.err('ACT/Currency getVisibleAssets error ' + e.message)
53+
return []
54+
}
55+
})
3956
)

app/components/AppLockBlur.js

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author yura
44
*/
55
import React from 'react'
6-
import { StyleSheet } from 'react-native'
6+
import { StyleSheet, Platform } from 'react-native'
77
import { BlurView } from "@react-native-community/blur"
88
import { connect } from 'react-redux'
99

@@ -19,9 +19,9 @@ class AppLockBlur extends React.PureComponent {
1919

2020
return (
2121
<>
22-
{this.props.isBlurVisible ? (
22+
{(this.props.isBlurVisible && Platform.OS === 'ios') ? (
2323
<BlurView
24-
style={styles.wrapper}
24+
style={StyleSheet.absoluteFill}
2525
blurType={blurColor}
2626
blurAmount={10}
2727
reducedTransparencyFallbackColor='white'
@@ -38,14 +38,4 @@ const mapStateToProps = (state) => {
3838
}
3939
}
4040

41-
export default connect(mapStateToProps)(AppLockBlur)
42-
43-
const styles = StyleSheet.create({
44-
wrapper: {
45-
position: 'absolute',
46-
top: 0,
47-
left: 0,
48-
right: 0,
49-
bottom: 0
50-
}
51-
})
41+
export default connect(mapStateToProps)(AppLockBlur)

app/components/elements/CurrencyIcon.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ export default class CurrencyIcon extends PureComponent {
3535
return 'ETH_VLX'
3636
} else if (currencyCode.indexOf('ONE_') !== -1) {
3737
return 'ETH_ONE'
38+
} else if (currencyCode.indexOf('WAVES_') !== -1) {
39+
return 'WAVES'
40+
} else if (currencyCode.indexOf('ASH_') !== -1) {
41+
return require('@assets/images/currency/ASH.png')
3842
}
3943
}
4044

@@ -58,6 +62,10 @@ export default class CurrencyIcon extends PureComponent {
5862
return 'ETH_VLX'
5963
case 'ONE':
6064
return 'ETH_ONE'
65+
case 'WAVES':
66+
return 'WAVES'
67+
case 'ASH':
68+
return 'ASH'
6169
default:
6270
return null
6371
}
@@ -337,6 +345,7 @@ export default class CurrencyIcon extends PureComponent {
337345
case 'TRX_WBTT':
338346
case 'BNB_SMART_BTT':
339347
case 'ETH_BTT':
348+
case 'ETH_BTT_NEW':
340349
return (
341350
<View style={{ ...styles.icon, borderColor: colorDict[currencyCode].colors[isLight ? 'mainColor' : 'darkColor'], ...tmpContainerStyle }}>
342351
<View style={styles.icon__item}>
@@ -533,6 +542,7 @@ export default class CurrencyIcon extends PureComponent {
533542
case 'SOL_USDT':
534543
case 'MATIC_USDT':
535544
case 'VLX_USDT':
545+
case 'WAVES_USDT':
536546
return (
537547
<View style={{ ...styles.icon, borderColor: colorDict[currencyCode].colors[isLight ? 'mainColor' : 'darkColor'], ...tmpContainerStyle }}>
538548
<View style={styles.icon__item}>
@@ -563,6 +573,7 @@ export default class CurrencyIcon extends PureComponent {
563573
case 'SOL_USDC':
564574
case 'MATIC_USDC':
565575
case 'FTM_USDC':
576+
case 'WAVES_USDC':
566577
return (
567578
<View style={{ ...styles.icon, borderColor: colorDict['ETH_USDC'].colors[isLight ? 'mainColor' : 'darkColor'], ...tmpContainerStyle }}>
568579
<View style={styles.icon__item}>
@@ -869,6 +880,30 @@ export default class CurrencyIcon extends PureComponent {
869880
</View>
870881
)
871882

883+
case 'WAVES_USDN':
884+
return (
885+
<View style={{ ...styles.icon, borderColor: colorDict[currencyCode].colors[isLight ? 'mainColor' : 'darkColor'], ...tmpContainerStyle }}>
886+
<View style={styles.icon__item}>
887+
<CustomIcon name='WAVES_USDN' style={{ color: colorDict[currencyCode].colors[isLight ? 'mainColor' : 'darkColor'], fontSize: fontSize }} />
888+
<View style={{ ...styles.icon__mark, backgroundColor: colors.common.iconMarkBg, ...tmpMarkStyle }}>
889+
<CustomIcon name={block} style={{ color: colorDict[block].colors[isLight ? 'mainColor' : 'darkColor'] }} size={14} />
890+
</View>
891+
</View>
892+
</View>
893+
)
894+
895+
case 'ASH_CRYPTEX':
896+
case 'ASH_SKRYPIN':
897+
return (
898+
<View style={{ ...styles.icon, borderColor: colorDict[currencyCode].colors[isLight ? 'mainColor' : 'darkColor'], ...tmpContainerStyle }}>
899+
<View style={styles.icon__item}>
900+
<CustomIcon name={currencyCode} style={{ color: colorDict[currencyCode].colors[isLight ? 'mainColor' : 'darkColor'], fontSize: fontSize }} />
901+
<View style={{ ...styles.icon__mark, backgroundColor: colors.common.iconMarkBg, ...tmpMarkStyle }}>
902+
<Image resize='stretch' source={block} style={{ width: 14, height: 14, marginBottom: 2, marginRight: 1 }} />
903+
</View>
904+
</View>
905+
</View>
906+
)
872907

873908
case 'CUSTOM_ABYSS':
874909
case 'CUSTOM_SOLVE':

app/modules/Account/AccountReceive/AccountReceiveScreen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ class AccountReceiveScreen extends React.PureComponent {
519519
<View>
520520
<InvoiceListItem
521521
title={strings('account.invoiceText')}
522-
onPress={() => handleShareInvoice(getAddress.call(this), currencyCode, currencyName)}
522+
onPress={() => handleShareInvoice(getAddress.call(this), currencyCode, currencyName, this.context.isLight)}
523523
containerStyle={{ marginHorizontal: GRID_SIZE, borderRadius: 12, backgroundColor: colors.backDropModal.mainButton, marginBottom: GRID_SIZE }}
524524
textColor='#F7F7F7'
525525
iconType='invoice'

app/modules/Account/AccountReceive/elements/HdAddressListItem.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ class HdAddressListItem extends React.PureComponent {
7373

7474
const {
7575
GRID_SIZE,
76-
colors
76+
colors,
77+
isLight
7778
} = this.context
7879

7980
const { currencyCode, currencyName } = this.props.selectedCryptoCurrencyData
@@ -82,7 +83,7 @@ class HdAddressListItem extends React.PureComponent {
8283
<View>
8384
<InvoiceListItem
8485
title={strings('account.invoiceText')}
85-
onPress={() => handleShareInvoice(this.props.address, currencyCode, currencyName)}
86+
onPress={() => handleShareInvoice(this.props.address, currencyCode, currencyName, isLight)}
8687
containerStyle={{ marginHorizontal: GRID_SIZE, borderRadius: 12, backgroundColor: colors.backDropModal.mainButton, marginBottom: GRID_SIZE }}
8788
textColor='#F7F7F7'
8889
iconType='invoice'

0 commit comments

Comments
 (0)