Merge pull request #8128 from gabrielbazan7/fix/cashAddr

FIX: Show CashAddr format in addresses view
This commit is contained in:
Gabriel Masclef 2018-02-28 12:10:10 -03:00 committed by GitHub
commit af28dca610
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -68,12 +68,12 @@ export class WalletAddressesPage {
this.withBalance = resp.byAddress;
var idx = _.keyBy(this.withBalance, 'address');
this.noBalance = _.reject(allAddresses, (x) => {
this.noBalance = _.reject(allAddresses, (x: any) => {
return idx[x.address];
});
this.processPaths(this.noBalance);
this.processPaths(this.withBalance);
this.processList(this.noBalance);
this.processList(this.withBalance);
this.latestUnused = _.slice(this.noBalance, 0, this.UNUSED_ADDRESS_LIMIT);
this.latestWithBalance = _.slice(this.withBalance, 0, this.BALANCE_ADDRESS_LIMIT);
@ -112,9 +112,10 @@ export class WalletAddressesPage {
}
private processPaths(list: any): void {
private processList(list: any): void {
_.each(list, (n: any) => {
n.path = n.path.replace(/^m/g, 'xpub');
n.address = this.walletProvider.getAddressView(this.wallet, n.address);
});
}