diff --git a/apps/wallet-mobile/android/app/build.gradle b/apps/wallet-mobile/android/app/build.gradle index 8b8bd057b8..e3e4527583 100644 --- a/apps/wallet-mobile/android/app/build.gradle +++ b/apps/wallet-mobile/android/app/build.gradle @@ -108,8 +108,8 @@ android { applicationId "com.emurgo" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 688 - versionName "4.27.0" + versionCode 690 + versionName "4.28.0" testBuildType System.getProperty('testBuildType', 'debug') testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' } diff --git a/apps/wallet-mobile/ios/nightly.plist b/apps/wallet-mobile/ios/nightly.plist index 7699d820fd..3290f7974f 100644 --- a/apps/wallet-mobile/ios/nightly.plist +++ b/apps/wallet-mobile/ios/nightly.plist @@ -17,11 +17,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 4.27.0 + 4.28.0 CFBundleSignature ???? CFBundleVersion - 575 + 577 ITSAppUsesNonExemptEncryption LSApplicationCategoryType diff --git a/apps/wallet-mobile/ios/yoroi.xcodeproj/project.pbxproj b/apps/wallet-mobile/ios/yoroi.xcodeproj/project.pbxproj index ca1914972d..6d6384ffb5 100644 --- a/apps/wallet-mobile/ios/yoroi.xcodeproj/project.pbxproj +++ b/apps/wallet-mobile/ios/yoroi.xcodeproj/project.pbxproj @@ -839,7 +839,7 @@ CODE_SIGN_ENTITLEMENTS = yoroi/yoroi.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 575; + CURRENT_PROJECT_VERSION = 577; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = F8NVT2G2L4; ENABLE_BITCODE = NO; @@ -884,7 +884,7 @@ CODE_SIGN_ENTITLEMENTS = yoroi/yoroi.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 575; + CURRENT_PROJECT_VERSION = 577; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = F8NVT2G2L4; ENVFILE = "$(PODS_ROOT)/../../.env.production"; @@ -1079,7 +1079,7 @@ CODE_SIGN_ENTITLEMENTS = nightly.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 575; + CURRENT_PROJECT_VERSION = 577; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = F8NVT2G2L4; ENABLE_BITCODE = NO; @@ -1124,7 +1124,7 @@ CODE_SIGN_ENTITLEMENTS = nightly.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 575; + CURRENT_PROJECT_VERSION = 577; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = F8NVT2G2L4; ENVFILE = "$(PODS_ROOT)/../../.env.nightly"; diff --git a/apps/wallet-mobile/ios/yoroi/Info.plist b/apps/wallet-mobile/ios/yoroi/Info.plist index 1cd0b46d1a..37e8a934be 100644 --- a/apps/wallet-mobile/ios/yoroi/Info.plist +++ b/apps/wallet-mobile/ios/yoroi/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 4.27.0 + 4.28.0 CFBundleSignature ???? CFBundleURLTypes @@ -34,7 +34,7 @@ CFBundleVersion - 575 + 577 ITSAppUsesNonExemptEncryption LSApplicationCategoryType diff --git a/apps/wallet-mobile/ios/yoroiTests/Info.plist b/apps/wallet-mobile/ios/yoroiTests/Info.plist index 8c471fa3d6..432c87dda7 100644 --- a/apps/wallet-mobile/ios/yoroiTests/Info.plist +++ b/apps/wallet-mobile/ios/yoroiTests/Info.plist @@ -15,10 +15,10 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 4.27.0 + 4.28.0 CFBundleSignature ???? CFBundleVersion - 575 + 577 diff --git a/apps/wallet-mobile/package.json b/apps/wallet-mobile/package.json index b7a343ef9b..fb35f805ac 100644 --- a/apps/wallet-mobile/package.json +++ b/apps/wallet-mobile/package.json @@ -1,6 +1,6 @@ { "name": "@yoroi/wallet-mobile", - "version": "4.27.1", + "version": "4.28.0", "private": true, "scripts": { "android-bundle": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res", @@ -91,7 +91,7 @@ }, "dependencies": { "@amplitude/analytics-react-native": "1.3.1", - "@cardano-foundation/ledgerjs-hw-app-cardano": "^6.0.0", + "@cardano-foundation/ledgerjs-hw-app-cardano": "^7.1.3", "@emurgo/cip14-js": "^3.0.1", "@emurgo/cip4-js": "1.0.7", "@emurgo/cross-csl-core": "4.4.0", @@ -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.5", + "@emurgo/yoroi-lib": "^0.15.6", "@formatjs/intl-datetimeformat": "^6.7.0", "@formatjs/intl-getcanonicallocales": "^2.1.0", "@formatjs/intl-locale": "^3.2.1", @@ -159,7 +159,7 @@ "react-intl": "^6.6.2", "react-native": "~0.71.0", "react-native-background-timer": "2.4.1", - "react-native-ble-plx": "^2.0.3", + "react-native-ble-plx": "2.0.3", "react-native-bootsplash": "^4.6.0", "react-native-config": "^1.5.0", "react-native-crypto": "2.2.0", @@ -190,6 +190,7 @@ "react-native-webview": "^11.25.0", "react-query": "^3.39.3", "reselect": "^4.0.0", + "rxjs": "^7.8.1", "sentry-expo": "^7.0.1", "stream-browserify": "3.0.0", "tinycolor2": "1.4.2", diff --git a/apps/wallet-mobile/src/HW/LedgerConnect/LedgerConnect.tsx b/apps/wallet-mobile/src/HW/LedgerConnect/LedgerConnect.tsx index d9c6747c73..60d390575a 100644 --- a/apps/wallet-mobile/src/HW/LedgerConnect/LedgerConnect.tsx +++ b/apps/wallet-mobile/src/HW/LedgerConnect/LedgerConnect.tsx @@ -7,6 +7,7 @@ import * as React from 'react' import type {IntlShape} from 'react-intl' import {defineMessages, useIntl} from 'react-intl' import {ActivityIndicator, Alert, FlatList, Image, RefreshControl, ScrollView, StyleSheet, View} from 'react-native' +import {Observer} from 'rxjs' import bleImage from '../../assets/img/bluetooth.png' import usbImage from '../../assets/img/ledger-nano-usb.png' @@ -64,8 +65,8 @@ class _LedgerConnect extends React.Component { // as it's just an empty method. Rather, we make sure sate is only // modified when component is mounted let previousAvailable = false - TransportBLE.observeState({ - next: (e: {available: boolean}) => { + const observer: Observer<{available: boolean; type: string}> = { + next: (e: {available: boolean; type: string}) => { if (this._isMounted) { Logger.debug('BLE observeState event', e) if (this._bluetoothEnabled == null && !e.available) { @@ -89,7 +90,14 @@ class _LedgerConnect extends React.Component { } } }, - }) + error: (e) => { + Logger.error('BLE observeState error', e) + }, + complete: () => { + Logger.info('BLE observeState done') + }, + } + TransportBLE.observeState(observer) } this.startScan() } diff --git a/apps/wallet-mobile/src/yoroi-wallets/cardano/hw/hw.test.ts b/apps/wallet-mobile/src/yoroi-wallets/cardano/hw/hw.test.ts index b203f0cde0..0e6850a478 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/cardano/hw/hw.test.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/cardano/hw/hw.test.ts @@ -9,7 +9,7 @@ describe('hw', () => { major: 2, minor: 0, patch: 4, - flags: {isDebug: false}, + flags: {isDebug: false, isAppXS: false}, } const mockResponse: GetVersionResponse = { version, diff --git a/apps/wallet-mobile/translations/messages/src/HW/LedgerConnect/LedgerConnect.json b/apps/wallet-mobile/translations/messages/src/HW/LedgerConnect/LedgerConnect.json index e90899215d..d51e183eca 100644 --- a/apps/wallet-mobile/translations/messages/src/HW/LedgerConnect/LedgerConnect.json +++ b/apps/wallet-mobile/translations/messages/src/HW/LedgerConnect/LedgerConnect.json @@ -4,14 +4,14 @@ "defaultMessage": "!!!Scanning bluetooth devices...", "file": "src/HW/LedgerConnect/LedgerConnect.tsx", "start": { - "line": 315, + "line": 323, "column": 11, - "index": 9898 + "index": 10191 }, "end": { - "line": 318, + "line": 326, "column": 3, - "index": 10032 + "index": 10325 } }, { @@ -19,14 +19,14 @@ "defaultMessage": "!!!You'll need to:", "file": "src/HW/LedgerConnect/LedgerConnect.tsx", "start": { - "line": 319, + "line": 327, "column": 13, - "index": 10047 + "index": 10340 }, "end": { - "line": 322, + "line": 330, "column": 3, - "index": 10169 + "index": 10462 } }, { @@ -34,14 +34,14 @@ "defaultMessage": "!!!USB device is ready, please tap on Confirm to continue.", "file": "src/HW/LedgerConnect/LedgerConnect.tsx", "start": { - "line": 323, + "line": 331, "column": 18, - "index": 10189 + "index": 10482 }, "end": { - "line": 326, + "line": 334, "column": 3, - "index": 10334 + "index": 10627 } }, { @@ -49,14 +49,14 @@ "defaultMessage": "!!!An error occurred while trying to connect with your hardware wallet:", "file": "src/HW/LedgerConnect/LedgerConnect.tsx", "start": { - "line": 327, + "line": 335, "column": 9, - "index": 10345 + "index": 10638 }, "end": { - "line": 330, + "line": 338, "column": 3, - "index": 10516 + "index": 10809 } } ] \ No newline at end of file diff --git a/packages/swap/package.json b/packages/swap/package.json index 72badee65b..d83939b80f 100644 --- a/packages/swap/package.json +++ b/packages/swap/package.json @@ -142,7 +142,7 @@ }, "devDependencies": { "@commitlint/config-conventional": "^17.0.2", - "@emurgo/yoroi-lib": "0.15.3", + "@emurgo/yoroi-lib": "0.15.6", "@react-native-async-storage/async-storage": "^1.19.3", "@react-native-community/eslint-config": "^3.0.2", "@release-it/conventional-changelog": "^5.0.0", @@ -173,7 +173,7 @@ "typescript": "^5.3.3" }, "peerDependencies": { - "@emurgo/yoroi-lib": "0.15.3", + "@emurgo/yoroi-lib": "0.15.6", "@react-native-async-storage/async-storage": ">= 1.19.3 <= 1.20.0", "immer": "^10.0.2", "react": ">= 16.8.0 <= 19.0.0", diff --git a/packages/types/package.json b/packages/types/package.json index 8debea0af7..f60623ffde 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -114,7 +114,10 @@ "typescript": "^5.3.3" }, "peerDependencies": { - "axios": "^1.5.0" + "@emurgo/yoroi-lib": "0.15.6", + "axios": "^1.5.0", + "bignumber.js": "^9.0.1", + "rxjs": "^7.8.1" }, "packageManager": "yarn@1.22.21", "engines": { diff --git a/yarn.lock b/yarn.lock index 6b9c0c2800..4750125d66 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2397,10 +2397,10 @@ blake2 "^4.0.2" int64-buffer "^1.0.1" -"@cardano-foundation/ledgerjs-hw-app-cardano@^6.0.0": - version "6.0.0" - resolved "https://registry.yarnpkg.com/@cardano-foundation/ledgerjs-hw-app-cardano/-/ledgerjs-hw-app-cardano-6.0.0.tgz#720f2eb90efd8ca90a055bb09e22d8988bdda7cd" - integrity sha512-aiWlERF5sXMzygE62YH9AXrVePu5ZG+QKGv/ZhvYec35vUhDFJK8qPiLzXmTy6MdoDKSqbYVRPd6jY3KKs5pOg== +"@cardano-foundation/ledgerjs-hw-app-cardano@^7.1.3": + version "7.1.3" + resolved "https://registry.yarnpkg.com/@cardano-foundation/ledgerjs-hw-app-cardano/-/ledgerjs-hw-app-cardano-7.1.3.tgz#1d8bb05993c3e061029defff36e8d707221c05d5" + integrity sha512-1cW5WgF2pkla2pvNp/lGsPfdDh8FjnRRLUaHsyxgZd2NNtr939F9k5R/ExCuJS0Ish4wnArucbPAZ15Cq7PIUA== dependencies: "@ledgerhq/hw-transport" "^6.27.10" base-x "^3.0.5" @@ -2767,25 +2767,12 @@ "@ledgerhq/logs" "^5.15.0" rxjs "^6.5.5" -"@emurgo/yoroi-lib@0.15.3": - version "0.15.3" - resolved "https://registry.yarnpkg.com/@emurgo/yoroi-lib/-/yoroi-lib-0.15.3.tgz#629cf1119c3b5b1946d64e7a031c1b21e6fca652" - integrity sha512-TOykcWUwybOlAMo+ELzapTv1uAXpYcXI1KDA2CYfZmdrsT8rnV2xc6Si085cKk/kviEZwMRn8XWmHhbGknT0Cg== +"@emurgo/yoroi-lib@0.15.6", "@emurgo/yoroi-lib@^0.15.6": + version "0.15.6" + resolved "https://registry.yarnpkg.com/@emurgo/yoroi-lib/-/yoroi-lib-0.15.6.tgz#b17f3922598724fb02407be7fa816095c1e59f32" + integrity sha512-JX6PUaXRgpefDdtBw12jE6TYgp1fd4WXAMp9kj7EuT+FET3324iX8hRXNE5c1bS0wz9j1Qh3xwzWgiEtK7iJBw== dependencies: - "@cardano-foundation/ledgerjs-hw-app-cardano" "^6.0.0" - "@emurgo/cross-csl-core" "4.4.0" - "@noble/hashes" "^1.3.2" - axios "^0.24.0" - bech32 "^2.0.0" - bignumber.js "^9.0.1" - easy-crc "1.1.0" - -"@emurgo/yoroi-lib@0.15.5": - version "0.15.5" - resolved "https://registry.yarnpkg.com/@emurgo/yoroi-lib/-/yoroi-lib-0.15.5.tgz#534cf4b81376f2b185b73e05a2103d9712be4a8d" - integrity sha512-Fq6MN/l5Na14d3LOsnT7xzKDky1ugbKxQ6+zzxchZkcF+w0OXGtK4sFGXccR47E7JhRLhjLqOzKSKhKGkTVt+A== - dependencies: - "@cardano-foundation/ledgerjs-hw-app-cardano" "^6.0.0" + "@cardano-foundation/ledgerjs-hw-app-cardano" "^7.1.3" "@emurgo/cross-csl-core" "4.4.0" "@noble/hashes" "^1.3.2" axios "^0.24.0" @@ -4138,12 +4125,27 @@ rxjs "6" semver "^7.3.5" +"@ledgerhq/devices@^8.4.2": + version "8.4.2" + resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-8.4.2.tgz#f1c56194cf1343d56cad49c8feba92ad93432e14" + integrity sha512-oWNTp3jCMaEvRHsXNYE/yo+PFMgXAJGFHLOU1UdE4/fYkniHbD9wdxwyZrZvrxr9hNw4/9wHiThyITwPtMzG7g== + dependencies: + "@ledgerhq/errors" "^6.18.0" + "@ledgerhq/logs" "^6.12.0" + rxjs "^7.8.1" + semver "^7.3.5" + "@ledgerhq/errors@^5.15.0", "@ledgerhq/errors@^5.50.0": version "5.50.0" resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-5.50.0.tgz#e3a6834cb8c19346efca214c1af84ed28e69dad9" integrity sha512-gu6aJ/BHuRlpU7kgVpy2vcYk6atjB4iauP2ymF7Gk0ez0Y/6VSMVSJvubeEQN+IV60+OBK0JgeIZG7OiHaw8ow== -"@ledgerhq/errors@^6.10.1", "@ledgerhq/errors@^6.12.3", "@ledgerhq/errors@^6.12.7": +"@ledgerhq/errors@^6.10.1", "@ledgerhq/errors@^6.12.3", "@ledgerhq/errors@^6.18.0": + version "6.18.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-6.18.0.tgz#d55d6a57430d7a86532a9033ce0b45103264c620" + integrity sha512-L3jQWAGyooxRDk/MRlW2v4Ji9+kloBtdmz9wBkHaj2j0n+05rweJSV3GHw9oye1BYMbVFqFffmT4H3hlXlCasw== + +"@ledgerhq/errors@^6.12.7": version "6.12.7" resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-6.12.7.tgz#c7b630488d5713bc7b1e1682d6ab5d08918c69f1" integrity sha512-1BpjzFErPK7qPFx0oItcX0mNLJMplVAm2Dpl5urZlubewnTyyw5sahIBjU+8LLCWJ2eGEh/0wyvh0jMtR0n2Mg== @@ -4157,7 +4159,7 @@ "@ledgerhq/errors" "^5.50.0" events "^3.3.0" -"@ledgerhq/hw-transport@^6.27.10", "@ledgerhq/hw-transport@^6.27.2": +"@ledgerhq/hw-transport@^6.27.10": version "6.28.5" resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-6.28.5.tgz#675193be2f695a596068145351da598316c25831" integrity sha512-xmw5RhYbqExBBqTvOnOjN/RYNIGMBxFJ+zcYNfkfw/E+uEY3L7xq8Z7sC/n7URTT6xtEctElqduBJnBQE4OQtw== @@ -4166,12 +4168,27 @@ "@ledgerhq/errors" "^6.12.7" events "^3.3.0" +"@ledgerhq/hw-transport@^6.27.2": + version "6.31.2" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-6.31.2.tgz#79c95f7928a64a0e3b5bc4ea7b5be04b9f738322" + integrity sha512-B27UIzMzm2IXPGYnEB95R7eHxpXBkTBHh6MUJJQZVknt8LilEz1tfpTYUdzAKDGQ+Z5MZyYb01Eh3Zqm3kn3uw== + dependencies: + "@ledgerhq/devices" "^8.4.2" + "@ledgerhq/errors" "^6.18.0" + "@ledgerhq/logs" "^6.12.0" + events "^3.3.0" + "@ledgerhq/logs@^5.15.0", "@ledgerhq/logs@^5.50.0": version "5.50.0" resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-5.50.0.tgz#29c6419e8379d496ab6d0426eadf3c4d100cd186" integrity sha512-swKHYCOZUGyVt4ge0u8a7AwNcA//h4nx5wIi0sruGye1IJ5Cva0GyK9L2/WdX+kWVTKp92ZiEo1df31lrWGPgA== -"@ledgerhq/logs@^6.10.0", "@ledgerhq/logs@^6.10.1": +"@ledgerhq/logs@^6.10.0", "@ledgerhq/logs@^6.12.0": + version "6.12.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-6.12.0.tgz#ad903528bf3687a44da435d7b2479d724d374f5d" + integrity sha512-ExDoj1QV5eC6TEbMdLUMMk9cfvNKhhv5gXol4SmULRVCx/3iyCPhJ74nsb3S0Vb+/f+XujBEj3vQn5+cwS0fNA== + +"@ledgerhq/logs@^6.10.1": version "6.10.1" resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-6.10.1.tgz#5bd16082261d7364eabb511c788f00937dac588d" integrity sha512-z+ILK8Q3y+nfUl43ctCPuR4Y2bIxk/ooCQFwZxhtci1EhAtMDzMAx2W25qx8G1PPL9UUOdnUax19+F0OjXoj4w== @@ -19718,7 +19735,7 @@ react-native-background-timer@2.4.1: resolved "https://registry.yarnpkg.com/react-native-background-timer/-/react-native-background-timer-2.4.1.tgz#a3bc1cafa8c1e3aeefd0611de120298b67978a0f" integrity sha512-TE4Kiy7jUyv+hugxDxitzu38sW1NqjCk4uE5IgU2WevLv7sZacaBc6PZKOShNRPGirLl1NWkaG3LDEkdb9Um5g== -react-native-ble-plx@2.0.3, react-native-ble-plx@^2.0.3: +react-native-ble-plx@2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/react-native-ble-plx/-/react-native-ble-plx-2.0.3.tgz#b0a746f33389dbf7fd7b158513330d487d5d0fbb" integrity sha512-62LRDBPf/03K7sge+qq2ZuF8PWCGB782G+SBrpgNm5fA5Hs3FCY1ExTJZ1G0tB5ZhBPYEXcKRxPLuFegcDFrqA==