@ledgerhq/live-common 27.0.0 → 27.0.1-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (405) hide show
  1. package/lib/__tests__/families/bitcoin/wallet-btc/xpub.syncing.integration.test.js +2 -2
  2. package/lib/__tests__/test-helpers/environment.d.ts +2 -0
  3. package/lib/__tests__/test-helpers/environment.d.ts.map +1 -0
  4. package/lib/__tests__/test-helpers/environment.js +107 -0
  5. package/lib/__tests__/test-helpers/environment.js.map +1 -0
  6. package/lib/__tests__/test-helpers/setup.d.ts +1 -1
  7. package/lib/__tests__/test-helpers/setup.d.ts.map +1 -1
  8. package/lib/__tests__/test-helpers/setup.js +1 -101
  9. package/lib/__tests__/test-helpers/setup.js.map +1 -1
  10. package/lib/account/serialization.d.ts.map +1 -1
  11. package/lib/account/serialization.js +83 -40
  12. package/lib/account/serialization.js.map +1 -1
  13. package/lib/bot/bot-test-context.d.ts +3 -0
  14. package/lib/bot/bot-test-context.d.ts.map +1 -0
  15. package/lib/bot/bot-test-context.js +26 -0
  16. package/lib/bot/bot-test-context.js.map +1 -0
  17. package/lib/bot/bot-test-context.test.d.ts +2 -0
  18. package/lib/bot/bot-test-context.test.d.ts.map +1 -0
  19. package/lib/bot/bot-test-context.test.js +41 -0
  20. package/lib/bot/bot-test-context.test.js.map +1 -0
  21. package/lib/bot/cli.d.ts +2 -0
  22. package/lib/bot/cli.d.ts.map +1 -0
  23. package/lib/bot/cli.js +14 -0
  24. package/lib/bot/cli.js.map +1 -0
  25. package/lib/bot/engine.d.ts +5 -5
  26. package/lib/bot/engine.d.ts.map +1 -1
  27. package/lib/bot/engine.js +161 -112
  28. package/lib/bot/engine.js.map +1 -1
  29. package/lib/bot/formatters.d.ts +2 -2
  30. package/lib/bot/formatters.d.ts.map +1 -1
  31. package/lib/bot/formatters.js +41 -15
  32. package/lib/bot/formatters.js.map +1 -1
  33. package/lib/bot/index.d.ts +1 -1
  34. package/lib/bot/index.d.ts.map +1 -1
  35. package/lib/bot/index.js +90 -15
  36. package/lib/bot/index.js.map +1 -1
  37. package/lib/bot/specs.d.ts +2 -1
  38. package/lib/bot/specs.d.ts.map +1 -1
  39. package/lib/bot/specs.js +13 -9
  40. package/lib/bot/specs.js.map +1 -1
  41. package/lib/bot/types.d.ts +5 -2
  42. package/lib/bot/types.d.ts.map +1 -1
  43. package/lib/countervalues/logic.integration.test.js +65 -0
  44. package/lib/countervalues/logic.integration.test.js.map +1 -1
  45. package/lib/countervalues/modules/weth.d.ts.map +1 -1
  46. package/lib/countervalues/modules/weth.js +5 -10
  47. package/lib/countervalues/modules/weth.js.map +1 -1
  48. package/lib/currencies/sortByMarketcap.d.ts +0 -2
  49. package/lib/currencies/sortByMarketcap.d.ts.map +1 -1
  50. package/lib/currencies/sortByMarketcap.js +3 -17
  51. package/lib/currencies/sortByMarketcap.js.map +1 -1
  52. package/lib/currencies/sortByMarketcap.test.js +0 -5
  53. package/lib/currencies/sortByMarketcap.test.js.map +1 -1
  54. package/lib/env.js +1 -1
  55. package/lib/families/algorand/specs.d.ts.map +1 -1
  56. package/lib/families/algorand/specs.js +18 -10
  57. package/lib/families/algorand/specs.js.map +1 -1
  58. package/lib/families/algorand/speculos-deviceActions.d.ts +1 -4
  59. package/lib/families/algorand/speculos-deviceActions.d.ts.map +1 -1
  60. package/lib/families/algorand/speculos-deviceActions.js +25 -8
  61. package/lib/families/algorand/speculos-deviceActions.js.map +1 -1
  62. package/lib/families/bitcoin/bridge/mock.d.ts.map +1 -1
  63. package/lib/families/bitcoin/bridge/mock.js +6 -1
  64. package/lib/families/bitcoin/bridge/mock.js.map +1 -1
  65. package/lib/families/bitcoin/datasets/bitcoin_cash.d.ts.map +1 -1
  66. package/lib/families/bitcoin/datasets/bitcoin_cash.js +1 -1
  67. package/lib/families/bitcoin/datasets/bitcoin_cash.js.map +1 -1
  68. package/lib/families/bitcoin/datasets/dash.d.ts.map +1 -1
  69. package/lib/families/bitcoin/datasets/dash.js +1 -1
  70. package/lib/families/bitcoin/datasets/dash.js.map +1 -1
  71. package/lib/families/bitcoin/datasets/decred.d.ts.map +1 -1
  72. package/lib/families/bitcoin/datasets/decred.js +1 -1
  73. package/lib/families/bitcoin/datasets/decred.js.map +1 -1
  74. package/lib/families/bitcoin/datasets/digibyte.d.ts.map +1 -1
  75. package/lib/families/bitcoin/datasets/digibyte.js +8 -2
  76. package/lib/families/bitcoin/datasets/digibyte.js.map +1 -1
  77. package/lib/families/bitcoin/datasets/dogecoin.d.ts.map +1 -1
  78. package/lib/families/bitcoin/datasets/dogecoin.js +1 -1
  79. package/lib/families/bitcoin/datasets/dogecoin.js.map +1 -1
  80. package/lib/families/bitcoin/datasets/komodo.js +1 -1
  81. package/lib/families/bitcoin/datasets/komodo.js.map +1 -1
  82. package/lib/families/bitcoin/datasets/litecoin.d.ts.map +1 -1
  83. package/lib/families/bitcoin/datasets/litecoin.js +8 -2
  84. package/lib/families/bitcoin/datasets/litecoin.js.map +1 -1
  85. package/lib/families/bitcoin/datasets/peercoin.js +1 -1
  86. package/lib/families/bitcoin/datasets/peercoin.js.map +1 -1
  87. package/lib/families/bitcoin/datasets/pivx.js +1 -1
  88. package/lib/families/bitcoin/datasets/pivx.js.map +1 -1
  89. package/lib/families/bitcoin/datasets/qtum.js +1 -1
  90. package/lib/families/bitcoin/datasets/qtum.js.map +1 -1
  91. package/lib/families/bitcoin/datasets/stakenet.d.ts.map +1 -1
  92. package/lib/families/bitcoin/datasets/stakenet.js +1 -1
  93. package/lib/families/bitcoin/datasets/stakenet.js.map +1 -1
  94. package/lib/families/bitcoin/datasets/vertcoin.d.ts.map +1 -1
  95. package/lib/families/bitcoin/datasets/vertcoin.js +1 -1
  96. package/lib/families/bitcoin/datasets/vertcoin.js.map +1 -1
  97. package/lib/families/bitcoin/datasets/viacoin.d.ts.map +1 -1
  98. package/lib/families/bitcoin/datasets/viacoin.js +1 -1
  99. package/lib/families/bitcoin/datasets/viacoin.js.map +1 -1
  100. package/lib/families/bitcoin/datasets/zcash.d.ts.map +1 -1
  101. package/lib/families/bitcoin/datasets/zcash.js +1 -1
  102. package/lib/families/bitcoin/datasets/zcash.js.map +1 -1
  103. package/lib/families/bitcoin/datasets/zencash.d.ts.map +1 -1
  104. package/lib/families/bitcoin/datasets/zencash.js +1 -1
  105. package/lib/families/bitcoin/datasets/zencash.js.map +1 -1
  106. package/lib/families/bitcoin/platformAdapter.test.d.ts +2 -0
  107. package/lib/families/bitcoin/platformAdapter.test.d.ts.map +1 -0
  108. package/lib/families/bitcoin/platformAdapter.test.js +48 -0
  109. package/lib/families/bitcoin/platformAdapter.test.js.map +1 -0
  110. package/lib/families/bitcoin/specs.d.ts.map +1 -1
  111. package/lib/families/bitcoin/specs.js +62 -24
  112. package/lib/families/bitcoin/specs.js.map +1 -1
  113. package/lib/families/bitcoin/speculos-deviceActions.d.ts +1 -4
  114. package/lib/families/bitcoin/speculos-deviceActions.d.ts.map +1 -1
  115. package/lib/families/bitcoin/speculos-deviceActions.js +2 -4
  116. package/lib/families/bitcoin/speculos-deviceActions.js.map +1 -1
  117. package/lib/families/cardano/js-estimateMaxSpendable.js +1 -1
  118. package/lib/families/cardano/js-estimateMaxSpendable.js.map +1 -1
  119. package/lib/families/cardano/specs.d.ts.map +1 -1
  120. package/lib/families/cardano/specs.js +19 -8
  121. package/lib/families/cardano/specs.js.map +1 -1
  122. package/lib/families/cardano/speculos-deviceActions.d.ts +1 -4
  123. package/lib/families/cardano/speculos-deviceActions.d.ts.map +1 -1
  124. package/lib/families/cardano/speculos-deviceActions.js +2 -2
  125. package/lib/families/cardano/speculos-deviceActions.js.map +1 -1
  126. package/lib/families/celo/specs.d.ts.map +1 -1
  127. package/lib/families/celo/specs.js +2 -0
  128. package/lib/families/celo/specs.js.map +1 -1
  129. package/lib/families/celo/speculos-deviceActions.d.ts +1 -4
  130. package/lib/families/celo/speculos-deviceActions.d.ts.map +1 -1
  131. package/lib/families/celo/speculos-deviceActions.js +2 -4
  132. package/lib/families/celo/speculos-deviceActions.js.map +1 -1
  133. package/lib/families/cosmos/specs.d.ts.map +1 -1
  134. package/lib/families/cosmos/specs.js +41 -25
  135. package/lib/families/cosmos/specs.js.map +1 -1
  136. package/lib/families/cosmos/speculos-deviceActions.d.ts +1 -4
  137. package/lib/families/cosmos/speculos-deviceActions.d.ts.map +1 -1
  138. package/lib/families/cosmos/speculos-deviceActions.js +2 -4
  139. package/lib/families/cosmos/speculos-deviceActions.js.map +1 -1
  140. package/lib/families/crypto_org/specs.d.ts.map +1 -1
  141. package/lib/families/crypto_org/specs.js +3 -0
  142. package/lib/families/crypto_org/specs.js.map +1 -1
  143. package/lib/families/crypto_org/speculos-deviceActions.d.ts +1 -4
  144. package/lib/families/crypto_org/speculos-deviceActions.d.ts.map +1 -1
  145. package/lib/families/crypto_org/speculos-deviceActions.js +2 -2
  146. package/lib/families/crypto_org/speculos-deviceActions.js.map +1 -1
  147. package/lib/families/elrond/specs.d.ts.map +1 -1
  148. package/lib/families/elrond/specs.js +15 -2
  149. package/lib/families/elrond/specs.js.map +1 -1
  150. package/lib/families/elrond/speculos-deviceActions.d.ts +1 -4
  151. package/lib/families/elrond/speculos-deviceActions.d.ts.map +1 -1
  152. package/lib/families/elrond/speculos-deviceActions.js +2 -4
  153. package/lib/families/elrond/speculos-deviceActions.js.map +1 -1
  154. package/lib/families/ethereum/platformAdapter.test.d.ts +2 -0
  155. package/lib/families/ethereum/platformAdapter.test.d.ts.map +1 -0
  156. package/lib/families/ethereum/platformAdapter.test.js +88 -0
  157. package/lib/families/ethereum/platformAdapter.test.js.map +1 -0
  158. package/lib/families/ethereum/specs.d.ts.map +1 -1
  159. package/lib/families/ethereum/specs.js +36 -12
  160. package/lib/families/ethereum/specs.js.map +1 -1
  161. package/lib/families/ethereum/speculos-deviceActions.d.ts +1 -4
  162. package/lib/families/ethereum/speculos-deviceActions.d.ts.map +1 -1
  163. package/lib/families/ethereum/speculos-deviceActions.js +2 -4
  164. package/lib/families/ethereum/speculos-deviceActions.js.map +1 -1
  165. package/lib/families/filecoin/specs.d.ts.map +1 -1
  166. package/lib/families/filecoin/specs.js +2 -0
  167. package/lib/families/filecoin/specs.js.map +1 -1
  168. package/lib/families/filecoin/speculos-deviceActions.d.ts +1 -4
  169. package/lib/families/filecoin/speculos-deviceActions.d.ts.map +1 -1
  170. package/lib/families/filecoin/speculos-deviceActions.js +2 -2
  171. package/lib/families/filecoin/speculos-deviceActions.js.map +1 -1
  172. package/lib/families/hedera/specs.d.ts.map +1 -1
  173. package/lib/families/hedera/specs.js +11 -3
  174. package/lib/families/hedera/specs.js.map +1 -1
  175. package/lib/families/hedera/speculos-deviceActions.d.ts +1 -4
  176. package/lib/families/hedera/speculos-deviceActions.d.ts.map +1 -1
  177. package/lib/families/hedera/speculos-deviceActions.js +4 -4
  178. package/lib/families/hedera/speculos-deviceActions.js.map +1 -1
  179. package/lib/families/osmosis/specs.d.ts.map +1 -1
  180. package/lib/families/osmosis/specs.js +13 -5
  181. package/lib/families/osmosis/specs.js.map +1 -1
  182. package/lib/families/osmosis/speculos-deviceActions.d.ts +1 -4
  183. package/lib/families/osmosis/speculos-deviceActions.d.ts.map +1 -1
  184. package/lib/families/osmosis/speculos-deviceActions.js +2 -4
  185. package/lib/families/osmosis/speculos-deviceActions.js.map +1 -1
  186. package/lib/families/polkadot/platformAdapter.test.d.ts +2 -0
  187. package/lib/families/polkadot/platformAdapter.test.d.ts.map +1 -0
  188. package/lib/families/polkadot/platformAdapter.test.js +51 -0
  189. package/lib/families/polkadot/platformAdapter.test.js.map +1 -0
  190. package/lib/families/polkadot/specs.d.ts.map +1 -1
  191. package/lib/families/polkadot/specs.js +12 -1
  192. package/lib/families/polkadot/specs.js.map +1 -1
  193. package/lib/families/polkadot/speculos-deviceActions.d.ts +1 -4
  194. package/lib/families/polkadot/speculos-deviceActions.d.ts.map +1 -1
  195. package/lib/families/polkadot/speculos-deviceActions.js +2 -4
  196. package/lib/families/polkadot/speculos-deviceActions.js.map +1 -1
  197. package/lib/families/ripple/platformAdapter.test.d.ts +2 -0
  198. package/lib/families/ripple/platformAdapter.test.d.ts.map +1 -0
  199. package/lib/families/ripple/platformAdapter.test.js +51 -0
  200. package/lib/families/ripple/platformAdapter.test.js.map +1 -0
  201. package/lib/families/ripple/specs.d.ts.map +1 -1
  202. package/lib/families/ripple/specs.js +9 -4
  203. package/lib/families/ripple/specs.js.map +1 -1
  204. package/lib/families/ripple/speculos-deviceActions.d.ts +1 -4
  205. package/lib/families/ripple/speculos-deviceActions.d.ts.map +1 -1
  206. package/lib/families/ripple/speculos-deviceActions.js +2 -4
  207. package/lib/families/ripple/speculos-deviceActions.js.map +1 -1
  208. package/lib/families/solana/specs.d.ts.map +1 -1
  209. package/lib/families/solana/specs.js +29 -11
  210. package/lib/families/solana/specs.js.map +1 -1
  211. package/lib/families/solana/speculos-deviceActions.d.ts +0 -5
  212. package/lib/families/solana/speculos-deviceActions.d.ts.map +1 -1
  213. package/lib/families/solana/speculos-deviceActions.js +0 -4
  214. package/lib/families/solana/speculos-deviceActions.js.map +1 -1
  215. package/lib/families/stellar/api/horizon.d.ts.map +1 -1
  216. package/lib/families/stellar/api/horizon.js +15 -10
  217. package/lib/families/stellar/api/horizon.js.map +1 -1
  218. package/lib/families/stellar/specs.d.ts.map +1 -1
  219. package/lib/families/stellar/specs.js +30 -12
  220. package/lib/families/stellar/specs.js.map +1 -1
  221. package/lib/families/stellar/speculos-deviceActions.d.ts +1 -4
  222. package/lib/families/stellar/speculos-deviceActions.d.ts.map +1 -1
  223. package/lib/families/stellar/speculos-deviceActions.js +2 -4
  224. package/lib/families/stellar/speculos-deviceActions.js.map +1 -1
  225. package/lib/families/tezos/bakers.whitelist-default.d.ts.map +1 -1
  226. package/lib/families/tezos/bakers.whitelist-default.js +1 -1
  227. package/lib/families/tezos/bakers.whitelist-default.js.map +1 -1
  228. package/lib/families/tezos/specs.d.ts.map +1 -1
  229. package/lib/families/tezos/specs.js +2 -0
  230. package/lib/families/tezos/specs.js.map +1 -1
  231. package/lib/families/tezos/speculos-deviceActions.d.ts +1 -4
  232. package/lib/families/tezos/speculos-deviceActions.d.ts.map +1 -1
  233. package/lib/families/tezos/speculos-deviceActions.js +2 -2
  234. package/lib/families/tezos/speculos-deviceActions.js.map +1 -1
  235. package/lib/families/tron/specs.d.ts.map +1 -1
  236. package/lib/families/tron/specs.js +49 -17
  237. package/lib/families/tron/specs.js.map +1 -1
  238. package/lib/families/tron/speculos-deviceActions.d.ts +1 -4
  239. package/lib/families/tron/speculos-deviceActions.d.ts.map +1 -1
  240. package/lib/families/tron/speculos-deviceActions.js +2 -4
  241. package/lib/families/tron/speculos-deviceActions.js.map +1 -1
  242. package/lib/hw/getGenuineCheckFromDeviceId.d.ts +22 -0
  243. package/lib/hw/getGenuineCheckFromDeviceId.d.ts.map +1 -0
  244. package/lib/hw/getGenuineCheckFromDeviceId.js +49 -0
  245. package/lib/hw/getGenuineCheckFromDeviceId.js.map +1 -0
  246. package/lib/hw/getGenuineCheckFromDeviceId.test.d.ts +2 -0
  247. package/lib/hw/getGenuineCheckFromDeviceId.test.d.ts.map +1 -0
  248. package/lib/hw/getGenuineCheckFromDeviceId.test.js +84 -0
  249. package/lib/hw/getGenuineCheckFromDeviceId.test.js.map +1 -0
  250. package/lib/hw/getLatestAvailableFirmwareFromDeviceId.d.ts +17 -0
  251. package/lib/hw/getLatestAvailableFirmwareFromDeviceId.d.ts.map +1 -0
  252. package/lib/hw/getLatestAvailableFirmwareFromDeviceId.js +27 -0
  253. package/lib/hw/getLatestAvailableFirmwareFromDeviceId.js.map +1 -0
  254. package/lib/hw/hooks/useGenuineCheck.d.ts +34 -0
  255. package/lib/hw/hooks/useGenuineCheck.d.ts.map +1 -0
  256. package/lib/hw/hooks/useGenuineCheck.js +115 -0
  257. package/lib/hw/hooks/useGenuineCheck.js.map +1 -0
  258. package/lib/hw/hooks/useGenuineCheck.test.d.ts +2 -0
  259. package/lib/hw/hooks/useGenuineCheck.test.d.ts.map +1 -0
  260. package/lib/hw/hooks/useGenuineCheck.test.js +316 -0
  261. package/lib/hw/hooks/useGenuineCheck.test.js.map +1 -0
  262. package/lib/hw/hooks/useGetLatestAvailableFirmware.d.ts +29 -0
  263. package/lib/hw/hooks/useGetLatestAvailableFirmware.d.ts.map +1 -0
  264. package/lib/hw/hooks/useGetLatestAvailableFirmware.js +72 -0
  265. package/lib/hw/hooks/useGetLatestAvailableFirmware.js.map +1 -0
  266. package/lib/hw/hooks/useGetLatestAvailableFirmware.test.d.ts +2 -0
  267. package/lib/hw/hooks/useGetLatestAvailableFirmware.test.d.ts.map +1 -0
  268. package/lib/hw/hooks/useGetLatestAvailableFirmware.test.js +155 -0
  269. package/lib/hw/hooks/useGetLatestAvailableFirmware.test.js.map +1 -0
  270. package/lib/load/speculos.d.ts +1 -0
  271. package/lib/load/speculos.d.ts.map +1 -1
  272. package/lib/load/speculos.js +2 -1
  273. package/lib/load/speculos.js.map +1 -1
  274. package/lib/mock/fixtures/cryptoCurrencies.d.ts +5 -0
  275. package/lib/mock/fixtures/cryptoCurrencies.d.ts.map +1 -0
  276. package/lib/mock/fixtures/cryptoCurrencies.js +91 -0
  277. package/lib/mock/fixtures/cryptoCurrencies.js.map +1 -0
  278. package/lib/platform/converters.test.js +44 -218
  279. package/lib/platform/converters.test.js.map +1 -1
  280. package/lib/platform/logic.d.ts +44 -0
  281. package/lib/platform/logic.d.ts.map +1 -1
  282. package/lib/platform/logic.js +147 -1
  283. package/lib/platform/logic.js.map +1 -1
  284. package/lib/platform/logic.test.d.ts +2 -0
  285. package/lib/platform/logic.test.d.ts.map +1 -0
  286. package/lib/platform/logic.test.js +903 -0
  287. package/lib/platform/logic.test.js.map +1 -0
  288. package/lib/platform/react.d.ts +6 -0
  289. package/lib/platform/react.d.ts.map +1 -1
  290. package/lib/platform/react.js +6 -0
  291. package/lib/platform/react.js.map +1 -1
  292. package/lib/platform/tracking.d.ts +1 -1
  293. package/lib/platform/tracking.d.ts.map +1 -1
  294. package/lib/platform/tracking.test.js +14 -41
  295. package/lib/platform/tracking.test.js.map +1 -1
  296. package/lib/reconciliation.d.ts.map +1 -1
  297. package/lib/reconciliation.js +28 -10
  298. package/lib/reconciliation.js.map +1 -1
  299. package/package.json +5 -6
  300. package/src/__tests__/families/bitcoin/wallet-btc/xpub.syncing.integration.test.ts +2 -2
  301. package/src/__tests__/test-helpers/environment.ts +91 -0
  302. package/src/__tests__/test-helpers/setup.ts +2 -91
  303. package/src/account/serialization.ts +103 -64
  304. package/src/bot/bot-test-context.test.ts +37 -0
  305. package/src/bot/bot-test-context.ts +24 -0
  306. package/src/bot/cli.ts +18 -0
  307. package/src/bot/engine.ts +109 -73
  308. package/src/bot/formatters.ts +40 -14
  309. package/src/bot/index.ts +124 -18
  310. package/src/bot/specs.ts +10 -5
  311. package/src/bot/types.ts +7 -3
  312. package/src/countervalues/logic.integration.test.ts +50 -0
  313. package/src/countervalues/modules/weth.ts +9 -12
  314. package/src/currencies/__snapshots__/sortByMarketcap.test.ts.snap +59 -1
  315. package/src/currencies/sortByMarketcap.test.ts +1 -12
  316. package/src/currencies/sortByMarketcap.ts +2 -22
  317. package/src/env.ts +1 -1
  318. package/src/families/algorand/__snapshots__/bridge.integration.test.ts.snap +733 -8
  319. package/src/families/algorand/specs.ts +26 -16
  320. package/src/families/algorand/speculos-deviceActions.ts +31 -10
  321. package/src/families/bitcoin/__snapshots__/bridge.integration.test.ts.snap +43309 -7957
  322. package/src/families/bitcoin/bridge/mock.ts +7 -1
  323. package/src/families/bitcoin/datasets/bitcoin_cash.ts +73 -13
  324. package/src/families/bitcoin/datasets/dash.ts +29 -17
  325. package/src/families/bitcoin/datasets/decred.ts +42 -12
  326. package/src/families/bitcoin/datasets/digibyte.ts +9 -3
  327. package/src/families/bitcoin/datasets/dogecoin.ts +29 -17
  328. package/src/families/bitcoin/datasets/komodo.ts +22 -22
  329. package/src/families/bitcoin/datasets/litecoin.ts +9 -3
  330. package/src/families/bitcoin/datasets/peercoin.ts +17 -17
  331. package/src/families/bitcoin/datasets/pivx.ts +17 -17
  332. package/src/families/bitcoin/datasets/qtum.ts +40 -40
  333. package/src/families/bitcoin/datasets/stakenet.ts +56 -26
  334. package/src/families/bitcoin/datasets/vertcoin.ts +43 -55
  335. package/src/families/bitcoin/datasets/viacoin.ts +35 -23
  336. package/src/families/bitcoin/datasets/zcash.ts +78 -12
  337. package/src/families/bitcoin/datasets/zencash.ts +56 -10
  338. package/src/families/bitcoin/platformAdapter.test.ts +58 -0
  339. package/src/families/bitcoin/specs.ts +81 -41
  340. package/src/families/bitcoin/speculos-deviceActions.ts +68 -69
  341. package/src/families/cardano/js-estimateMaxSpendable.ts +1 -1
  342. package/src/families/cardano/specs.ts +28 -11
  343. package/src/families/cardano/speculos-deviceActions.ts +65 -66
  344. package/src/families/celo/specs.ts +2 -0
  345. package/src/families/celo/speculos-deviceActions.ts +42 -43
  346. package/src/families/cosmos/__snapshots__/bridge.integration.test.ts.snap +246 -5
  347. package/src/families/cosmos/specs.ts +44 -28
  348. package/src/families/cosmos/speculos-deviceActions.ts +82 -83
  349. package/src/families/crypto_org/specs.ts +3 -0
  350. package/src/families/crypto_org/speculos-deviceActions.ts +58 -59
  351. package/src/families/elrond/specs.ts +21 -4
  352. package/src/families/elrond/speculos-deviceActions.ts +41 -42
  353. package/src/families/ethereum/__snapshots__/bridge.integration.test.ts.snap +90 -90
  354. package/src/families/ethereum/platformAdapter.test.ts +112 -0
  355. package/src/families/ethereum/specs.ts +47 -23
  356. package/src/families/ethereum/speculos-deviceActions.ts +93 -95
  357. package/src/families/filecoin/specs.ts +2 -1
  358. package/src/families/filecoin/speculos-deviceActions.ts +61 -62
  359. package/src/families/hedera/__snapshots__/bridge.integration.test.ts.snap +57 -2
  360. package/src/families/hedera/specs.ts +13 -5
  361. package/src/families/hedera/speculos-deviceActions.ts +59 -60
  362. package/src/families/osmosis/specs.ts +15 -7
  363. package/src/families/osmosis/speculos-deviceActions.ts +82 -83
  364. package/src/families/polkadot/platformAdapter.test.ts +61 -0
  365. package/src/families/polkadot/specs.ts +20 -2
  366. package/src/families/polkadot/speculos-deviceActions.ts +83 -82
  367. package/src/families/ripple/platformAdapter.test.ts +54 -0
  368. package/src/families/ripple/specs.ts +14 -7
  369. package/src/families/ripple/speculos-deviceActions.ts +72 -73
  370. package/src/families/solana/specs.ts +33 -14
  371. package/src/families/solana/speculos-deviceActions.ts +0 -5
  372. package/src/families/stellar/api/horizon.ts +10 -6
  373. package/src/families/stellar/specs.ts +37 -19
  374. package/src/families/stellar/speculos-deviceActions.ts +85 -87
  375. package/src/families/tezos/bakers.whitelist-default.ts +0 -1
  376. package/src/families/tezos/specs.ts +2 -0
  377. package/src/families/tezos/speculos-deviceActions.ts +76 -77
  378. package/src/families/tron/specs.ts +67 -30
  379. package/src/families/tron/speculos-deviceActions.ts +81 -84
  380. package/src/hw/getGenuineCheckFromDeviceId.test.ts +98 -0
  381. package/src/hw/getGenuineCheckFromDeviceId.ts +61 -0
  382. package/src/hw/getLatestAvailableFirmwareFromDeviceId.ts +37 -0
  383. package/src/hw/hooks/useGenuineCheck.test.ts +232 -0
  384. package/src/hw/hooks/useGenuineCheck.ts +138 -0
  385. package/src/hw/hooks/useGetLatestAvailableFirmware.test.ts +111 -0
  386. package/src/hw/hooks/useGetLatestAvailableFirmware.ts +90 -0
  387. package/src/load/speculos.ts +2 -0
  388. package/src/mock/fixtures/cryptoCurrencies.ts +88 -0
  389. package/src/platform/converters.test.ts +49 -282
  390. package/src/platform/logic.test.ts +756 -0
  391. package/src/platform/logic.ts +285 -0
  392. package/src/platform/react.ts +6 -0
  393. package/src/platform/tracking.test.ts +6 -7
  394. package/src/platform/tracking.ts +1 -1
  395. package/src/reconciliation.ts +66 -43
  396. package/lib/bot/test.bot.d.ts +0 -2
  397. package/lib/bot/test.bot.d.ts.map +0 -1
  398. package/lib/bot/test.bot.js +0 -62
  399. package/lib/bot/test.bot.js.map +0 -1
  400. package/lib/generated/speculos-deviceActions.d.ts +0 -56
  401. package/lib/generated/speculos-deviceActions.d.ts.map +0 -1
  402. package/lib/generated/speculos-deviceActions.js +0 -42
  403. package/lib/generated/speculos-deviceActions.js.map +0 -1
  404. package/src/bot/test.bot.ts +0 -21
  405. package/src/generated/speculos-deviceActions.ts +0 -37
