From a3d55581a5068a5a29bca79e0ebe5592bc07d18b Mon Sep 17 00:00:00 2001 From: Gabriel Masclef Date: Tue, 16 Jan 2018 14:26:39 -0300 Subject: [PATCH] Unnecessary argument removed --- src/pages/tx-details/tx-details.ts | 4 ++-- src/providers/wallet/wallet.ts | 9 +++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/pages/tx-details/tx-details.ts b/src/pages/tx-details/tx-details.ts index af065b2bb..5f1931424 100644 --- a/src/pages/tx-details/tx-details.ts +++ b/src/pages/tx-details/tx-details.ts @@ -63,7 +63,7 @@ export class TxDetailsPage { this.txsUnsubscribedForNotifications = this.config.confirmedTxsNotifications ? !this.config.confirmedTxsNotifications.enabled : true; if (this.wallet.coin == 'bch') { - if (this.walletProvider.useLegacyAddress(this.wallet)) { + if (this.walletProvider.useLegacyAddress()) { this.blockexplorerUrl = 'bch-insight.bitpay.com'; } else { this.blockexplorerUrl = 'blockdozer.com/insight'; @@ -157,7 +157,7 @@ export class TxDetailsPage { this.walletProvider.getTx(this.wallet, this.txId).then((tx: any) => { if (!opts.hideLoading) this.onGoingProcess.set('loadingTxInfo', false); - this.btx = this.txFormatProvider.processTx(this.wallet.coin, tx, this.walletProvider.useLegacyAddress(this.wallet)); + this.btx = this.txFormatProvider.processTx(this.wallet.coin, tx, this.walletProvider.useLegacyAddress()); let v: string = this.txFormatProvider.formatAlternativeStr(this.wallet.coin, tx.fees); this.btx.feeFiatStr = v; this.btx.feeRateStr = (this.btx.fees / (this.btx.amount + this.btx.fees) * 100).toFixed(2) + '%'; diff --git a/src/providers/wallet/wallet.ts b/src/providers/wallet/wallet.ts index f443b510b..5f71a603d 100644 --- a/src/providers/wallet/wallet.ts +++ b/src/providers/wallet/wallet.ts @@ -25,8 +25,6 @@ import { FeeProvider } from '../fee/fee'; @Injectable() export class WalletProvider { - private bitcoreCash: any; - // Ratio low amount warning (fee/amount) in incoming TX private LOW_AMOUNT_RATIO: number = 0.15; @@ -62,7 +60,6 @@ export class WalletProvider { private feeProvider: FeeProvider ) { this.logger.info('WalletService initialized.'); - this.bitcoreCash = this.bwcProvider.getBitcoreCash(); } @@ -325,7 +322,7 @@ export class WalletProvider { }); } - public useLegacyAddress(wallet: any): boolean { + public useLegacyAddress(): boolean { let config = this.configProvider.get(); let walletSettings = config.wallet; @@ -333,7 +330,7 @@ export class WalletProvider { } public getAddressView(wallet: any, address: string): string { - if (wallet.coin != 'bch' || this.useLegacyAddress(wallet)) return address; + if (wallet.coin != 'bch' || this.useLegacyAddress()) return address; return this.txFormatProvider.toCashAddress(address); } @@ -341,7 +338,7 @@ export class WalletProvider { let proto: string = this.getProtocolHandler(wallet); let protoAddr: string = proto + ':' + address; - if (wallet.coin != 'bch' || this.useLegacyAddress(wallet)) { + if (wallet.coin != 'bch' || this.useLegacyAddress()) { return protoAddr; } else { return protoAddr.toUpperCase();