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

Fix Issue #28. NFC #29

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Mycelium Wallet/Models/MYCWallet.m
Original file line number Diff line number Diff line change
Expand Up @@ -1385,13 +1385,15 @@ - (void) discoverAccounts:(BTCKeychain*)rootKeychain accountIndex:(NSInteger)acc
}

BTCKeychain* accKeychain = [[rootKeychain keychainForAccount:(uint32_t)accountIndex] publicKeychain];

// Scan 20 external address and 2 internal ones.
NSMutableArray* addrs = [NSMutableArray array];
for (uint32_t j = 0; j < 2; j++) {

// Scan external addresses...
for (uint32_t j = 0; j < 20; j++) {
BTCAddress* addr = [self addressForAddress:[BTCPublicKeyAddress addressWithData:BTCHash160([accKeychain externalKeyAtIndex:j].publicKey)]];

Choose a reason for hiding this comment

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

bitcoin:39oxfNaSagBwX3KCJfHZgAnq37Eszm5iTf?amount=0.04144

[addrs addObject:addr];
}

// ... and internal addresses.
for (uint32_t j = 0; j < 2; j++) {
BTCAddress* addr = [self addressForAddress:[BTCPublicKeyAddress addressWithData:BTCHash160([accKeychain changeKeyAtIndex:j].publicKey)]];
[addrs addObject:addr];
Expand Down