Skip to content

Batch generate address enhancements #53

Open
@jojobyte

Description

@jojobyte
  • needs to check each accounts addresses for funds and generate 20 past the last address with funds for DashHd.RECEIVE & DashHd.CHANGE
  • needs to generate change addresses (m/44'/5'/0'/${DashHd.CHANGE}/0) in addition to the current receive addresses (m/44'/5'/0'/${DashHd.RECEIVE}/0)
  • needs to pre-generate accounts with some addresses when importing a phrase to start adding contacts after the last account with funds

Batch Interactions

  • Initial Wallet Creation / Page Load
    • batch generate addresses for DashHd.RECEIVE & DashHd.CHANGE
  • Send Dialog
    • selects next addressIndex for contact accountIndex >= 1 or main wallet accountIndex === 0
    • should also select next addressIndex for main account (accountIndex === 0) change
  • Receive Dialog
    • selects next addressIndex for contact accountIndex >= 1 or main wallet accountIndex === 0
  • On...
    • Receive (in websocket)
    • Or on updateAllBalances
    • Or upon opening the Receive Dialog with a new addressIndex
  • we need to check the number of stored addresses after current addressIndex at the accountIndex
    • if its less than or equal to half of the normal batch size, we should generate a new batch
    • We should also detect if the received amount is for a Change Address and generate based on that USE (DashHd.RECEIVE || DashHd.CHANGE)
let batchSize = 20; 
// accountFilteredStoredAddrs.length === 40
// addressIndex === 31
if (accountFilteredStoredAddrs.length - addressIndex <= batchSize / 2) {
  generateMoreAddresses()
}

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions