-
Notifications
You must be signed in to change notification settings - Fork 7
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
Adds shielded button and functionality (transparent -> orchard[unified]) to zingo-pc #67
Adds shielded button and functionality (transparent -> orchard[unified]) to zingo-pc #67
Conversation
…hieldBalanceToOrchard to <AddressBook />. Adds shieldBalanceToOrchard to <Receive />.
Aja!!!!!.... Thanks for your contribution... I need to find time to review this PR, I'll do tomorrow hopefully. Looks good though. |
Updates completed. Change "shield balance" to "shield balance to orchard". Adds functionality to shield sapling to orchard separately from transparent. |
Looks pretty good, I need to test it in local before merge it... |
@@ -171,6 +175,16 @@ const AddressBlock = ({ | |||
View on explorer <i className={["fas", "fa-external-link-square-alt"].join(" ")} /> | |||
</button> | |||
)} | |||
{type === AddressType.transparent && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to check if there is something to shield, if the transparent balance is 0 make no sense to show this button.
Shield Balance To Orchard | ||
</button> | ||
)} | ||
{type === AddressType.sapling && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to check if there is something to shield, if the sapling balance is 0 make no sense to show this button.
const result = await this.rpc.shieldSaplingBalanceToOrchard() | ||
|
||
if (!result.includes('txid')) { | ||
throw new Error(result) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the user needs some feedback here, you can use openerrormodal
here if the result have no txid
And the user needs some feedback even if the transaction finished successfully... using this txid
as well.
would be good if you use the pattern that in the send
process... since these two process are similar, creating both a new transaction.
const result = await this.rpc.shieldTransparentBalanceToOrchard() | ||
|
||
if (!result.includes('txid')) { | ||
throw new Error(result) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here.
I resolved the conflicts... |
@elijahhampton How's it going? If you are really busy I can take this PR from here & finish it in your branch... I'm happy to help. cc: @Edicksonjga |
@elijahhampton Well, I'm going to wait a little bit. I tried to contact with you by several channels... and no luck. Please tell me what do you think... about this PR progression... |
Thank you for finishing the PR. I responded to your message through Element. |
Proposed changes
Creates new rpc functions doShield and shieldBalanceToOrchard. Adds shieldBalanceToOrchard to . Adds shieldBalanceToOrchard to .
General Notes
Note: This merge request may only be seen as a draft as there are some questions that will probably need to be addressed:
Visuals
New Button (This button is "Shield Balance" now)
Working Error State
See list of transactions here. This involves a number of transactions I made sending ZEC to my transparent address and shielding it.
https://blockchair.com/zcash/address/t1Zs9uxRyN6Knd6kDHfRKjLjn5JchnAPFN8
Transparent Balance After Shielding
Orchard (Unified) Balance After Shielding