Skip to content

Commit

Permalink
Fix ledger connecting (#544)
Browse files Browse the repository at this point in the history
* Upgrade cosmjs dep

* Fix ledger detect signer
  • Loading branch information
abefernan authored Apr 5, 2022
1 parent 5756dbb commit 352798b
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 108 deletions.
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
"@capacitor/cli": "^3.2.5",
"@capacitor/core": "^3.2.5",
"@capacitor/ios": "^3.2.5",
"@cosmjs/cosmwasm-stargate": "^0.28.0-rc2",
"@cosmjs/crypto": "^0.28.0-rc2",
"@cosmjs/encoding": "^0.28.0-rc2",
"@cosmjs/faucet-client": "^0.28.0-rc2",
"@cosmjs/ledger-amino": "^0.28.0-rc2",
"@cosmjs/math": "^0.28.0-rc2",
"@cosmjs/proto-signing": "^0.28.0-rc2",
"@cosmjs/stargate": "^0.28.0-rc2",
"@cosmjs/tendermint-rpc": "^0.28.0-rc2",
"@cosmjs/cosmwasm-stargate": "^0.28.1",
"@cosmjs/crypto": "^0.28.1",
"@cosmjs/encoding": "^0.28.1",
"@cosmjs/faucet-client": "^0.28.1",
"@cosmjs/ledger-amino": "^0.28.1",
"@cosmjs/math": "^0.28.1",
"@cosmjs/proto-signing": "^0.28.1",
"@cosmjs/stargate": "^0.28.1",
"@cosmjs/tendermint-rpc": "^0.28.1",
"@craco/craco": "^6.4.0",
"@ledgerhq/hw-transport-webusb": "^6.24.1",
"@sentry/react": "^6.13.3",
Expand Down
2 changes: 1 addition & 1 deletion src/utils/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export function isKeplrSigner(signer?: OfflineDirectSigner | LedgerSigner): sign
}

export function isLedgerSigner(signer?: OfflineDirectSigner | LedgerSigner): signer is LedgerSigner {
return !!(signer as any)?.ledger;
return !!(signer as any)?.connector;
}

export function isWebSigner(signer?: OfflineDirectSigner | LedgerSigner): signer is OfflineDirectSigner {
Expand Down
199 changes: 101 additions & 98 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1676,157 +1676,160 @@
"@noble/hashes" "^1.0.0"
protobufjs "^6.8.8"

"@cosmjs/[email protected].0-rc2":
version "0.28.0-rc2"
resolved "https://registry.yarnpkg.com/@cosmjs/amino/-/amino-0.28.0-rc2.tgz#1a714a2334f1e8a4a1e2df4e41c3625d752496b7"
integrity sha512-9PwEE42HzmZ87ACB+g7Nj9YVYBPywBGGZ4+j3HiA96uXdQzdbsFZ27jn8mvujjdnZgY9PzgR9MnvMTGFkWgXcQ==
dependencies:
"@cosmjs/crypto" "0.28.0-rc2"
"@cosmjs/encoding" "0.28.0-rc2"
"@cosmjs/math" "0.28.0-rc2"
"@cosmjs/utils" "0.28.0-rc2"

"@cosmjs/cosmwasm-stargate@^0.28.0-rc2":
version "0.28.0-rc2"
resolved "https://registry.yarnpkg.com/@cosmjs/cosmwasm-stargate/-/cosmwasm-stargate-0.28.0-rc2.tgz#1dec7917c3ac93a4289c45e127cdba8ef7d534a5"
integrity sha512-6aLlvZjoQi6zoc4/d+Jcss7Ts9oczx5CsePX24Z+nF+UDi3JP8NwpdVCDhZODkXsJGaE/SjqJzw15Wv3H88Bhw==
dependencies:
"@cosmjs/amino" "0.28.0-rc2"
"@cosmjs/crypto" "0.28.0-rc2"
"@cosmjs/encoding" "0.28.0-rc2"
"@cosmjs/math" "0.28.0-rc2"
"@cosmjs/proto-signing" "0.28.0-rc2"
"@cosmjs/stargate" "0.28.0-rc2"
"@cosmjs/tendermint-rpc" "0.28.0-rc2"
"@cosmjs/utils" "0.28.0-rc2"
"@cosmjs/[email protected].1":
version "0.28.1"
resolved "https://registry.yarnpkg.com/@cosmjs/amino/-/amino-0.28.1.tgz#0a94732fbe84fb2291fcf29fa046cb0d73799a68"
integrity sha512-7CihIqU3YOE0dEa1e/dWDMetxmAjYa44P0trmU8cU5TU2JnCBPfjF4hZcTPfoZ4KXNKPQrqAWuLxy0YB6o/5/Q==
dependencies:
"@cosmjs/crypto" "0.28.1"
"@cosmjs/encoding" "0.28.1"
"@cosmjs/math" "0.28.1"
"@cosmjs/utils" "0.28.1"

"@cosmjs/cosmwasm-stargate@^0.28.1":
version "0.28.1"
resolved "https://registry.yarnpkg.com/@cosmjs/cosmwasm-stargate/-/cosmwasm-stargate-0.28.1.tgz#4ee1f0ffbf8152aa310413413e82a5ff8dd39925"
integrity sha512-3zDRQnoFo6v83rN8qjafUNkGXSqlos5uxKOoMMfhTHMh1KEBsK62m7sbEZeIHEOOIaV6Dw/eOa/JVQwLYcC+sw==
dependencies:
"@cosmjs/amino" "0.28.1"
"@cosmjs/crypto" "0.28.1"
"@cosmjs/encoding" "0.28.1"
"@cosmjs/math" "0.28.1"
"@cosmjs/proto-signing" "0.28.1"
"@cosmjs/stargate" "0.28.1"
"@cosmjs/tendermint-rpc" "0.28.1"
"@cosmjs/utils" "0.28.1"
cosmjs-types "^0.4.0"
long "^4.0.0"
pako "^2.0.2"
protobufjs "~6.10.2"

"@cosmjs/[email protected].0-rc2", "@cosmjs/crypto@^0.28.0-rc2":
version "0.28.0-rc2"
resolved "https://registry.yarnpkg.com/@cosmjs/crypto/-/crypto-0.28.0-rc2.tgz#972fc60c8b9cca9a901e55af405bb89b68558f7d"
integrity sha512-klBZKe8DLJa73wIg7XiylIvRdrxGihB6/opcwQNBal0F3f4lwUNDRea6vvscO/ILtmXU68/+2P+GjEhBMdPUxQ==
"@cosmjs/[email protected].1", "@cosmjs/crypto@^0.28.1":
version "0.28.1"
resolved "https://registry.yarnpkg.com/@cosmjs/crypto/-/crypto-0.28.1.tgz#2c7ec4bbda6dd23eee7171e5897588203c5610f6"
integrity sha512-QLgP+xvd3X4vNU9PPnEGc1PI5qctgg1o6ANivqHgiJdX2bFolsqCqFQDs1rvGf8GWLJ2eGwXZPX1c/QK0bT9+A==
dependencies:
"@cosmjs/encoding" "0.28.0-rc2"
"@cosmjs/math" "0.28.0-rc2"
"@cosmjs/utils" "0.28.0-rc2"
"@cosmjs/encoding" "0.28.1"
"@cosmjs/math" "0.28.1"
"@cosmjs/utils" "0.28.1"
"@noble/hashes" "^1"
bn.js "^5.2.0"
elliptic "^6.5.3"
libsodium-wrappers "^0.7.6"

"@cosmjs/[email protected].0-rc2", "@cosmjs/encoding@^0.28.0-rc2":
version "0.28.0-rc2"
resolved "https://registry.yarnpkg.com/@cosmjs/encoding/-/encoding-0.28.0-rc2.tgz#40267f3a7c8a24963f50f67679733958c8324cab"
integrity sha512-/R+rnqn/47tQj6wGDYZzBonTsWJ4kHaPev9dmBPBOSVk0yAW9VliPsqpBjtYxGSoTq8onugFiUNgMq8hLuZ/5A==
"@cosmjs/[email protected].1", "@cosmjs/encoding@^0.28.1":
version "0.28.1"
resolved "https://registry.yarnpkg.com/@cosmjs/encoding/-/encoding-0.28.1.tgz#e7214a29d73847c23e5ae28adeec081c3b1e0f92"
integrity sha512-FqKc+P5rBKq8hW2WHF6L8dmSJhy9mVBDhnJNCLUwyiKBywY9m4BZNTa0mPVQSXISx/c5DPbpJ5SChGL72qNgBw==
dependencies:
base64-js "^1.3.0"
bech32 "^1.1.4"
readonly-date "^1.0.0"

"@cosmjs/faucet-client@^0.28.0-rc2":
version "0.28.0-rc2"
resolved "https://registry.yarnpkg.com/@cosmjs/faucet-client/-/faucet-client-0.28.0-rc2.tgz#42e8fe74ec5d5443f319248eb4ce014ce28075e8"
integrity sha512-ZgithdQns4t/9Vicdbb3jf3M6pnnct0T0Io//QWcldbpyZROkLtlsaEiBgVE7UfHyiZ+3h8uRTa623ezfjicJg==
"@cosmjs/faucet-client@^0.28.1":
version "0.28.1"
resolved "https://registry.yarnpkg.com/@cosmjs/faucet-client/-/faucet-client-0.28.1.tgz#e71faee16b714480e0a91d0dd4eb44d65b233dfc"
integrity sha512-A/s5b91aF9vhNRmeNWqFUpOc28AeInCzaLyQhs2SPa1reYNHLGey4MeGOQOc0HPof4w4ZgLq/t4fZ9TsXuvP8Q==
dependencies:
axios "^0.21.2"

"@cosmjs/[email protected].0-rc2":
version "0.28.0-rc2"
resolved "https://registry.yarnpkg.com/@cosmjs/json-rpc/-/json-rpc-0.28.0-rc2.tgz#4f00b7bdc50f823fe2376cb9ec68a22b951629b8"
integrity sha512-4U3pRWsVlRuW9qmXwQSU2+ieaDf29iYvMSinhnAsGMo9dnaV9oaEsaJXePJZuYW1pdOXF6ro1eePrys75PQw2Q==
"@cosmjs/[email protected].1":
version "0.28.1"
resolved "https://registry.yarnpkg.com/@cosmjs/json-rpc/-/json-rpc-0.28.1.tgz#dfe96c366500ba5747668adfe1c0dfa7343f1aed"
integrity sha512-yuOxhrE5ldJDcXhSbtdadAB5GBOGZkcDnZe+v70KcRf09qM81XPYiYfoMsxO9rb1QzThLlAbBx/kRebtzZPwDw==
dependencies:
"@cosmjs/stream" "0.28.0-rc2"
"@cosmjs/stream" "0.28.1"
xstream "^11.14.0"

"@cosmjs/ledger-amino@^0.28.0-rc2":
version "0.28.0-rc2"
resolved "https://registry.yarnpkg.com/@cosmjs/ledger-amino/-/ledger-amino-0.28.0-rc2.tgz#682cc3857b6cb2fa2ae9c36df9fad6a852a4b223"
integrity sha512-b3ai7dAIiJuXM65z0JzEzBnDpQLmwoh33Z0sX4z1hI9QJcbtMuXhrxsbtI07+5+z6iqXReLekXz3bHE5yc3npg==
"@cosmjs/ledger-amino@^0.28.1":
version "0.28.1"
resolved "https://registry.yarnpkg.com/@cosmjs/ledger-amino/-/ledger-amino-0.28.1.tgz#19ceae86983483f852292fbc933d10dc1aea452d"
integrity sha512-pPC36LbeHgr0a6xrumwrjUffWt9ueQsBTeSMBmY3rIHHRiBZQVgvR4pta1G0RpwHDotFM6jHzvyWW/ZCeq9rZg==
dependencies:
"@cosmjs/amino" "0.28.0-rc2"
"@cosmjs/crypto" "0.28.0-rc2"
"@cosmjs/encoding" "0.28.0-rc2"
"@cosmjs/math" "0.28.0-rc2"
"@cosmjs/utils" "0.28.0-rc2"
"@cosmjs/amino" "0.28.1"
"@cosmjs/crypto" "0.28.1"
"@cosmjs/encoding" "0.28.1"
"@cosmjs/math" "0.28.1"
"@cosmjs/utils" "0.28.1"
ledger-cosmos-js "^2.1.8"
semver "^7.3.2"

"@cosmjs/[email protected].0-rc2", "@cosmjs/math@^0.28.0-rc2":
version "0.28.0-rc2"
resolved "https://registry.yarnpkg.com/@cosmjs/math/-/math-0.28.0-rc2.tgz#a636c265099691229de5dc0152249d5ee11ec84b"
integrity sha512-2y/NXigdA2L9DZ1NF9an+oJtRyg91xKsyvgHKOr8FoP+AxROtnR0KwbJ0UBWStnbyNNT0fVuO2czKaombOHL0A==
"@cosmjs/[email protected].1", "@cosmjs/math@^0.28.1":
version "0.28.1"
resolved "https://registry.yarnpkg.com/@cosmjs/math/-/math-0.28.1.tgz#3f2bbf14674f7a0f70a09413ba0bba140e77f1cc"
integrity sha512-rF5q4BSwNBo0kNBi8asaoHsRx/TchJ/P4IlRjXY8UGCfKCkSRQEID3ffgE8naXf+BDn5x4cSC8da3xy/aCZpAA==
dependencies:
bn.js "^5.2.0"

"@cosmjs/[email protected].0-rc2", "@cosmjs/proto-signing@^0.28.0-rc2":
version "0.28.0-rc2"
resolved "https://registry.yarnpkg.com/@cosmjs/proto-signing/-/proto-signing-0.28.0-rc2.tgz#d98a02b16a6af08bedca1ec3da9480050480806f"
integrity sha512-3w5BX5zGiq59Jb5mPMTpmudGYDyvOl4CC30CEYhHORw+cIQ9nCkdsZJGSyfcmahI6b48xmlgfEBdBBUTEoCbKg==
"@cosmjs/[email protected].1", "@cosmjs/proto-signing@^0.28.1":
version "0.28.1"
resolved "https://registry.yarnpkg.com/@cosmjs/proto-signing/-/proto-signing-0.28.1.tgz#3be18f639b22d14c1c97a85f31cad27c439895c1"
integrity sha512-dmBVV/b3x2mxwiEEdLFBpagr6R/X74R0AJLCxaKDwK4FpI4vSz84pOe5J6c9ffHHXnWp129M+pRBBE2S9tK0Cg==
dependencies:
"@cosmjs/amino" "0.28.0-rc2"
"@cosmjs/crypto" "0.28.0-rc2"
"@cosmjs/math" "0.28.0-rc2"
"@cosmjs/amino" "0.28.1"
"@cosmjs/crypto" "0.28.1"
"@cosmjs/encoding" "0.28.1"
"@cosmjs/math" "0.28.1"
"@cosmjs/utils" "0.28.1"
cosmjs-types "^0.4.0"
long "^4.0.0"
protobufjs "~6.10.2"

"@cosmjs/[email protected].0-rc2":
version "0.28.0-rc2"
resolved "https://registry.yarnpkg.com/@cosmjs/socket/-/socket-0.28.0-rc2.tgz#8cabb8d1c52766441aeedd5a5ebcb8b2d265c39d"
integrity sha512-Aj97kBPTOMInmDu7B2v1t0WN/b3+/06K2v3CtD2mNFTq1GI9ajQPTxm1gZk0CubEJZTax8fMg0//li6260VQiw==
"@cosmjs/[email protected].1":
version "0.28.1"
resolved "https://registry.yarnpkg.com/@cosmjs/socket/-/socket-0.28.1.tgz#aa96663e6a4b30f60f628a5c1caf05cbdd813005"
integrity sha512-fFClGMOdBF3Jsti929AXoywsu6TtEKALxmwPvRYEsbrurLy9Ko28qoWdPFUvQw5WEy5rkzDq+3DKK5tbzsbQNA==
dependencies:
"@cosmjs/stream" "0.28.0-rc2"
"@cosmjs/stream" "0.28.1"
isomorphic-ws "^4.0.1"
ws "^7"
xstream "^11.14.0"

"@cosmjs/[email protected].0-rc2", "@cosmjs/stargate@^0.28.0-rc2":
version "0.28.0-rc2"
resolved "https://registry.yarnpkg.com/@cosmjs/stargate/-/stargate-0.28.0-rc2.tgz#cbed3ac1d2b995624b91187b3e320dd7cb618299"
integrity sha512-qznS45R8JDE5zbW0MuZot0dD/mE1SiNEdo36yexHhvaWcwPKRxHrgj5VvgSQi0PhvVQBobVgvrxp/5Ptzo3caQ==
"@cosmjs/[email protected].1", "@cosmjs/stargate@^0.28.1":
version "0.28.1"
resolved "https://registry.yarnpkg.com/@cosmjs/stargate/-/stargate-0.28.1.tgz#a4f8dab2e3c288edc853f6a7f24f034e0f0d0dde"
integrity sha512-6mHHI2pkqb/khRTWRATODNieEv3PFhnUKgxkdiw39111oN35TTuSwxpT1c2le/VheoiaSZtBotDgL60wUP9LGA==
dependencies:
"@confio/ics23" "^0.6.8"
"@cosmjs/amino" "0.28.0-rc2"
"@cosmjs/encoding" "0.28.0-rc2"
"@cosmjs/math" "0.28.0-rc2"
"@cosmjs/proto-signing" "0.28.0-rc2"
"@cosmjs/stream" "0.28.0-rc2"
"@cosmjs/tendermint-rpc" "0.28.0-rc2"
"@cosmjs/utils" "0.28.0-rc2"
"@cosmjs/amino" "0.28.1"
"@cosmjs/encoding" "0.28.1"
"@cosmjs/math" "0.28.1"
"@cosmjs/proto-signing" "0.28.1"
"@cosmjs/stream" "0.28.1"
"@cosmjs/tendermint-rpc" "0.28.1"
"@cosmjs/utils" "0.28.1"
cosmjs-types "^0.4.0"
long "^4.0.0"
protobufjs "~6.10.2"
xstream "^11.14.0"

"@cosmjs/[email protected].0-rc2":
version "0.28.0-rc2"
resolved "https://registry.yarnpkg.com/@cosmjs/stream/-/stream-0.28.0-rc2.tgz#dfe417747c5e132e9afb79e372f4cb8db4efe63c"
integrity sha512-x9J1+ebRwNVKUa2NlV7n6qu3oo+zlmzrOrnoWYTGrRyV1Kq3xAPOoxj2kpFIa7P4yMUtjEnpivtPpW3pzZZlXA==
"@cosmjs/[email protected].1":
version "0.28.1"
resolved "https://registry.yarnpkg.com/@cosmjs/stream/-/stream-0.28.1.tgz#4b2fd7dcd99cfa53b2678059458b7125581ec2ad"
integrity sha512-lhgPI+vjpnwUOrLJADAA9YReMwbDCohIhuMhXiyXTnJfnUcitTh882LeRueyuynXW7zT1qjzZk1MgdumbDeXiA==
dependencies:
xstream "^11.14.0"

"@cosmjs/[email protected]", "@cosmjs/tendermint-rpc@^0.28.0-rc2":
version "0.28.0-rc2"
resolved "https://registry.yarnpkg.com/@cosmjs/tendermint-rpc/-/tendermint-rpc-0.28.0-rc2.tgz#dbe7a198dbcd9046e8b79ed8d7457d8d7dc1700f"
integrity sha512-E0obk+qB3Rh9zVT8+Hu40fgAK+EbbXM0NU6uPjF903akP9fhGuNQWlOICQ4pMZE7Wk9NWBjiK2w8ee6B7xGPPg==
dependencies:
"@cosmjs/crypto" "0.28.0-rc2"
"@cosmjs/encoding" "0.28.0-rc2"
"@cosmjs/json-rpc" "0.28.0-rc2"
"@cosmjs/math" "0.28.0-rc2"
"@cosmjs/socket" "0.28.0-rc2"
"@cosmjs/stream" "0.28.0-rc2"
"@cosmjs/[email protected]", "@cosmjs/tendermint-rpc@^0.28.1":
version "0.28.1"
resolved "https://registry.yarnpkg.com/@cosmjs/tendermint-rpc/-/tendermint-rpc-0.28.1.tgz#ef69df48f2bbbba6567c53e2060fa70ad0600a9c"
integrity sha512-2Mt3Hd0Lp8BB6jnkiWr0U5oDRwOl3pueVFkCgv6XIUX8OKY48o97KOQrqW1BDAMYSL7QuXF7ULpvmRgfJqIxeA==
dependencies:
"@cosmjs/crypto" "0.28.1"
"@cosmjs/encoding" "0.28.1"
"@cosmjs/json-rpc" "0.28.1"
"@cosmjs/math" "0.28.1"
"@cosmjs/socket" "0.28.1"
"@cosmjs/stream" "0.28.1"
"@cosmjs/utils" "0.28.1"
axios "^0.21.2"
readonly-date "^1.0.0"
xstream "^11.14.0"

"@cosmjs/[email protected].0-rc2":
version "0.28.0-rc2"
resolved "https://registry.yarnpkg.com/@cosmjs/utils/-/utils-0.28.0-rc2.tgz#e4d7c60e1efb62f042e9445d5353b074b1e6e3c3"
integrity sha512-WsCZPtyWn63oAy69pJOHGV9wwDhgMKltkJOrQwLPAx1aMOtCy0Q5irbu5X7pqmc57m/K9pSr9jehsrsIEeVVVg==
"@cosmjs/[email protected].1":
version "0.28.1"
resolved "https://registry.yarnpkg.com/@cosmjs/utils/-/utils-0.28.1.tgz#3c5043c6b4f92a2eba1aba63bed737b542b21662"
integrity sha512-PhdsifctdpMUXeWQjbQiHeOCOhWtK/OXdEG3E2PvvYxlmWHNu1faio+u2gZU6PPjL+qgqlAu92sybwsw/TRa+w==

"@craco/craco@^6.4.0":
version "6.4.0"
Expand Down

0 comments on commit 352798b

Please sign in to comment.