mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-23 15:20:55 +01:00
WIP
This commit is contained in:
parent
5e2ecaa7ba
commit
ba96aaaf24
5 changed files with 20 additions and 18 deletions
|
@ -330,11 +330,11 @@ export class BlueWalletNavigationHeader extends Component {
|
||||||
source={(() => {
|
source={(() => {
|
||||||
switch (this.state.wallet.type) {
|
switch (this.state.wallet.type) {
|
||||||
case LightningCustodianWallet.type:
|
case LightningCustodianWallet.type:
|
||||||
return require('./img/lnd-shape.png');
|
return I18nManager.isRTL ? require('./img/lnd-shape-rtl.png') : require('./img/lnd-shape.png');
|
||||||
case MultisigHDWallet.type:
|
case MultisigHDWallet.type:
|
||||||
return require('./img/vault-shape.png');
|
return I18nManager.isRTL ? require('./img/vault-shape-rtl.png') : require('./img/vault-shape.png');
|
||||||
default:
|
default:
|
||||||
return require('./img/btc-shape.png');
|
return I18nManager.isRTL ? require('./img/btc-shape-rtl.png') : require('./img/btc-shape.png');
|
||||||
}
|
}
|
||||||
})()}
|
})()}
|
||||||
style={{
|
style={{
|
||||||
|
@ -580,7 +580,7 @@ const styleCopyTextToClipboard = StyleSheet.create({
|
||||||
export const SafeBlueArea = props => {
|
export const SafeBlueArea = props => {
|
||||||
const { style, ...nonStyleProps } = props;
|
const { style, ...nonStyleProps } = props;
|
||||||
const { colors } = useTheme();
|
const { colors } = useTheme();
|
||||||
const baseStyle = { flex: 1, backgroundColor: colors.background }
|
const baseStyle = { flex: 1, backgroundColor: colors.background };
|
||||||
return <SafeAreaView forceInset={{ horizontal: 'always' }} style={[baseStyle, style]} {...nonStyleProps} />;
|
return <SafeAreaView forceInset={{ horizontal: 'always' }} style={[baseStyle, style]} {...nonStyleProps} />;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -174,7 +174,10 @@ const WalletCarouselItem = ({ item, index, onPress, handleLongPress, isSelectedW
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<LinearGradient shadowColor={colors.shadowColor} colors={WalletGradient.gradientsFor(item.type)} style={iStyles.grad}>
|
<LinearGradient shadowColor={colors.shadowColor} colors={WalletGradient.gradientsFor(item.type)} style={iStyles.grad}>
|
||||||
<Image source={require('../img/btc-shape.png')} style={iStyles.image} />
|
<Image
|
||||||
|
source={I18nManager.isRTL ? require('../img/btc-shape-rtl.png') : require('../img/btc-shape.png')}
|
||||||
|
style={iStyles.image}
|
||||||
|
/>
|
||||||
<Text style={iStyles.br} />
|
<Text style={iStyles.br} />
|
||||||
<Text numberOfLines={1} style={[iStyles.label, { color: colors.inverseForegroundColor }]}>
|
<Text numberOfLines={1} style={[iStyles.label, { color: colors.inverseForegroundColor }]}>
|
||||||
{item.getIsFailure() ? loc.wallets.import_placeholder_fail : loc.wallets.import_placeholder_inprogress}
|
{item.getIsFailure() ? loc.wallets.import_placeholder_fail : loc.wallets.import_placeholder_inprogress}
|
||||||
|
@ -196,13 +199,13 @@ const WalletCarouselItem = ({ item, index, onPress, handleLongPress, isSelectedW
|
||||||
let image;
|
let image;
|
||||||
switch (item.type) {
|
switch (item.type) {
|
||||||
case LightningCustodianWallet.type:
|
case LightningCustodianWallet.type:
|
||||||
image = require('../img/lnd-shape.png');
|
image = I18nManager.isRTL ? require('../img/lnd-shape-rtl.png') : require('../img/lnd-shape.png');
|
||||||
break;
|
break;
|
||||||
case MultisigHDWallet.type:
|
case MultisigHDWallet.type:
|
||||||
image = require('../img/vault-shape.png');
|
image = I18nManager.isRTL ? require('../img/vault-shape-rtl.png') : require('../img/vault-shape.png');
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
image = require('../img/btc-shape.png');
|
image = I18nManager.isRTL ? require('../img/btc-shape-rtl.png') : require('../img/btc-shape.png');
|
||||||
}
|
}
|
||||||
|
|
||||||
const latestTransactionText =
|
const latestTransactionText =
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React, { useEffect, useState, useRef, useContext } from 'react';
|
import React, { useEffect, useState, useRef, useContext } from 'react';
|
||||||
import { View, ActivityIndicator, Image, Text, StyleSheet, StatusBar, ScrollView } from 'react-native';
|
import { View, ActivityIndicator, Image, Text, I18nManager, StyleSheet, StatusBar, ScrollView } from 'react-native';
|
||||||
import { BluePrivateBalance } from '../../BlueComponents';
|
import { BluePrivateBalance } from '../../BlueComponents';
|
||||||
import SortableList from 'react-native-sortable-list';
|
import SortableList from 'react-native-sortable-list';
|
||||||
import LinearGradient from 'react-native-linear-gradient';
|
import LinearGradient from 'react-native-linear-gradient';
|
||||||
|
@ -123,11 +123,11 @@ const ReorderWallets = () => {
|
||||||
source={(() => {
|
source={(() => {
|
||||||
switch (item.type) {
|
switch (item.type) {
|
||||||
case LightningCustodianWallet.type:
|
case LightningCustodianWallet.type:
|
||||||
return require('../../img/lnd-shape.png');
|
return I18nManager.isRTL ? require('../../img/lnd-shape-rtl.png') : require('../../img/lnd-shape.png');
|
||||||
case MultisigHDWallet.type:
|
case MultisigHDWallet.type:
|
||||||
return require('../../img/vault-shape.png');
|
return I18nManager.isRTL ? require('../../img/vault-shape-rtl.png') : require('../../img/vault-shape.png');
|
||||||
default:
|
default:
|
||||||
return require('../../img/btc-shape.png');
|
return I18nManager.isRTL ? require('../../img/btc-shape-rtl.png') : require('../../img/btc-shape.png');
|
||||||
}
|
}
|
||||||
})()}
|
})()}
|
||||||
style={styles.image}
|
style={styles.image}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable react/prop-types */
|
/* eslint-disable react/prop-types */
|
||||||
import React, { useContext, useEffect, useState } from 'react';
|
import React, { useContext, useEffect, useState } from 'react';
|
||||||
import { View, ActivityIndicator, Image, Text, TouchableOpacity, FlatList, StyleSheet, StatusBar } from 'react-native';
|
import { View, ActivityIndicator, Image, Text, TouchableOpacity, FlatList, StyleSheet, StatusBar, I18nManager } from 'react-native';
|
||||||
import LinearGradient from 'react-native-linear-gradient';
|
import LinearGradient from 'react-native-linear-gradient';
|
||||||
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
||||||
import { useRoute, useTheme } from '@react-navigation/native';
|
import { useRoute, useTheme } from '@react-navigation/native';
|
||||||
|
@ -106,11 +106,11 @@ const SelectWallet = () => {
|
||||||
source={(() => {
|
source={(() => {
|
||||||
switch (item.type) {
|
switch (item.type) {
|
||||||
case LightningCustodianWallet.type:
|
case LightningCustodianWallet.type:
|
||||||
return require('../../img/lnd-shape.png');
|
return I18nManager.isRTL ? require('../../img/lnd-shape-rtl.png') : require('../../img/lnd-shape.png');
|
||||||
case MultisigHDWallet.type:
|
case MultisigHDWallet.type:
|
||||||
return require('../../img/vault-shape.png');
|
return I18nManager.isRTL ? require('../../img/vault-shape-rtl.png') : require('../../img/vault-shape.png');
|
||||||
default:
|
default:
|
||||||
return require('../../img/btc-shape.png');
|
return I18nManager.isRTL ? require('../../img/btc-shape-rtl.png') : require('../../img/btc-shape.png');
|
||||||
}
|
}
|
||||||
})()}
|
})()}
|
||||||
style={styles.image}
|
style={styles.image}
|
||||||
|
|
|
@ -155,8 +155,7 @@ it('HD (BIP49) can create TX', async () => {
|
||||||
tx = bitcoin.Transaction.fromHex(txNew.tx.toHex());
|
tx = bitcoin.Transaction.fromHex(txNew.tx.toHex());
|
||||||
assert.strictEqual(tx.outs.length, 2);
|
assert.strictEqual(tx.outs.length, 2);
|
||||||
assert.ok(tx.outs[0].value > 50000);
|
assert.ok(tx.outs[0].value > 50000);
|
||||||
assert.strictEqual(tx.outs[1].value, 25000
|
assert.strictEqual(tx.outs[1].value, 25000);
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Segwit HD (BIP49) can fetch balance with many used addresses in hierarchy', async function () {
|
it('Segwit HD (BIP49) can fetch balance with many used addresses in hierarchy', async function () {
|
||||||
|
|
Loading…
Add table
Reference in a new issue