diff --git a/components/AmountInput.js b/components/AmountInput.js index 7060c2c34..f49bab7db 100644 --- a/components/AmountInput.js +++ b/components/AmountInput.js @@ -153,6 +153,9 @@ class AmountInput extends Component { } text = rez; } + if (text.startsWith('0') && !(text.includes('.') || text.includes(','))) { + text = text.replace(/^(0+)/g, ''); + } text = text.replace(/[^\d.,-]/g, ''); // remove all but numbers, dots & commas text = text.replace(/(\..*)\./g, '$1'); } diff --git a/package-lock.json b/package-lock.json index a35d7262a..769b73df5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5832,9 +5832,9 @@ } }, "@react-navigation/drawer": { - "version": "5.12.4", - "resolved": "https://registry.npmjs.org/@react-navigation/drawer/-/drawer-5.12.4.tgz", - "integrity": "sha512-0O6OCTgCVnThx0XFsHd/48i6FeV7vxNvJYxeucantcdCwQMWJb46cVMsYGFYt49VwE8VX4Yg/KMZXMPfPxn7Pg==", + "version": "5.12.5", + "resolved": "https://registry.npmjs.org/@react-navigation/drawer/-/drawer-5.12.5.tgz", + "integrity": "sha512-WMfz/tKg/K7QBb5rhjXW/pho4zXh3OoHXnHETk5SuVzHlDPM7r84uvAeC5l+ySp5jmipLrJn3zL+kfv9+KKHZQ==", "requires": { "color": "^3.1.3", "react-native-iphone-x-helper": "^1.3.0" diff --git a/package.json b/package.json index 9b23a0ed6..d97d5fb42 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "@react-native-community/blur": "3.6.0", "@react-native-community/masked-view": "0.1.10", "@react-native-community/push-notification-ios": "1.8.0", - "@react-navigation/drawer": "5.12.4", + "@react-navigation/drawer": "5.12.5", "@react-navigation/native": "5.9.3", "@react-navigation/stack": "5.14.3", "@remobile/react-native-qrcode-local-image": "git+https://github.com/BlueWallet/react-native-qrcode-local-image.git", diff --git a/screen/settings/about.js b/screen/settings/about.js index ec84b7910..a8e485ee8 100644 --- a/screen/settings/about.js +++ b/screen/settings/about.js @@ -5,15 +5,7 @@ import { Icon } from 'react-native-elements'; import { getApplicationName, getVersion, getBundleId, getBuildNumber, getUniqueId } from 'react-native-device-info'; import Rate, { AndroidMarket } from 'react-native-rate'; -import { - BlueButton, - BlueCard, - BlueListItem, - BlueSpacing20, - BlueTextCentered, - SafeBlueArea, - BlueCopyToClipboardButton, -} from '../../BlueComponents'; +import { BlueButton, BlueCard, BlueListItem, BlueSpacing20, BlueTextCentered, BlueCopyToClipboardButton } from '../../BlueComponents'; import navigationStyle from '../../components/navigationStyle'; import loc from '../../loc'; @@ -114,113 +106,111 @@ const About = () => { }; return ( - - - - - - {loc.settings.about_free} - {loc.settings.about_backup} - - - - - - - - - - - {loc.settings.about_awesome} 👍 - - React Native - bitcoinjs-lib - Nodejs - Electrum server - - - - - {loc.settings.about_sm_github} - - - - - - - - - - {getApplicationName()} ver {getVersion()} (build {getBuildNumber()}) - - {new Date(getBuildNumber() * 1000).toGMTString()} - {getBundleId()} - - w, h = {width}, {height} - - Unique ID: {getUniqueId()} - - + + + + + {loc.settings.about_free} + {loc.settings.about_backup} + - - - - + + + + + + + + + {loc.settings.about_awesome} 👍 + + React Native + bitcoinjs-lib + Nodejs + Electrum server + + + + + {loc.settings.about_sm_github} + + + + + + + + + + {getApplicationName()} ver {getVersion()} (build {getBuildNumber()}) + + {new Date(getBuildNumber() * 1000).toGMTString()} + {getBundleId()} + + w, h = {width}, {height} + + Unique ID: {getUniqueId()} + + + + + + ); }; diff --git a/screen/settings/language.js b/screen/settings/language.js index 7b072d235..83e861575 100644 --- a/screen/settings/language.js +++ b/screen/settings/language.js @@ -4,7 +4,7 @@ import { FlatList, StyleSheet } from 'react-native'; import { useNavigation, useTheme } from '@react-navigation/native'; import navigationStyle from '../../components/navigationStyle'; -import { SafeBlueArea, BlueListItem, BlueLoading } from '../../BlueComponents'; +import { BlueListItem } from '../../BlueComponents'; import loc from '../../loc'; import { AvailableLanguages } from '../../loc/languages'; import { BlueStorageContext } from '../../blue_modules/storage-context'; @@ -17,7 +17,6 @@ const styles = StyleSheet.create({ const Language = () => { const { setLanguage, language } = useContext(BlueStorageContext); - const [isLoading, setIsLoading] = useState(true); const [selectedLanguage, setSelectedLanguage] = useState(loc.getLanguage()); const { setOptions } = useNavigation(); const { colors } = useTheme(); @@ -26,9 +25,6 @@ const Language = () => { backgroundColor: colors.background, }, }); - useEffect(() => { - setIsLoading(false); - }, []); useEffect(() => { setOptions({ title: loc.settings.language }); @@ -54,18 +50,15 @@ const Language = () => { ); }; - return isLoading ? ( - - ) : ( - - `${index}`} - data={AvailableLanguages} - renderItem={renderItem} - initialNumToRender={25} - /> - + return ( + `${index}`} + data={AvailableLanguages} + renderItem={renderItem} + initialNumToRender={25} + contentInsetAdjustmentBehavior="automatic" + /> ); };