diff --git a/app/src/assets/img/currency_logos/bch.svg b/app/src/assets/img/currency_logos/bch.svg
new file mode 100644
index 0000000..95a0282
--- /dev/null
+++ b/app/src/assets/img/currency_logos/bch.svg
@@ -0,0 +1,14 @@
+
+
\ No newline at end of file
diff --git a/app/src/assets/img/currency_logos/btc.svg b/app/src/assets/img/currency_logos/btc.svg
new file mode 100644
index 0000000..a421df2
--- /dev/null
+++ b/app/src/assets/img/currency_logos/btc.svg
@@ -0,0 +1,15 @@
+
+
\ No newline at end of file
diff --git a/app/src/assets/img/currency_logos/ltc.svg b/app/src/assets/img/currency_logos/ltc.svg
new file mode 100644
index 0000000..d7afa3f
--- /dev/null
+++ b/app/src/assets/img/currency_logos/ltc.svg
@@ -0,0 +1,16 @@
+
+
\ No newline at end of file
diff --git a/app/src/components/denomination/denomination.html b/app/src/components/denomination/denomination.html
index 65c736b..ab0aefb 100644
--- a/app/src/components/denomination/denomination.html
+++ b/app/src/components/denomination/denomination.html
@@ -1,10 +1,21 @@
-
+
+
+ Blockchain
+
+
+
+
+
+
+
+
Units
{{ unit }}
-
+
diff --git a/app/src/components/denomination/denomination.ts b/app/src/components/denomination/denomination.ts
index b484472..e683b1c 100644
--- a/app/src/components/denomination/denomination.ts
+++ b/app/src/components/denomination/denomination.ts
@@ -9,17 +9,33 @@ import { ViewController } from 'ionic-angular';
export class DenominationComponent {
public text: string;
+ public switcherOn: boolean;
+ public currencies: any = [];
public units: any = [];
constructor(
- public currency: CurrencyProvider,
+ public currencyProvider: CurrencyProvider,
public viewCtrl: ViewController
) {
this.text = 'Hello World';
+ this.switcherOn = true;
+ this.currencies = [
+ {
+ name: 'Bitcoin',
+ ticker: 'BTC',
+ url: 'https://insight.bitpay.com'
+ },
+ {
+ name: 'Bitcoin Cash',
+ ticker: 'BCH',
+ url: 'https://bch-insight.bitpay.com'
+ }
+ ];
+
this.units = [
'USD',
- this.currency.defaultCurrency,
- 'm' + this.currency.defaultCurrency,
+ this.currencyProvider.defaultCurrency,
+ 'm' + this.currencyProvider.defaultCurrency,
'bits'
];
}
@@ -28,4 +44,11 @@ export class DenominationComponent {
this.viewCtrl.dismiss();
}
+ public changeCurrency(currency: any): void {
+ console.log('selected currency is', currency.name, currency.ticker);
+ this.close();
+ let theUrl: string = currency.url;
+ console.log('theUrl is', theUrl);
+ window.location.href = theUrl;
+ }
}
diff --git a/app/src/components/head-nav/head-nav.ts b/app/src/components/head-nav/head-nav.ts
index 1ccf83d..dfdf998 100644
--- a/app/src/components/head-nav/head-nav.ts
+++ b/app/src/components/head-nav/head-nav.ts
@@ -112,43 +112,6 @@ export class HeadNavComponent {
/* tslint:enable:no-unused-variable */
public changeCurrency(myEvent: any): void {
- /*
- let actionSheet: any = this.actionSheetCtrl.create({
- title: 'Change Denomination',
- buttons: [
- {
- text: 'USD',
- handler: () => {
- this.currency.setCurrency('USD');
- }
- },
- {
- text: this.currency.defaultCurrency,
- handler: () => {
- this.currency.setCurrency(this.currency.defaultCurrency);
- }
- },
- {
- text: 'm' + this.currency.defaultCurrency,
- handler: () => {
- this.currency.setCurrency('m' + this.currency.defaultCurrency);
- }
- },
- {
- text: 'bits',
- handler: () => {
- this.currency.setCurrency('bits');
- }
- },
- {
- text: 'Cancel',
- role: 'cancel'
- }
- ]
- });
- actionSheet.present();
- */
-
let popover: any = this.popoverCtrl.create(DenominationComponent);
popover.present({
ev: myEvent