@@ -9,8 +9,9 @@ import type {
9
9
  TransactionRes,
10
10
  } from "../../bot/types";
11
11
  import type { Transaction } from "./types";
12
- import { pickSiblings } from "../../bot/specs";
12
+ import { botTest, pickSiblings } from "../../bot/specs";
13
13
  import { isAccountEmpty } from "../../account";
14
+ import { acceptTransaction } from "./speculos-deviceActions";
14
15
 
15
16
  const currency = getCryptoCurrencyById("hedera");
16
17
  const memoTestMessage = "This is a test memo.";
@@ -39,6 +40,7 @@ const hedera: AppSpec<Transaction> = {
39
40
  firmware: "2.1.0",
40
41
  appVersion: "1.0.8",
41
42
  },
43
+ genericDeviceAction: acceptTransaction,
42
44
  currency,
43
45
  transactionCheck: ({ maxSpendable }) => {
44
46
  invariant(maxSpendable.gt(0), "Balance is too low");
@@ -73,8 +75,10 @@ const hedera: AppSpec<Transaction> = {
73
75
  accountBeforeTransaction,
74
76
  operation,
75
77
  }: TransactionTestInput<Transaction>): void => {
76
- expect(account.balance.toString()).toBe(
77
- accountBeforeTransaction.balance.minus(operation.value).toString()
78
+ botTest("account balance moved with operation value", () =>
79
+ expect(account.balance.toString()).toBe(
80
+ accountBeforeTransaction.balance.minus(operation.value).toString()
81
+ )
78
82
  );
79
83
  },
80
84
  },
