Skip to content

Commit

Permalink
lint + remaining flow errors
Browse files Browse the repository at this point in the history
  • Loading branch information
v-almonacid committed Jun 10, 2021
1 parent bff7220 commit 3758968
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 17 deletions.
3 changes: 1 addition & 2 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ node_modules/warning/.*
.*/node_modules/@react-native-community/cli/.*/.*

; Ignore @ledgerhq/react-native-hw-transport-ble
;.*/node_modules/@ledgerhq/react-native-hw-transport-ble/src/BleTransport.js
;.*/node_modules/@ledgerhq/react-native-hw-transport-ble/lib/BleTransport.js.flow
.*/node_modules/@ledgerhq/react-native-hw-transport-ble/lib/BleTransport.js.flow

; Ignore @emurgo/cardano-serialization-lib-nodejs
.*/node_modules/@emurgo/cardano-serialization-lib-nodejs/cardano_serialization_lib.js.flow
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@emurgo/cip14-js": "2.0.0",
"@emurgo/cip4-js": "1.0.5",
"@emurgo/react-native-haskell-shelley": "1.1.4",
"@ledgerhq/react-native-hw-transport-ble": "5.41.0",
"@ledgerhq/react-native-hw-transport-ble": "5.51.1",
"@react-native-async-storage/async-storage": "1.15.5",
"@react-native-community/clipboard": "1.5.1",
"@react-native-community/masked-view": "0.1.10",
Expand Down
9 changes: 5 additions & 4 deletions src/crypto/shelley/ledgerUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import TransportBLE from '@ledgerhq/react-native-hw-transport-ble'
// so that we can keep minSdkVersion = 21
// import TransportHID from '@ledgerhq/react-native-hid'
import TransportHID from '@v-almonacid/react-native-hid'
import Transport, {TransportStatusError} from '@ledgerhq/hw-transport'
import {TransportStatusError} from '@ledgerhq/hw-transport'
import {BleError} from 'react-native-ble-plx'
import {Platform, PermissionsAndroid} from 'react-native'
import {
Expand Down Expand Up @@ -75,8 +75,6 @@ import type {
TxInput,
TxOutput,
} from '@cardano-foundation/ledgerjs-hw-app-cardano'
import type BluetoothTransport from '@ledgerhq/react-native-hw-transport-ble'
import type HIDTransport from '@v-almonacid/react-native-hid'
import type {WalletImplementationId, NetworkId} from '../../config/types'
import type {HaskellShelleyTxSignRequest} from './HaskellShelleyTxSignRequest'

Expand Down Expand Up @@ -871,7 +869,10 @@ export const signTxWithLedger = async (
const appAda = new AppAda(transport)

Logger.debug('ledgerUtils::signTxWithLedger inputs', signRequest.tx.inputs)
Logger.debug('ledgerUtils::signTxWithLedger outputs', signRequest.tx.outputs)
Logger.debug(
'ledgerUtils::signTxWithLedger outputs',
signRequest.tx.outputs,
)

const ledgerSignature: SignTransactionResponse = await appAda.signTransaction(
signRequest,
Expand Down
68 changes: 58 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2808,12 +2808,27 @@
rxjs "^6.6.3"
semver "^7.3.4"

"@ledgerhq/devices@^5.51.1":
version "5.51.1"
resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-5.51.1.tgz#d741a4a5d8f17c2f9d282fd27147e6fe1999edb7"
integrity sha512-4w+P0VkbjzEXC7kv8T1GJ/9AVaP9I6uasMZ/JcdwZBS3qwvKo5A5z9uGhP5c7TvItzcmPb44b5Mw2kT+WjUuAA==
dependencies:
"@ledgerhq/errors" "^5.50.0"
"@ledgerhq/logs" "^5.50.0"
rxjs "6"
semver "^7.3.5"

"@ledgerhq/errors@^5.15.0", "@ledgerhq/errors@^5.41.0":
version "5.41.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-5.41.0.tgz#246668c6a6ee2e0e9fbb87f00b354fdd386308b7"
integrity sha512-Di6Uq9l9c/W9V1jZAQjsVPbvSOSRipF+zXd/Z6SVKB1QxIHwXZu7KYSUnDLV6jqKZ9fxXoLjTYWq2Gl/EW87Kw==

"@ledgerhq/hw-transport@^5.12.0", "@ledgerhq/hw-transport@^5.15.0", "@ledgerhq/hw-transport@^5.41.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/hw-transport@^5.12.0", "@ledgerhq/hw-transport@^5.15.0":
version "5.41.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-5.41.0.tgz#b4d222fdef304582efaadf098d1916f5edb9caa3"
integrity sha512-4zmTW1XwxvO5Ei+LoV11qXPd97UI8XxwuCeb794g/r6dkqlAL8bh35aVCHpbiHRXnoCt51a74ZciQ1yYteR/8Q==
Expand All @@ -2822,22 +2837,36 @@
"@ledgerhq/errors" "^5.41.0"
events "^3.2.0"

"@ledgerhq/hw-transport@^5.51.1":
version "5.51.1"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-5.51.1.tgz#8dd14a8e58cbee4df0c29eaeef983a79f5f22578"
integrity sha512-6wDYdbWrw9VwHIcoDnqWBaDFyviyjZWv6H9vz9Vyhe4Qd7TIFmbTl/eWs6hZvtZBza9K8y7zD8ChHwRI4s9tSw==
dependencies:
"@ledgerhq/devices" "^5.51.1"
"@ledgerhq/errors" "^5.50.0"
events "^3.3.0"

"@ledgerhq/logs@^5.15.0", "@ledgerhq/logs@^5.41.0":
version "5.41.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-5.41.0.tgz#377b77aa29c33c63c6b0b7e1916fa300bd52ce17"
integrity sha512-pY3nIxOWISAreVTiKRDdKgjQvKWkzz3lov9LsJLyaTn0Q1PISHPjcuMpchueLI50BMA6v1M8ENzXgpqqw+KQDw==

"@ledgerhq/react-native-hw-transport-ble@5.41.0":
version "5.41.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/react-native-hw-transport-ble/-/react-native-hw-transport-ble-5.41.0.tgz#ac4f90e5bad417c71477aa226caa7ba467ea5020"
integrity sha512-H+204XmLEg01R4QRDjKkX6gGx813aLkeQo5eC4Fn4eRyTr/rk+a5fJkA3XRum88gVcBsF/MvnAMLTC7eVUUdTw==
"@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/react-native-hw-transport-ble@5.51.1":
version "5.51.1"
resolved "https://registry.yarnpkg.com/@ledgerhq/react-native-hw-transport-ble/-/react-native-hw-transport-ble-5.51.1.tgz#c35b8d991b5acabecd29ea10f1640bcda4dc081c"
integrity sha512-2huXtp6IpPQ6+cDTWS7pKPt/P3hW31arf+Yy0s7Xz7+eZ1qIMr89HFo3e0zDiyRB9NZ3XfTfFMm6SRxR2WSrvw==
dependencies:
"@ledgerhq/devices" "^5.41.0"
"@ledgerhq/errors" "^5.41.0"
"@ledgerhq/hw-transport" "^5.41.0"
"@ledgerhq/logs" "^5.41.0"
"@ledgerhq/devices" "^5.51.1"
"@ledgerhq/errors" "^5.50.0"
"@ledgerhq/hw-transport" "^5.51.1"
"@ledgerhq/logs" "^5.50.0"
invariant "^2.2.4"
rxjs "^6.6.3"
rxjs "6"
uuid "^3.4.0"

"@mrmlnc/readdir-enhanced@^2.2.1":
Expand Down Expand Up @@ -8117,6 +8146,11 @@ events@^3.2.0:
resolved "https://registry.yarnpkg.com/events/-/events-3.2.0.tgz#93b87c18f8efcd4202a461aec4dfc0556b639379"
integrity sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==

events@^3.3.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400"
integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==

eventsource@^1.0.7:
version "1.0.7"
resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-1.0.7.tgz#8fbc72c93fcd34088090bc0a4e64f4b5cee6d8d0"
Expand Down Expand Up @@ -15054,6 +15088,13 @@ rx@^4.1.0:
resolved "https://registry.yarnpkg.com/rx/-/rx-4.1.0.tgz#a5f13ff79ef3b740fe30aa803fb09f98805d4782"
integrity sha1-pfE/957zt0D+MKqAP7CfmIBdR4I=

rxjs@6:
version "6.6.7"
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9"
integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==
dependencies:
tslib "^1.9.0"

rxjs@^6.4.0, rxjs@^6.5.3, rxjs@^6.5.5, rxjs@^6.6.3:
version "6.6.3"
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.3.tgz#8ca84635c4daa900c0d3967a6ee7ac60271ee552"
Expand Down Expand Up @@ -15198,6 +15239,13 @@ semver@^7.3.4:
dependencies:
lru-cache "^6.0.0"

semver@^7.3.5:
version "7.3.5"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7"
integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==
dependencies:
lru-cache "^6.0.0"

send@0.17.1:
version "0.17.1"
resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8"
Expand Down

0 comments on commit 3758968

Please sign in to comment.