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

Lykhoyda/transparent address #66

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

Lykhoyda
Copy link
Collaborator

Transparent address in Receive tab

@Lykhoyda Lykhoyda requested review from ec2 and irubido and removed request for ec2 February 11, 2025 18:06
Copy link
Collaborator

@irubido irubido left a comment

Choose a reason for hiding this comment

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

TS for transparent address looks good, just not sure about active account handling in dapp

unifiedAddress: await state.webWallet!.get_current_address(0),
};
}
const accountIndex = state.activeAccount ?? 0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure about general activeAccount state in the web-wallet, why it is hardcocded to 0, and not throw error if its missing from state

Also in addNewAccountFromUfvk with setting it upon install it defaults to hardcoded 0 instead of error handle

const account_id =
        (await state.webWallet?.create_account_ufvk(ufvk, birthdayHeight)) || 0;
      dispatch({ type: 'set-active-account', payload: account_id });

Copy link
Collaborator Author

@Lykhoyda Lykhoyda Feb 12, 2025

Choose a reason for hiding this comment

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

We expect to manage only one account now, so it will always be zero. But if you take the example of a demo wallet, we can switch accounts and import it from MetaMask or seed, so an active account is required.

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.

3 participants