-
Address {{ getConvertedNumber(address.balance) | number:'1.0-8' }}
+ Address {{ getConvertedNumber(address.balance, chainNetwork.chain) | number:'1.0-8' }}
{{ currencyProvider.currencySymbol }}
{{ address.addrStr }}
diff --git a/packages/insight/src/pages/transaction/transaction.module.ts b/packages/insight/src/pages/transaction/transaction.module.ts
index 84c066ab80c..61b8c4d7f15 100644
--- a/packages/insight/src/pages/transaction/transaction.module.ts
+++ b/packages/insight/src/pages/transaction/transaction.module.ts
@@ -4,7 +4,10 @@ import { ErrorComponentModule } from '../../components/error/error.module';
import { FooterComponentModule } from '../../components/footer/footer.module';
import { HeadNavComponentModule } from '../../components/head-nav/head-nav.module';
import { LoaderComponentModule } from '../../components/loader/loader.module';
-import { TransactionComponentModule } from '../../components/transaction/transaction.module';
+import { TransactionDetailsEthComponentModule } from '../../components/transaction-details-eth/transaction-details-eth.module';
+import { TransactionDetailsComponentModule } from '../../components/transaction-details/transaction-details.module';
+import { TransactionSummaryEthComponentModule } from '../../components/transaction-summary-eth/transaction-summary-eth.module';
+import { TransactionSummaryComponentModule } from '../../components/transaction-summary/transaction-summary.module';
import { CopyToClipboardModule } from '../../directives/copy-to-clipboard/copy-to-clipboard.module';
import { TransactionPage } from './transaction';
@@ -12,7 +15,10 @@ import { TransactionPage } from './transaction';
declarations: [TransactionPage],
imports: [
IonicPageModule.forChild(TransactionPage),
- TransactionComponentModule,
+ TransactionSummaryEthComponentModule,
+ TransactionSummaryComponentModule,
+ TransactionDetailsComponentModule,
+ TransactionDetailsEthComponentModule,
FooterComponentModule,
HeadNavComponentModule,
LoaderComponentModule,
diff --git a/packages/insight/src/pages/transaction/transaction.ts b/packages/insight/src/pages/transaction/transaction.ts
index 6540ef1cc11..a0c915d077e 100644
--- a/packages/insight/src/pages/transaction/transaction.ts
+++ b/packages/insight/src/pages/transaction/transaction.ts
@@ -23,9 +23,9 @@ export class TransactionPage {
public fromVout: boolean;
public confirmations: number;
public errorMessage: string;
+ public chainNetwork: ChainNetwork;
private txId: string;
- private chainNetwork: ChainNetwork;
constructor(
public navParams: NavParams,
@@ -53,8 +53,15 @@ export class TransactionPage {
public ionViewDidEnter(): void {
this.txProvider.getTx(this.txId, this.chainNetwork).subscribe(
- data => {
- this.tx = this.txProvider.toAppTx(data);
+ response => {
+ let tx;
+ if(this.chainNetwork.chain === "BTC" || this.chainNetwork.chain === "BCH") {
+ tx = this.txProvider.toUtxoCoinsAppTx(response);
+ }
+ if(this.chainNetwork.chain === "ETH") {
+ tx = this.txProvider.toEthAppTx(response);
+ }
+ this.tx = tx;
this.loading = false;
this.txProvider
.getConfirmations(this.tx.blockheight, this.chainNetwork)
diff --git a/packages/insight/src/providers/address/address.ts b/packages/insight/src/providers/address/address.ts
index 584853a5106..fa167d9d488 100644
--- a/packages/insight/src/providers/address/address.ts
+++ b/packages/insight/src/providers/address/address.ts
@@ -4,7 +4,7 @@ import { Observable } from 'rxjs';
import { ApiProvider, ChainNetwork } from '../../providers/api/api';
import { CurrencyProvider } from '../../providers/currency/currency';
import { BlocksProvider } from '../blocks/blocks';
-import { ApiCoin, TxsProvider } from '../transactions/transactions';
+import { ApiCoin, ApiEthCoin, TxsProvider } from '../transactions/transactions';
export interface ApiAddr {
confirmed: number;
@@ -33,8 +33,8 @@ export class AddressProvider {
);
}
- public getAddressActivity(addrStr?: string): Observable