@@ -109,7 +113,9 @@ const hedera: AppSpec<Transaction> = {
109
113
  .minus(transaction.amount.plus(operation.fee))
110
114
  .toNumber();
111
115
 
112
- expect(accountBalanceAfterTx).toBe(amount);
116
+ botTest("account balance moved with operation", () =>
117
+ expect(accountBalanceAfterTx).toBe(amount)
118
+ );
113
119
  },
114
120
  },
115
121
  {
@@ -137,7 +143,9 @@ const hedera: AppSpec<Transaction> = {
137
143
  };
138
144
  },
139
145
  test: ({ transaction }: TransactionTestInput<Transaction>): void => {
140
- expect(transaction.memo).toBe(memoTestMessage);
146
+ botTest("transaction.memo is set", () =>
147
+ expect(transaction.memo).toBe(memoTestMessage)
148
+ );
141
149
  },
142
150
  },
143
151
  ],
@@ -3,63 +3,62 @@ import type { Transaction } from "./types";
3
3
  import { formatCurrencyUnit } from "../../currencies";
4
4
  import { deviceActionFlow } from "../../bot/specs";
5
5
 
6
- const acceptTransaction: DeviceAction<Transaction, any> = deviceActionFlow({
7
- steps: [
8
- {
9
- title: "Transfer",
10
- },
11
- {
12
- title: "with Key #0?",
13
- button: "Rr",
14
- },
15
- {
16
- title: "Operator",
17
- button: "Rr",
18
- expectedValue: ({ account }) => account.freshAddress,
19
- },
20
- {
21
- title: "Sender",
22
- button: "Rr",
23
- expectedValue: ({ account }) => account.freshAddress,
24
- },
25
- {
26
- title: "Recipient",
27
- button: "Rr",
28
- expectedValue: ({ transaction }) => transaction.recipient,
29
- },
30
- {
31
- title: "Amount",
32
- button: "Rr",
33
- expectedValue: ({ account: { unit }, transaction: { amount } }) =>
34
- formatCurrencyUnit(unit, amount, {
35
- disableRounding: true,
36
- subMagnitude: 10,
37
- }) + " hbar",
38
- },
39
- {
40
- title: "Fee",
41
- button: "Rr",
42
- expectedValue: ({ account: { unit }, status: { estimatedFees } }) =>
43
- formatCurrencyUnit(unit, estimatedFees, {
44
- disableRounding: true,
45
- subMagnitude: 10,
46
- }) + " hbar",
47
- },
48
- {
49
- title: "Max Fee",
50
- button: "Rr",
51
- expectedValue: () => "1 hbar",
52
- },
53
- {
54
- title: "Memo",
55
- button: "Rr",
56
- expectedValue: ({ transaction }) => transaction.memo as string,
57
- },
58
- {
59
- title: "Confirm",
60
- button: "LRlr",
61
- },
62
- ],
63
- });
64
-
65
- export default { acceptTransaction };
6
+ export const acceptTransaction: DeviceAction<Transaction, any> =
7
+ deviceActionFlow({
8
+ steps: [
9
+ {
10
+ title: "Transfer",
11
+ },
12
+ {
13
+ title: "with Key #0?",
14
+ button: "Rr",
15
+ },
16
+ {
17
+ title: "Operator",
18
+ button: "Rr",
19
+ expectedValue: ({ account }) => account.freshAddress,
20
+ },
21
+ {
22
+ title: "Sender",
23
+ button: "Rr",
24
+ expectedValue: ({ account }) => account.freshAddress,
25
+ },
26
+ {
27
+ title: "Recipient",
28
+ button: "Rr",
29
+ expectedValue: ({ transaction }) => transaction.recipient,
30
+ },
31
+ {
32
+ title: "Amount",
33
+ button: "Rr",
34
+ expectedValue: ({ account: { unit }, transaction: { amount } }) =>
35
+ formatCurrencyUnit(unit, amount, {
36
+ disableRounding: true,
37
+ showAllDigits: true,
38
+ }) + " hbar",
39
+ },
40
+ {
41
+ title: "Fee",
42
+ button: "Rr",
43
+ expectedValue: ({ account: { unit }, status: { estimatedFees } }) =>
44
+ formatCurrencyUnit(unit, estimatedFees, {
45
+ disableRounding: true,
46
+ showAllDigits: true,
47
+ }) + " hbar",
48
+ },
49
+ {
50
+ title: "Max Fee",
51
+ button: "Rr",
52
+ expectedValue: () => "1 hbar",
53
+ },
54
+ {
55
+ title: "Memo",
56
+ button: "Rr",
57
+ expectedValue: ({ transaction }) => transaction.memo as string,
58
+ },
59
+ {
60
+ title: "Confirm",
61
+ button: "LRlr",
62
+ },
63
+ ],
64
+ });
@@ -1,7 +1,7 @@
1
1
  import invariant from "invariant";
