From 15377afb954f6c8e0e4edb236bd0ef6850fe5d75 Mon Sep 17 00:00:00 2001 From: marcosrdz Date: Tue, 8 Sep 2020 19:36:35 -0400 Subject: [PATCH 1/3] FIX: Fixed dark/light theme switch --- BlueComponents.js | 490 ++++++++++++++++++++++++---------------------- 1 file changed, 256 insertions(+), 234 deletions(-) diff --git a/BlueComponents.js b/BlueComponents.js index 5197887c4..e5e443a01 100644 --- a/BlueComponents.js +++ b/BlueComponents.js @@ -1205,13 +1205,11 @@ const stylesBlueIcon = StyleSheet.create({ width: 30, height: 30, borderRadius: 15, - backgroundColor: BlueCurrentTheme.colors.buttonBackgroundColor, }, ballIncoming: { width: 30, height: 30, borderRadius: 15, - backgroundColor: BlueCurrentTheme.colors.ballReceive, transform: [{ rotate: '-45deg' }], justifyContent: 'center', }, @@ -1219,20 +1217,17 @@ const stylesBlueIcon = StyleSheet.create({ width: 30, height: 30, borderRadius: 15, - backgroundColor: BlueCurrentTheme.colors.ballReceive, }, ballReceive: { width: 30, height: 30, borderBottomLeftRadius: 15, - backgroundColor: BlueCurrentTheme.colors.ballReceive, transform: [{ rotate: '-45deg' }], }, ballOutgoing: { width: 30, height: 30, borderRadius: 15, - backgroundColor: BlueCurrentTheme.colors.ballOutgoing, transform: [{ rotate: '225deg' }], justifyContent: 'center', }, @@ -1240,13 +1235,11 @@ const stylesBlueIcon = StyleSheet.create({ width: 30, height: 30, borderRadius: 15, - backgroundColor: BlueCurrentTheme.colors.ballOutgoing, }, ballOutgoingExpired: { width: 30, height: 30, borderRadius: 15, - backgroundColor: BlueCurrentTheme.colors.ballOutgoingExpired, justifyContent: 'center', }, ballTransparrent: { @@ -1262,205 +1255,239 @@ const stylesBlueIcon = StyleSheet.create({ backgroundColor: 'gray', }, }); -export class BluePlusIcon extends Component { - render() { - return ( - - - - - - - - ); - } -} -export class BlueTransactionIncomingIcon extends Component { - render() { - return ( - - - - - +export const BluePlusIcon = props => { + const { colors } = useTheme(); + const stylesBlueIconHooks = StyleSheet.create({ + ball: { + backgroundColor: colors.buttonBackgroundColor, + }, + }); + return ( + + + + - ); - } -} + + ); +}; -export class BlueTransactionPendingIcon extends Component { - render() { - return ( - - - - - +export const BlueTransactionIncomingIcon = props => { + const { colors } = useTheme(); + const stylesBlueIconHooks = StyleSheet.create({ + ballIncoming: { + backgroundColor: colors.ballReceive, + }, + }); + return ( + + + + - ); - } -} + + ); +}; -export class BlueTransactionExpiredIcon extends Component { - render() { - return ( - - - - - - - - ); - } -} +export const BlueTransactionPendingIcon = props => { + const { colors } = useTheme(); -export class BlueTransactionOnchainIcon extends Component { - render() { - return ( - - - - - + const stylesBlueIconHooks = StyleSheet.create({ + ball: { + backgroundColor: colors.buttonBackgroundColor, + }, + }); + return ( + + + + - ); - } -} + + ); +}; -export class BlueTransactionOffchainIcon extends Component { - render() { - return ( - - - - - +export const BlueTransactionExpiredIcon = props => { + const { colors } = useTheme(); + const stylesBlueIconHooks = StyleSheet.create({ + ballOutgoingExpired: { + backgroundColor: colors.ballOutgoingExpired, + }, + }); + return ( + + + + - ); - } -} + + ); +}; -export class BlueTransactionOffchainIncomingIcon extends Component { - render() { - return ( - - - - - +export const BlueTransactionOnchainIcon = props => { + const { colors } = useTheme(); + const stylesBlueIconHooks = StyleSheet.create({ + ballIncoming: { + backgroundColor: colors.ballReceive, + }, + }); + return ( + + + + - ); - } -} + + ); +}; -export class BlueTransactionOutgoingIcon extends Component { - render() { - return ( - - - - - +export const BlueTransactionOffchainIcon = props => { + const { colors } = useTheme(); + const stylesBlueIconHooks = StyleSheet.create({ + ballOutgoingWithoutRotate: { + backgroundColor: colors.ballOutgoing, + }, + }); + return ( + + + + - ); - } -} + + ); +}; + +export const BlueTransactionOffchainIncomingIcon = props => { + const { colors } = useTheme(); + const stylesBlueIconHooks = StyleSheet.create({ + ballIncomingWithoutRotate: { + backgroundColor: colors.ballReceive, + }, + }); + return ( + + + + + + + + ); +}; + +export const BlueTransactionOutgoingIcon = props => { + const { colors } = useTheme(); + const stylesBlueIconHooks = StyleSheet.create({ + ballOutgoing: { + backgroundColor: colors.ballOutgoing, + }, + }); + return ( + + + + + + + + ); +}; const sendReceiveScanButtonFontSize = PixelRatio.roundToNearestPixel(Dimensions.get('window').width / 26) > 22 ? 22 : PixelRatio.roundToNearestPixel(Dimensions.get('window').width / 26); -export class BlueReceiveButtonIcon extends Component { - render() { - return ( - - - - - - - - {loc.receive.header} - +export const BlueReceiveButtonIcon = props => { + const { colors } = useTheme(); + + return ( + + + + + + + {loc.receive.header} + - - ); - } -} + + + ); +}; export class BlueScanButton extends Component { render() { @@ -1589,64 +1616,59 @@ export class ManageFundsBigButton extends Component { } } -export class NewWalletPanel extends Component { - render() { - return ( - { + const { colors } = useTheme(); + return ( + + - - - {loc.wallets.list_create_a_wallet} - - - {loc.wallets.list_create_a_wallet1} - - - {loc.wallets.list_create_a_wallet2} - - - {loc.wallets.list_create_a_button} - + {loc.wallets.list_create_a_wallet} + + + {loc.wallets.list_create_a_wallet1} + + + {loc.wallets.list_create_a_wallet2} + + + {loc.wallets.list_create_a_button} - - ); - } -} + + + ); +}; export const BlueTransactionListItem = React.memo(({ item, itemPriceUnit = BitcoinUnit.BTC, timeElapsed }) => { const [subtitleNumberOfLines, setSubtitleNumberOfLines] = useState(1); + const { colors } = useTheme(); const txMemo = () => { if (BlueApp.tx_metadata[item.hash] && BlueApp.tx_metadata[item.hash].memo) { @@ -1679,7 +1701,7 @@ export const BlueTransactionListItem = React.memo(({ item, itemPriceUnit = Bitco }; const rowTitleStyle = () => { - let color = BlueCurrentTheme.colors.successColor; + let color = colors.successColor; if (item.type === 'user_invoice' || item.type === 'payment_request') { const currentDate = new Date(); @@ -1687,16 +1709,16 @@ export const BlueTransactionListItem = React.memo(({ item, itemPriceUnit = Bitco const invoiceExpiration = item.timestamp + item.expire_time; if (invoiceExpiration > now) { - color = BlueCurrentTheme.colors.successColor; + color = colors.successColor; } else if (invoiceExpiration < now) { if (item.ispaid) { - color = BlueCurrentTheme.colors.successColor; + color = colors.successColor; } else { color = '#9AA0AA'; } } } else if (item.value / 100000000 < 0) { - color = BlueCurrentTheme.colors.foregroundColor; + color = colors.foregroundColor; } return { From 1e0758762277a8acdbf4fde20f147ed4a01c9479 Mon Sep 17 00:00:00 2001 From: Overtorment Date: Wed, 9 Sep 2020 13:01:33 +0100 Subject: [PATCH 2/3] REL: release notes & ver bump --- android/app/build.gradle | 2 +- ios/BlueWallet/Info.plist | 2 +- ios/BlueWalletWatch Extension/Info.plist | 2 +- ios/BlueWalletWatch/Info.plist | 2 +- ios/TodayExtension/Info.plist | 2 +- .../metadata/de-DE/promotional_text.txt | 4 +- ios/fastlane/metadata/en-US/release_notes.txt | 41 +++++++++++-------- ios/fastlane/metadata/it/promotional_text.txt | 6 +-- ios/fastlane/metadata/it/support_url.txt | 2 +- ios/fastlane/metadata/ru/promotional_text.txt | 5 +-- package-lock.json | 2 +- package.json | 2 +- 12 files changed, 39 insertions(+), 33 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index a950f4fe6..42f164531 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -132,7 +132,7 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 - versionName "5.5.7" + versionName "5.5.8" multiDexEnabled true missingDimensionStrategy 'react-native-camera', 'general' testBuildType System.getProperty('testBuildType', 'debug') // This will later be used to control the test apk build type diff --git a/ios/BlueWallet/Info.plist b/ios/BlueWallet/Info.plist index 43d68c39b..83471e0a2 100644 --- a/ios/BlueWallet/Info.plist +++ b/ios/BlueWallet/Info.plist @@ -48,7 +48,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 5.5.7 + 5.5.8 CFBundleSignature ???? CFBundleURLTypes diff --git a/ios/BlueWalletWatch Extension/Info.plist b/ios/BlueWalletWatch Extension/Info.plist index c39bb32e1..f86cfa74e 100644 --- a/ios/BlueWalletWatch Extension/Info.plist +++ b/ios/BlueWalletWatch Extension/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 5.5.7 + 5.5.8 CFBundleVersion 239 CLKComplicationPrincipalClass diff --git a/ios/BlueWalletWatch/Info.plist b/ios/BlueWalletWatch/Info.plist index f5ced23c1..74539c35a 100644 --- a/ios/BlueWalletWatch/Info.plist +++ b/ios/BlueWalletWatch/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 5.5.7 + 5.5.8 CFBundleVersion 239 UISupportedInterfaceOrientations diff --git a/ios/TodayExtension/Info.plist b/ios/TodayExtension/Info.plist index bbf70dbed..aed07be9a 100644 --- a/ios/TodayExtension/Info.plist +++ b/ios/TodayExtension/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 5.5.7 + 5.5.8 CFBundleVersion 1 NSExtension diff --git a/ios/fastlane/metadata/de-DE/promotional_text.txt b/ios/fastlane/metadata/de-DE/promotional_text.txt index 16deccb73..a63d885aa 100644 --- a/ios/fastlane/metadata/de-DE/promotional_text.txt +++ b/ios/fastlane/metadata/de-DE/promotional_text.txt @@ -1,10 +1,10 @@ Eigenschaften -* Quelloffene Software +* Quelloffene * Vollverschlüsselung * Glaubhafte Täuschung * Flexible Gebühren * Gebührenübernahme * SegWit -* Wallets beobachten (nicht handeln) +* Wallets beobachten * Lightning Netzwerk diff --git a/ios/fastlane/metadata/en-US/release_notes.txt b/ios/fastlane/metadata/en-US/release_notes.txt index 4d1511071..72ca53423 100644 --- a/ios/fastlane/metadata/en-US/release_notes.txt +++ b/ios/fastlane/metadata/en-US/release_notes.txt @@ -1,3 +1,28 @@ +v5.5.7 +====== + +* ADD: Split for large devices +* ADD: Export file option +* ADD: Slovenian & Hebrew language +* ADD: KES, NGN, TWD Fiat +* FIX: After broadcast, value of sent transaction is incorrect +* FIX: transaction time when using ElectrumPersonalServer +* FIX: some ElectrumPersonalServer txs stay unconfirmed +* FIX: Fixed dark/light theme switch +* FIX: updated languages pt_BR, pt_PT, es_ES, sl_SI, de_DE, fr_FR, cs_CZ, ja_JP, it, ru, he +* FIX: create-ln-invoice - button is not blocked, which can lead to multiple invoices created +* FIX: If user has approved notifications, send hash from watch +* FIX: If Camera not authorized, show Alert. +* FIX: Only show direct export +* FIX: better handling of errors from HodlHodl +* FIX: Safello buy-bitcoin flow +* FIX: Request location authorization for HodlHodl +* FIX: Settings|Network|Lightning Settings fails input for leading or trailing blank +* FIX: show Import file option +* FIX: Background had wrong color during loading phase +* REF: speeded up large wallets (>3k txs) +* REF: speedup onchain wallet creation + v5.5.6 ====== @@ -51,19 +76,3 @@ v5.5.2 * FIX: missing text on sendMAX dialog box confirmation * FIX: Invoice creation darkmode * FIX: Font-Color in Input Field "transaction notes" is not adapted for dark mode - -v5.5.1 -====== - -* ADD: Dark Mode -* FIX: #1309 Sharing doesnt include text -* FIX: import mnemonic w/typo, 'try again' does nothing (closes #1286) -* ADD: support importing watch-only in bitcoincore format [fingerprint/derivation]xpub (wallet descriptors) -* REF: dont store txhex in transactions list -* REF: wrap save storage in try-catch - -v5.5.0 -====== - -* FIX: provide entropy for D20 -* REF: speeded up transactions list diff --git a/ios/fastlane/metadata/it/promotional_text.txt b/ios/fastlane/metadata/it/promotional_text.txt index a81b4bc28..e44815f95 100644 --- a/ios/fastlane/metadata/it/promotional_text.txt +++ b/ios/fastlane/metadata/it/promotional_text.txt @@ -1,10 +1,10 @@ Funzionalità -* Open Source +* OpenSource * Crittografia completa * Negabilita' plausibile * Commissioni flessibili -* Replace-By-Fee (RBF) +* Replace-By-Fee * SegWit -* Watch-only (Sentinel) wallets +* Watch-only wallets * Lightning network diff --git a/ios/fastlane/metadata/it/support_url.txt b/ios/fastlane/metadata/it/support_url.txt index 8b1378917..0369559b2 100644 --- a/ios/fastlane/metadata/it/support_url.txt +++ b/ios/fastlane/metadata/it/support_url.txt @@ -1 +1 @@ - +https://github.com/BlueWallet/BlueWallet/issues diff --git a/ios/fastlane/metadata/ru/promotional_text.txt b/ios/fastlane/metadata/ru/promotional_text.txt index 64a8c87a8..3db13ed4f 100644 --- a/ios/fastlane/metadata/ru/promotional_text.txt +++ b/ios/fastlane/metadata/ru/promotional_text.txt @@ -2,9 +2,6 @@ * Открытый исходный код * Все данные шифруются -* Правдоподобное отрицание (Plausible deniability) +* Правдоподобное отрицание * Гибкие настройки комиссии -* Повышение комиссии за транзакцию (RBF) -* SegWit -* Просмотр баланса кошелька без импорта приватных ключей * Lightning network \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 7824bf208..c3809bc9d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "bluewallet", - "version": "5.5.7", + "version": "5.5.8", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 5841faa7d..f66477478 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bluewallet", - "version": "5.5.7", + "version": "5.5.8", "license": "MIT", "devDependencies": { "@babel/core": "^7.9.6", From c89416f0fa331b5e53712e897ea1d8ae6d5e63bd Mon Sep 17 00:00:00 2001 From: Overtorment Date: Wed, 9 Sep 2020 15:07:36 +0100 Subject: [PATCH 3/3] Create codeql-analysis.yml --- .github/workflows/codeql-analysis.yml | 62 +++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 000000000..7072a1862 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,62 @@ +name: "CodeQL" + +on: + push: + branches: [master] + pull_request: + # The branches below must be a subset of the branches above + branches: [master] + schedule: + - cron: '0 1 * * 5' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + # Override automatic language detection by changing the below list + # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] + language: ['javascript'] + # Learn more... + # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + # We must fetch at least the immediate parents so that if this is + # a pull request then we can checkout the head. + fetch-depth: 2 + + # If this run was triggered by a pull request event, then checkout + # the head of the pull request instead of the merge commit. + - run: git checkout HEAD^2 + if: ${{ github.event_name == 'pull_request' }} + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1