Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/311 - Implement ledger integration improvements #339

Merged
merged 18 commits into from
Jul 27, 2023

Conversation

jurevans
Copy link
Collaborator

@jurevans jurevans commented Jul 20, 2023

Resolves #311

  • Submitting a transfer from Ledger account works
  • Submitting an unbond from Ledger account works
  • Submitting a withdraw from Ledger account works
  • Consolidate approvals into single flow (ApproveTx)
  • Existing transactions work in new approval flow
  • Implement improvements to Rust lib (consolidate different Tx submissions into submit_signed_tx)
  • Clean up unused code (unused messages, arguments, etc.)

NOTE I did a little bit of clean up outside the scope of this PR (discovered some out-of-date and unused code)

Testing

Setup

  1. Set up a local chain based on tag v0.18.1, do not build wasm scripts! We want the wasms that are delivered through AWS (and remember to fix the CORS setting in the chain's config.toml, e.g., local.c4463480b0eb1dbf83a1d0d0/setup/validator-0/.namada/local.c4463480b0eb1dbf83a1d0d0/config.toml), then start that chain and set up a wallet (CLI)
  2. Install the Ledger app with ./installer_s2.sh load (e.g., if you're using a Ledger Nano S-Plus) (Ping me for a copy of the installer script you need for your Ledger)
  3. Install the extension from this branch, and set up an initial account
  4. In the extension, click the "settings" (gear) icon, then click Add Account - from the new tab, click Connect to Ledger, then give it an alias, then click Add to wallet and close
  5. In the namada CLI, transfer tokens to your initial account and your Ledger (for testing both Bond tx from a local wallet account as well as from Ledger, as both of these are updated in this PR)

@jurevans jurevans self-assigned this Jul 20, 2023
@jurevans jurevans changed the title WIP: Implement ledger integration improvements WIP: feat/311 - Implement ledger integration improvements Jul 20, 2023
@jurevans jurevans force-pushed the feat/311-ledger-improvements branch from 5b0fc52 to 277ddc2 Compare July 21, 2023 11:11
@github-actions
Copy link

github-actions bot commented Jul 21, 2023

@github-actions github-actions bot temporarily deployed to pull request July 21, 2023 11:24 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 21, 2023 13:03 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 21, 2023 13:34 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 21, 2023 14:16 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 24, 2023 13:55 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 24, 2023 16:03 Inactive
@jurevans jurevans force-pushed the feat/311-ledger-improvements branch from 05dad47 to 7438494 Compare July 25, 2023 08:35
Consolidate approval views for all tx types

Hook up Ledger transfer

Remove unused address from messages

Consolidate tx build calls

Clean up Message and component props
@jurevans jurevans force-pushed the feat/311-ledger-improvements branch from 7438494 to 8ecc65b Compare July 25, 2023 08:37
@github-actions github-actions bot temporarily deployed to pull request July 25, 2023 08:50 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 25, 2023 09:30 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 25, 2023 10:21 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 25, 2023 13:14 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 25, 2023 15:19 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 25, 2023 15:46 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 26, 2023 10:19 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 26, 2023 10:40 Inactive
@jurevans jurevans changed the title WIP: feat/311 - Implement ledger integration improvements feat/311 - Implement ledger integration improvements Jul 26, 2023
@jurevans jurevans marked this pull request as ready for review July 26, 2023 11:51
@github-actions github-actions bot temporarily deployed to pull request July 26, 2023 12:04 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 26, 2023 12:36 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 26, 2023 14:16 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 26, 2023 14:38 Inactive
Copy link
Collaborator

@emccorson emccorson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a couple of comments, and was not able to test the Ledger functionality due to not having one, but other than that looks good!

apps/extension/src/background/approvals/service.ts Outdated Show resolved Hide resolved
apps/extension/src/background/approvals/service.ts Outdated Show resolved Hide resolved
apps/extension/src/hooks/useQuery.tsx Outdated Show resolved Hide resolved
apps/namada-interface/.prettierrc Outdated Show resolved Hide resolved
Copy link
Collaborator

@mateuszjasiuk mateuszjasiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Left couple of comments. I will test a bit later!

apps/extension/src/Approvals/Approvals.tsx Show resolved Hide resolved
apps/extension/src/Approvals/ApproveTx/ApproveTx.tsx Outdated Show resolved Hide resolved
apps/extension/src/Approvals/ApproveTx/ConfirmTx.tsx Outdated Show resolved Hide resolved
@github-actions github-actions bot temporarily deployed to pull request July 27, 2023 10:19 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 27, 2023 10:30 Inactive
@jurevans jurevans merged commit 1ab22a2 into main Jul 27, 2023
5 checks passed
@jurevans jurevans deleted the feat/311-ledger-improvements branch July 27, 2023 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improvements to Ledger functionality
3 participants