2
2
  import type { Transaction } from "./types";
3
3
  import { getCryptoCurrencyById, parseCurrencyUnit } from "../../currencies";
4
- import { pickSiblings } from "../../bot/specs";
4
+ import { botTest, pickSiblings } from "../../bot/specs";
5
5
  import type { AppSpec } from "../../bot/types";
6
6
  import { DeviceModelId } from "@ledgerhq/devices";
7
7
  import type {
@@ -19,10 +19,11 @@ import sample from "lodash/sample";
19
19
  import expect from "expect";
20
20
  import { toOperationRaw } from "../../account";
21
21
  import { BigNumber } from "bignumber.js";
22
+ import { acceptTransaction } from "./speculos-deviceActions";
22
23
 
23
24
  const currency = getCryptoCurrencyById("osmosis");
24
25
  const minimalAmount = parseCurrencyUnit(currency.units[0], "0.00001");
25
- const maxAccount = 3;
26
+ const maxAccount = 16;
26
27
  // amounts of delegation are not exact so we are applying an approximation
27
28
  function approximateValue(value) {
28
29
  return "~" + value.div(100).integerValue().times(100).toString();
@@ -48,6 +49,7 @@ const osmosis: AppSpec<Transaction> = {
48
49
  model: DeviceModelId.nanoS,
49
50
  appName: "Cosmos",
50
51
  },
52
+ genericDeviceAction: acceptTransaction,
51
53
  testTimeout: 2 * 60 * 1000,
52
54
  transactionCheck: ({ maxSpendable }) => {
53
55
  invariant(maxSpendable.gt(minimalAmount), "balance is too low");
@@ -59,9 +61,11 @@ const osmosis: AppSpec<Transaction> = {
59
61
  if (allOperationsMatchingId.length > 1) {
60
62
  console.warn(allOperationsMatchingId);
61
63
  }
62
- expect({ allOperationsMatchingId }).toEqual({
63
- allOperationsMatchingId: [operation],
64
- });
64
+ botTest("only one operation emerged on the tx id", () =>
65
+ expect({ allOperationsMatchingId }).toEqual({
66
+ allOperationsMatchingId: [operation],
67
+ })
68
+ );
65
69
  const opExpected: Record<string, any> = toOperationRaw({
66
70
  ...optimisticOperation,
67
71
  });
@@ -74,8 +78,12 @@ const osmosis: AppSpec<Transaction> = {
74
78
  delete opExpected.extra;
75
79
  delete opExpected.transactionSequenceNumber;
76
80
  const op = toOperationRaw(operation);
77
- expect(op).toMatchObject(opExpected);
78
- expect(approximateExtra(op.extra)).toMatchObject(approximateExtra(extra));
81
+ botTest("optimistic operation matches op", () =>
82
+ expect(op).toMatchObject(opExpected)
83
+ );
84
+ botTest("operation extra matches", () =>
85
+ expect(approximateExtra(op.extra)).toMatchObject(approximateExtra(extra))
86
+ );
79
87
  },
80
88
  mutations: [
81
89
  {
@@ -9,86 +9,85 @@ const typeWording = {
9
9
  claimReward: "Withdraw Reward",
10
10
  claimRewardCompound: "(not tested)",
11
11
  };
12
- const acceptTransaction: DeviceAction<Transaction, any> = deviceActionFlow({
13
- steps: [
14
- {
15
- title: "Sequence",
16
- button: "Rr",
17
- },
18
- {
19
- title: "Chain ID",
20
- button: "Rr",
21
- },
22
- {
23
- title: "Account",
24
- button: "Rr",
25
- },
26
- {
27
- title: "Type",
28
- button: "Rr",
29
- expectedValue: ({ transaction }) => typeWording[transaction.mode],
30
- },
31
- {
32
- title: "Validator Source",
33
- button: "Rr",
34
- expectedValue: ({ transaction }) => transaction.sourceValidator || "",
35
- },
36
- {
37
- title: "Validator Dest",
38
- button: "Rr",
39
- expectedValue: ({ transaction }) => transaction.validators[0].address,
40
- },
41
- {
42
- title: "Validator",
43
- button: "Rr",
44
- expectedValue: ({ transaction }, acc) =>
45
- transaction.validators[
46
- acc.filter((a) => a.title === "Validator").length
47
- ].address,
48
- },
49
- {
50
- title: "Memo",
51
- button: "Rr",
52
- expectedValue: ({ transaction }) => transaction.memo || "",
53
- },
54
- {
55
- title: "Fee",
56
- button: "Rr",
57
- },
58
- {
59
- title: "Gas",
60
- button: "Rr",
61
- expectedValue: ({ transaction }) => transaction.gas?.toString() || "",
62
- },
63
- {
64
- title: "Amount",
65
- button: "Rr",
66
- },
67
- {
68
- title: "From",
69
- button: "Rr",
70
- expectedValue: ({ account }) => account.freshAddress,
71
- },
72
- {
73
- title: "To",
74
- button: "Rr",
75
- expectedValue: ({ transaction }) => transaction.recipient,
76
- },
77
- {
78
- title: "Delegator",
79
- button: "Rr",
80
- expectedValue: ({ account }) => account.freshAddress,
81
- },
82
- {
83
- title: "APPROVE",
84
- button: "LRlr",
85
- final: true,
86
- },
87
- {
88
- title: "REJECT",
89
- },
90
- ],
91
- });
92
- export default {
93
- acceptTransaction,
94
- };
12
+
13
+ export const acceptTransaction: DeviceAction<Transaction, any> =
14
+ deviceActionFlow({
15
+ steps: [
16
+ {
17
+ title: "Sequence",
18
+ button: "Rr",
19
+ },
20
+ {
21
+ title: "Chain ID",
22
+ button: "Rr",
23
+ },
24
+ {
25
+ title: "Account",
26
+ button: "Rr",
27
+ },
28
+ {
29
+ title: "Type",
30
+ button: "Rr",
31
+ expectedValue: ({ transaction }) => typeWording[transaction.mode],
32
+ },
33
+ {
34
+ title: "Validator Source",
35
+ button: "Rr",
36
+ expectedValue: ({ transaction }) => transaction.sourceValidator || "",
37
+ },
38
+ {
39
+ title: "Validator Dest",
40
+ button: "Rr",
41
+ expectedValue: ({ transaction }) => transaction.validators[0].address,
42
+ },
43
+ {
44
+ title: "Validator",
45
+ button: "Rr",
46
+ expectedValue: ({ transaction }, acc) =>
47
+ transaction.validators[
48
+ acc.filter((a) => a.title === "Validator").length
49
+ ].address,
50
+ },
51
+ {
52
+ title: "Memo",
53
+ button: "Rr",
54
+ expectedValue: ({ transaction }) => transaction.memo || "",
55
+ },
56
+ {
57
+ title: "Fee",
58
+ button: "Rr",
59
+ },
60
+ {
61
+ title: "Gas",
62
+ button: "Rr",
63
+ expectedValue: ({ transaction }) => transaction.gas?.toString() || "",
64
+ },
65
+ {
66
+ title: "Amount",
67
+ button: "Rr",
68
+ },
69
+ {
70
+ title: "From",
71
+ button: "Rr",
72
+ expectedValue: ({ account }) => account.freshAddress,
73
+ },
74
+ {
75
+ title: "To",
76
+ button: "Rr",
77
+ expectedValue: ({ transaction }) => transaction.recipient,
78
+ },
79
+ {
80
+ title: "Delegator",
81
+ button: "Rr",
82
+ expectedValue: ({ account }) => account.freshAddress,
83
+ },
84
+ {
85
+ title: "APPROVE",
86
+ button: "LRlr",
87
+ final: true,
88
+ },
89
+ {
90
+ title: "REJECT",
91
+ },
92
+ ],
93
+ });
@@ -0,0 +1,61 @@
1
+ import dot from "./platformAdapter";
2
+ import { PolkadotTransaction as PlatformTransaction } from "@ledgerhq/live-app-sdk";
3
+ import { FAMILIES } from "@ledgerhq/live-app-sdk";
4
+ import BigNumber from "bignumber.js";
5
+ import { Transaction } from "./types";
6
+
7
+ describe("getPlatformTransactionSignFlowInfos", () => {
8
+ describe("should properly get infos for DOT platform tx", () => {
9
+ it("with most basic tx", () => {
10
+ const dotPlatformTx: PlatformTransaction = {
11
+ family: FAMILIES.POLKADOT,
12
+ amount: new BigNumber(100000),
13
+ recipient: "0xABCDEF",
14
+ mode: "send",
15
+ };
16
+
17
+ const expectedLiveTx: Partial<Transaction> = {
18
+ family: dotPlatformTx.family,
19
+ amount: dotPlatformTx.amount,
20
+ recipient: dotPlatformTx.recipient,
21
+ mode: dotPlatformTx.mode,
22
+ };
23
+
24
+ const { canEditFees, hasFeesProvided, liveTx } =
25
+ dot.getPlatformTransactionSignFlowInfos(dotPlatformTx);
26
+
27
+ expect(canEditFees).toBe(false);
28
+
29
+ expect(hasFeesProvided).toBe(false);
30
+
31
+ expect(liveTx).toEqual(expectedLiveTx);
32
+ });
33
+
34
+ it("with era provided", () => {
35
+ const dotPlatformTx: PlatformTransaction = {
36
+ family: FAMILIES.POLKADOT,
37
+ amount: new BigNumber(100000),
38
+ recipient: "0xABCDEF",
39
+ mode: "send",
40
+ era: 1,
41
+ };
42
+
43
+ const expectedLiveTx: Partial<Transaction> = {
44
+ family: dotPlatformTx.family,
45
+ amount: dotPlatformTx.amount,
46
+ recipient: dotPlatformTx.recipient,
47
+ mode: dotPlatformTx.mode,
48
+ era: `${dotPlatformTx.era}`,
49
+ };
50
+
51
+ const { canEditFees, hasFeesProvided, liveTx } =
52
+ dot.getPlatformTransactionSignFlowInfos(dotPlatformTx);
53
+
54
+ expect(canEditFees).toBe(false);
55
+
56
+ expect(hasFeesProvided).toBe(false);
57
+
58
+ expect(liveTx).toEqual(expectedLiveTx);
59
+ });
60
+ });
61
+ });
@@ -9,7 +9,7 @@ import type {
9
9
  Transaction,
10
10
  } from "../../families/polkadot/types";
11
11
  import { getCryptoCurrencyById, parseCurrencyUnit } from "../../currencies";
12
- import { pickSiblings } from "../../bot/specs";
12
+ import { botTest, pickSiblings } from "../../bot/specs";
13
13
  import type { AppSpec } from "../../bot/types";
14
14
  import { toOperationRaw } from "../../account";
15
15
  import {
@@ -18,8 +18,10 @@ import {
18
18
  canNominate,
19
19
  isFirstBond,
20
20
  hasMinimumBondBalance,
21
+ getMinimumBalance,
21
22
  } from "../../families/polkadot/logic";
22
23
  import { DeviceModelId } from "@ledgerhq/devices";
24
+ import { acceptTransaction } from "./speculos-deviceActions";
23
25
 
24
26
  const maxAccounts = 32;
25
27
  const currency = getCryptoCurrencyById("polkadot");
@@ -28,6 +30,7 @@ const POLKADOT_MIN_SAFE = parseCurrencyUnit(currency.units[0], "0.1");
28
30
  // FIXME Should be replaced with EXISTENTIAL_DEPOSIT in logic.ts
29
31
  const EXISTENTIAL_DEPOSIT = parseCurrencyUnit(currency.units[0], "1.0");
30
32
  const MIN_LOCKED_BALANCE_REQ = parseCurrencyUnit(currency.units[0], "1.0");
33
+
31
34
  const polkadot: AppSpec<Transaction> = {
32
35
  name: "Polkadot",
33
36
  currency: getCryptoCurrencyById("polkadot"),
@@ -36,6 +39,7 @@ const polkadot: AppSpec<Transaction> = {
36
39
  appName: "Polkadot",
37
40
  },
38
41
  testTimeout: 2 * 60 * 1000,
42
+ genericDeviceAction: acceptTransaction,
39
43
  transactionCheck: ({ maxSpendable }) => {
40
44
  invariant(maxSpendable.gt(POLKADOT_MIN_SAFE), "balance is too low");
41
45
  },
@@ -48,7 +52,9 @@ const polkadot: AppSpec<Transaction> = {
48
52
  delete opExpected.date;
49
53
  delete opExpected.blockHash;
50
54
  delete opExpected.blockHeight;
51
- expect(toOperationRaw(operation)).toMatchObject(opExpected);
55
+ botTest("optimistic operation matches", () =>
56
+ expect(toOperationRaw(operation)).toMatchObject(opExpected)
57
+ );
52
58
  },
53
59
  mutations: [
54
60
  {
@@ -71,6 +77,18 @@ const polkadot: AppSpec<Transaction> = {
71
77
  amount = EXISTENTIAL_DEPOSIT.plus(POLKADOT_MIN_SAFE);
72
78
  }
73
79
 
80
+ const minimumBalanceExistential = getMinimumBalance(account);
81
+ const leftover = account.spendableBalance.minus(
82
+ amount.plus(POLKADOT_MIN_SAFE)
83
+ );
84
+ if (
85
+ minimumBalanceExistential.gt(0) &&
86
+ leftover.lt(minimumBalanceExistential) &&
87
+ leftover.gt(0)
88
+ ) {
89
+ throw new Error("risk of PolkadotDoMaxSendInstead");
90
+ }
91
+
74
92
  return {
75
93
  transaction: bridge.createTransaction(account),
76
94
  updates: [