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

Implement ZCash account creation & balance resolution #20351

Merged
merged 3 commits into from
Oct 16, 2023
Merged

Conversation

cypt4
Copy link
Collaborator

@cypt4 cypt4 commented Oct 2, 2023

Resolves brave/brave-browser#32305

Adds some functionality related to ZCash:

  1. ZCash account creation flow in the webui
  2. ZCash balance resolution using lightwalletd grpc api

Submitter Checklist:

  • I confirm that no security/privacy review is needed and no other type of reviews are needed, or that I have requested them
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally:
    • npm run test -- brave_browser_tests, npm run test -- brave_unit_tests wiki
    • npm run lint, npm run presubmit wiki, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

@github-actions github-actions bot added CI/storybook-url Deploy storybook and provide a unique URL for each build feature/web3/wallet feature/web3/wallet/core labels Oct 2, 2023
@cypt4 cypt4 force-pushed the brave_32305 branch 3 times, most recently from 7ca1513 to b319609 Compare October 3, 2023 10:02
@cypt4 cypt4 marked this pull request as ready for review October 3, 2023 10:11
@cypt4 cypt4 requested review from a team as code owners October 3, 2023 10:11
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@supermassive supermassive self-requested a review October 5, 2023 03:54
Comment on lines 81 to 88
std::string MakeGetAddressUtxosURLParams(
const std::vector<std::string>& addresses) {
zcash::GetAddressUtxosRequest request;
for (const auto& address : addresses) {
request.add_addresses(address);
}
request.set_maxentries(1);
request.set_startheight(0);
return GetPrefixedProtobuf(request.SerializeAsString());
}

Copy link
Collaborator

@supermassive supermassive Oct 5, 2023

Choose a reason for hiding this comment

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

Is it ok from privacy perspective to send account's addresses in a batch request?

Copy link
Member

Choose a reason for hiding this comment

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

Generally no, although if these are one time use addresses it's less concerning but if we can avoid it we should.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Now it takes only 1 address

@cypt4 cypt4 force-pushed the brave_32305 branch 2 times, most recently from cf97b64 to c37d36f Compare October 11, 2023 17:47
Copy link
Member

@petemill petemill left a comment

Choose a reason for hiding this comment

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

I only looked at the 2 new strings

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@cypt4
Copy link
Collaborator Author

cypt4 commented Oct 11, 2023

/build linux
/build macos
/build ios

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

Copy link
Contributor

@Douglashdaniel Douglashdaniel left a comment

Choose a reason for hiding this comment

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

++ Wallet Front-end

@nuo-xu
Copy link
Contributor

nuo-xu commented Oct 13, 2023

[Resolved]can you update brave_wallet_factory_wrappers for iOS to have a way to get an instance of zcash_wallet_service? i think we need this service to fetch balance. and do we need zcash_rpc?

Copy link
Member

@kdenhartog kdenhartog left a comment

Choose a reason for hiding this comment

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

Lgtm

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@cypt4
Copy link
Collaborator Author

cypt4 commented Oct 15, 2023

can you update brave_wallet_factory_wrappers for iOS to have a way to get an instance of zcash_wallet_service? i think we need this service to fetch balance. and do we need zcash_rpc?

You don't need to access ZCashRpc directly

@nuo-xu
Copy link
Contributor

nuo-xu commented Oct 16, 2023

iOS ++

@cypt4 cypt4 merged commit 6cd0b6e into master Oct 16, 2023
15 checks passed
@cypt4 cypt4 deleted the brave_32305 branch October 16, 2023 09:06
@github-actions github-actions bot added this to the 1.61.x - Nightly milestone Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/storybook-url Deploy storybook and provide a unique URL for each build feature/web3/wallet/core feature/web3/wallet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ZCash] Implement account creation and balance sync for ZCash transparent accounts
9 participants