Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

LIVE-1004 Hedera integration #1887

Open
wants to merge 131 commits into
base: develop
Choose a base branch
from
Open

LIVE-1004 Hedera integration #1887

wants to merge 131 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Apr 12, 2022

Context (issues, jira)

https://ledgerhq.atlassian.net/browse/LIVE-1004

Description / Usage

Hedera integration in Ledger Live - add accounts / sync / send / receive

Expectations

  • Test coverage: The changes of this PR are covered by test. Unit test were added with mocks when depending on a backend/device.
  • No impact: The changes of this PR have ZERO impact on the userland. Meaning, we can use these changes without modifying LLD/LLM at all. It will be a "noop" and the maintainers will be able to bump it without changing anything.

mehcode and others added 30 commits March 23, 2022 15:28
 - designate a custom deriviation as the bolos app does not support hardened paths

 - define methods for querying accounts by key and balance with the mirror and node respectively

 - implement scanAccounts and sync using the mirror and node APIs

 + operations should always hold a positive value (even for "send" operations)

 + fake blockHeight to show operations as confirmed

 + add the concept of a virtualAddress and use for Hedera,
   a set virtual address will directly render it during receive and
   warn the user that it cannot be verified
Signed-off-by: Jack Ta <[email protected]>
Reason(s) for changing `freezeWith(getClient())` with `freeze()` & `.setNodeAccountIds([new AccountId(3)])`:
- Using `freezeWith(getClient())` where `getClient()` is `hedera.Client.forMainnet()` OR `hedera.Client.forNetwork({MAINNET_NETWORK})` will create a bug where the `TransferTransaction` will have 18 members in both its `_nodeIds` and `_signedTransactions`.
  - The 18 members in `_nodeIds` are nodes `0.0.3` ~> `0.0.20` and the 18 members in `_signedTransactions` are one of the same of the body bytes to be signed.
  - The problem with this bug is that it will loop prompt the user 18 times on the ledger device to confirm the transaction and once that's exhaustedly done, it inevitably fails.
- Setting `setNodeAccountIds()` to an array containing more than one `AccountId` will yield the same prompt loop problem mentioned above.
Signed-off-by: Jack Ta <[email protected]>
@ghost ghost changed the title Hedera integration LIVE-1004 Hedera integration May 12, 2022
@ghost ghost marked this pull request as ready for review May 12, 2022 07:37
@ghost ghost self-requested a review May 12, 2022 07:37
@ghost ghost self-requested a review as a code owner May 12, 2022 07:37
@henri-ly
Copy link
Contributor

LGTM !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants