Skip to content

Conversation

@lAmeR1
Copy link

@lAmeR1 lAmeR1 commented Oct 20, 2025

Extended wallet logic to manage both receive and change address types. Updated address generation, display, and callbacks to distinguish between the two types. Improved error handling and adjusted state updates accordingly.

Extended wallet logic to manage both receive and change address types. Updated address generation, display, and callbacks to distinguish between the two types. Improved error handling and adjusted state updates accordingly.
@vercel
Copy link

vercel bot commented Oct 20, 2025

Someone is attempting to deploy a commit to the coderofstuff's projects Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Oct 21, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
kasvault Ready Ready Preview Comment Oct 21, 2025 4:39am

💡 Enable Vercel Agent with $100 free credit for automated AI reviews

Copy link
Owner

@coderofstuff coderofstuff left a comment

Choose a reason for hiding this comment

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

Thanks for this. I have some feedback.


callbackSetRawAddresses(rawAddresses);
callback(rawAddresses.filter(addressFilter(lastReceiveIndex)));
for (let addressType = 0; addressType <= 1; addressType++) {
Copy link
Owner

Choose a reason for hiding this comment

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

The change here makes it so that there is a change address shown for every pair receive address. This is a large change in the UI since if you had 20 receive addresses, you'd now see 40 addresses show up, 20 of which are blank.

lastReceiveAddress is a value stored in the settings to mark the last receive address used. A different one lastChangeAddress can be used for change addresses.

A simpler change to apply for now is:

  • On initial scan, scan for:
    • Change Addresses, show them first
    • Receive Addresses, show them after
  • On follow-up loads, scan up to the lastChangeAddress and lastReceiveAddress

<Center>
<Button onClick={generateNewAddress} disabled={!enableGenerate}>
Generate New Address
Generate New Addresses
Copy link
Owner

Choose a reason for hiding this comment

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

After applying the fix for maintaining the lastChangeAddress setting too, revert this back. It's simpler for now to just keep generating the Receive address in this legacy UX.

Change addresses in BIP44 compliant wallets (like in LL) are only ever generated through txs anyway.

<Stack className={styles.small} justify='space-between'>
<Text className={styles.address} w={width - 40}>
<AddressText address={row.address} />
{row.addressType === 1 ? ' ↩ ' : null}
Copy link
Owner

Choose a reason for hiding this comment

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

Hmm, if we're using icons please use IconArrowBack and also add a tooltip saying it's a Change Address

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.

2 participants