Unnecessary argument removed

This commit is contained in:
Gabriel Masclef 2018-01-16 14:26:39 -03:00
parent d2c3e97d60
commit a3d55581a5
No known key found for this signature in database
GPG Key ID: DD6D7EAADE12280D
2 changed files with 5 additions and 8 deletions

View File

@ -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) + '%';

View File

@ -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();