Skip to content

Commit

Permalink
fix(data): 🐛 usageIndex for bulk generated addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
jojobyte committed Mar 7, 2024
1 parent 6c0e088 commit 3b9b651
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/helpers/wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ export async function generateAddressIterator(
walletId,
accountIndex,
addressIndex,
usageIndex = DashHd.RECEIVE,
) {
// let xkeyId = await DashHd.toId(xkey);
let key = await xkey.deriveAddress(addressIndex);
Expand Down Expand Up @@ -541,7 +542,7 @@ export async function generateAddressIterator(
xkeyId,
accountIndex,
addressIndex,
usageIndex: xkey.index,
usageIndex,
},
)
})
Expand Down Expand Up @@ -583,6 +584,7 @@ export async function batchAddressGenerate(
wallet.id,
accountIndex,
addrIdx,
usageIndex,
)
)
}
Expand Down Expand Up @@ -621,6 +623,7 @@ export async function batchAddressUsageGenerate(
wallet.id,
accountIndex,
addrIdx,
DashHd.RECEIVE,
)
)
addresses.push(
Expand All @@ -630,6 +633,7 @@ export async function batchAddressUsageGenerate(
wallet.id,
accountIndex,
addrIdx,
DashHd.CHANGE,
)
)
}
Expand Down

0 comments on commit 3b9b651

Please sign in to comment.