diff --git a/src/app/pages/settings/share/share.scss b/src/app/pages/settings/share/share.scss
new file mode 100644
index 00000000000..0ff03138478
--- /dev/null
+++ b/src/app/pages/settings/share/share.scss
@@ -0,0 +1,43 @@
+.share-image-container {
+ height: 55vh;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ .share-the-love {
+ display: flex;
+ justify-content: center;
+ .share-the-love-illustration {
+ width: 25%;
+ height: 25%;
+ }
+ }
+}
+.subtitle {
+ padding: 30px;
+ text-align: center;
+}
+.share-buttons {
+ padding: 50px 10px 30px;
+ text-align: center;
+ background-color: var(--color-blank);
+ min-height: 180px;
+ position: absolute;
+ bottom: 0rem;
+ width: 100%;
+ height: 30%;
+}
+.share-buttons__action {
+ display: inline-block;
+ width: 90px;
+ height: 90px;
+ img {
+ width: 50px;
+ }
+ .name {
+ padding-top: 10px;
+ font-size: 0.9rem;
+ }
+}
+.illustration-send {
+ text-align: center;
+}
diff --git a/src/pages/settings/share/share.ts b/src/app/pages/settings/share/share.ts
similarity index 97%
rename from src/pages/settings/share/share.ts
rename to src/app/pages/settings/share/share.ts
index 5dc2e354070..a1e4a595904 100644
--- a/src/pages/settings/share/share.ts
+++ b/src/app/pages/settings/share/share.ts
@@ -2,7 +2,7 @@ import { Component } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
// native
-import { SocialSharing } from '@ionic-native/social-sharing';
+import { SocialSharing } from '@ionic-native/social-sharing/ngx';
// providers
import { AnalyticsProvider } from '../../../providers/analytics/analytics';
@@ -14,7 +14,8 @@ import { PopupProvider } from '../../../providers/popup/popup';
import { ReplaceParametersProvider } from '../../../providers/replace-parameters/replace-parameters';
@Component({
selector: 'page-share',
- templateUrl: 'share.html'
+ templateUrl: 'share.html',
+ styleUrls: ['share.scss']
})
export class SharePage {
public title: string;
diff --git a/src/app/pages/settings/wallet-settings/wallet-delete/wallet-delete.html b/src/app/pages/settings/wallet-settings/wallet-delete/wallet-delete.html
new file mode 100644
index 00000000000..d45c9f212c5
--- /dev/null
+++ b/src/app/pages/settings/wallet-settings/wallet-delete/wallet-delete.html
@@ -0,0 +1,14 @@
+
+
+
Warning!
+
+ Permanently delete this account.
+
+
+ THIS ACTION CANNOT BE REVERSED
+
+
+ {{'Delete' | translate}}
+
+
+
\ No newline at end of file
diff --git a/src/pages/settings/wallet-settings/wallet-delete/wallet-delete.scss b/src/app/pages/settings/wallet-settings/wallet-delete/wallet-delete.scss
similarity index 100%
rename from src/pages/settings/wallet-settings/wallet-delete/wallet-delete.scss
rename to src/app/pages/settings/wallet-settings/wallet-delete/wallet-delete.scss
diff --git a/src/pages/settings/wallet-settings/wallet-delete/wallet-delete.ts b/src/app/pages/settings/wallet-settings/wallet-delete/wallet-delete.ts
similarity index 78%
rename from src/pages/settings/wallet-settings/wallet-delete/wallet-delete.ts
rename to src/app/pages/settings/wallet-settings/wallet-delete/wallet-delete.ts
index c37d3186c9f..bee21e01efb 100644
--- a/src/pages/settings/wallet-settings/wallet-delete/wallet-delete.ts
+++ b/src/app/pages/settings/wallet-settings/wallet-delete/wallet-delete.ts
@@ -1,6 +1,6 @@
import { Component } from '@angular/core';
+import { Router } from '@angular/router';
import { TranslateService } from '@ngx-translate/core';
-import { NavController, NavParams } from 'ionic-angular';
// providers
import { KeyProvider } from '../../../../providers/key/key';
@@ -12,38 +12,44 @@ import { PushNotificationsProvider } from '../../../../providers/push-notificati
@Component({
selector: 'page-wallet-delete',
- templateUrl: 'wallet-delete.html'
+ templateUrl: 'wallet-delete.html',
+ styleUrls: ['wallet-delete.scss']
})
export class WalletDeletePage {
public wallet;
-
+ navParamsData;
private keyId: string;
constructor(
private profileProvider: ProfileProvider,
- private navCtrl: NavController,
- private navParams: NavParams,
+ private router: Router,
private popupProvider: PopupProvider,
private onGoingProcessProvider: OnGoingProcessProvider,
private logger: Logger,
private translate: TranslateService,
private keyProvider: KeyProvider,
private pushNotificationsProvider: PushNotificationsProvider
- ) {}
+ ) {
+ if (this.router.getCurrentNavigation()) {
+ this.navParamsData = this.router.getCurrentNavigation().extras.state ? this.router.getCurrentNavigation().extras.state : {};
+ } else {
+ this.navParamsData = history ? history.state : undefined;
+ }
+ }
- ionViewDidLoad() {
+ ngOnInit() {
this.logger.info('Loaded: WalletDeletePage');
}
ionViewWillEnter() {
- const walletId = this.navParams.data.walletId;
- this.keyId = this.navParams.data.keyId;
+ const walletId = this.navParamsData.walletId;
+ this.keyId = this.navParamsData.keyId;
this.wallet = this.profileProvider.getWallet(walletId);
}
public showDeletePopup(): void {
const title = this.translate.instant('Warning!');
const message = this.translate.instant(
- 'Are you sure you want to delete this wallet?'
+ 'Are you sure you want to delete this account?'
);
this.popupProvider.ionicConfirm(title, message, null, null).then(res => {
if (res) this.deleteWallet();
@@ -82,7 +88,7 @@ export class WalletDeletePage {
private goHome() {
setTimeout(() => {
- this.navCtrl.popToRoot();
+ this.router.navigate([''], { replaceUrl: true });
}, 1000);
}
}
diff --git a/src/app/pages/settings/wallet-settings/wallet-name/wallet-name.html b/src/app/pages/settings/wallet-settings/wallet-name/wallet-name.html
new file mode 100644
index 00000000000..4986ae5ac2a
--- /dev/null
+++ b/src/app/pages/settings/wallet-settings/wallet-name/wallet-name.html
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+ {{'Update' | translate}}
+
+
+
+
\ No newline at end of file
diff --git a/src/app/pages/settings/wallet-settings/wallet-name/wallet-name.scss b/src/app/pages/settings/wallet-settings/wallet-name/wallet-name.scss
new file mode 100644
index 00000000000..114a6bbe7bf
--- /dev/null
+++ b/src/app/pages/settings/wallet-settings/wallet-name/wallet-name.scss
@@ -0,0 +1,18 @@
+.settings-explanation {
+ padding: 16px;
+ .settings-heading {
+ font-size: 17px;
+ margin: 1rem 0;
+ }
+ .settings-description {
+ font-size: 12px;
+ }
+}
+
+.item-wallet {
+ padding: 12px 0 0 22px !important;
+ margin-bottom: 12px;
+ ion-label {
+ padding-left: 0;
+ }
+}
\ No newline at end of file
diff --git a/src/app/pages/settings/wallet-settings/wallet-name/wallet-name.ts b/src/app/pages/settings/wallet-settings/wallet-name/wallet-name.ts
new file mode 100644
index 00000000000..8a0641440ce
--- /dev/null
+++ b/src/app/pages/settings/wallet-settings/wallet-name/wallet-name.ts
@@ -0,0 +1,86 @@
+import { Component } from '@angular/core';
+import { FormBuilder, FormGroup, Validators } from '@angular/forms';
+import { TranslateService } from '@ngx-translate/core';
+import { Logger } from '../../../../providers/logger/logger';
+
+// services
+import { ConfigProvider } from '../../../../providers/config/config';
+import { ProfileProvider } from '../../../../providers/profile/profile';
+import { ReplaceParametersProvider } from '../../../../providers/replace-parameters/replace-parameters';
+import { EventManagerService } from 'src/app/providers/event-manager.service';
+import { Router } from '@angular/router';
+import { Location } from '@angular/common';
+@Component({
+ selector: 'page-wallet-name',
+ templateUrl: 'wallet-name.html',
+ styleUrls: ['wallet-name.scss']
+})
+export class WalletNamePage {
+ public wallet;
+ public walletName: string;
+ public walletNameForm: FormGroup;
+ public description: string;
+ navParamsData;
+ private config;
+
+ constructor(
+ private profileProvider: ProfileProvider,
+ private router: Router,
+ private configProvider: ConfigProvider,
+ private formBuilder: FormBuilder,
+ private events: EventManagerService,
+ private logger: Logger,
+ private replaceParametersProvider: ReplaceParametersProvider,
+ private translate: TranslateService,
+ private location: Location,
+ ) {
+ if (this.router.getCurrentNavigation()) {
+ this.navParamsData = this.router.getCurrentNavigation().extras.state ? this.router.getCurrentNavigation().extras.state : {};
+ } else {
+ this.navParamsData = history ? history.state : undefined;
+ }
+ this.walletNameForm = this.formBuilder.group({
+ walletName: [
+ '',
+ Validators.compose([Validators.minLength(1), Validators.required])
+ ]
+ });
+ }
+
+ ngOnInit(){
+ this.logger.info('Loaded: WalletNamePage');
+ }
+
+ ionViewWillEnter() {
+ this.wallet = this.profileProvider.getWallet(this.navParamsData.walletId);
+ this.config = this.configProvider.get();
+ let alias =
+ this.config.aliasFor &&
+ this.config.aliasFor[this.wallet.credentials.walletId];
+ this.walletNameForm.value.walletName = alias
+ ? alias
+ : this.wallet.credentials.walletName;
+ this.walletName = this.wallet.credentials.walletName;
+ this.description = this.replaceParametersProvider.replace(
+ this.translate.instant(
+ 'When this wallet was created, it was called "{{walletName}}". You can change the name displayed on this device below.'
+ ),
+ { walletName: this.walletName }
+ );
+ }
+
+ public save(): void {
+ let opts = {
+ aliasFor: {}
+ };
+ opts.aliasFor[
+ this.wallet.credentials.walletId
+ ] = this.walletNameForm.value.walletName;
+ this.configProvider.set(opts);
+ this.events.publish('Local/ConfigUpdate', {
+ walletId: this.wallet.credentials.walletId
+ });
+ this.profileProvider.setOrderedWalletsByGroup();
+ this.location.back();
+ }
+}
diff --git a/src/app/pages/settings/wallet-settings/wallet-settings-advanced/wallet-addresses/all-addresses/all-addresses.html b/src/app/pages/settings/wallet-settings/wallet-settings-advanced/wallet-addresses/all-addresses/all-addresses.html
new file mode 100644
index 00000000000..7bc63445caa
--- /dev/null
+++ b/src/app/pages/settings/wallet-settings/wallet-settings-advanced/wallet-addresses/all-addresses/all-addresses.html
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+ {{'Addresses with balance' | translate}}
+
+
+
+
+ {{w.address}}
+
+ {{w.amount | satToUnit: coin}}
+
+
+
+
+
+
+ {{'Unused addresses' | translate}}
+
+
+
+
+ {{u.address}}
+
+ {{u.path}} {{u.createdOn * 1000 | amDateFormat:'MMMM Do YYYY, hh:mm a'}}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/pages/settings/wallet-settings/wallet-settings-advanced/wallet-addresses/all-addresses/all-addresses.scss b/src/app/pages/settings/wallet-settings/wallet-settings-advanced/wallet-addresses/all-addresses/all-addresses.scss
new file mode 100644
index 00000000000..ba3df936d05
--- /dev/null
+++ b/src/app/pages/settings/wallet-settings/wallet-settings-advanced/wallet-addresses/all-addresses/all-addresses.scss
@@ -0,0 +1,10 @@
+.address-container {
+ padding-bottom: 15px;
+}
+ion-item {
+ cursor: pointer;
+ .info {
+ color: var(--ion-color-primary) !important;
+ margin-top: 1px;
+ }
+}
\ No newline at end of file
diff --git a/src/pages/settings/wallet-settings/wallet-settings-advanced/wallet-addresses/all-addresses/all-addresses.ts b/src/app/pages/settings/wallet-settings/wallet-settings-advanced/wallet-addresses/all-addresses/all-addresses.ts
similarity index 89%
rename from src/pages/settings/wallet-settings/wallet-settings-advanced/wallet-addresses/all-addresses/all-addresses.ts
rename to src/app/pages/settings/wallet-settings/wallet-settings-advanced/wallet-addresses/all-addresses/all-addresses.ts
index c0871cdbb5b..62671d0a387 100644
--- a/src/pages/settings/wallet-settings/wallet-settings-advanced/wallet-addresses/all-addresses/all-addresses.ts
+++ b/src/app/pages/settings/wallet-settings/wallet-settings-advanced/wallet-addresses/all-addresses/all-addresses.ts
@@ -1,18 +1,20 @@
import { Component } from '@angular/core';
-import { NavParams, ViewController } from 'ionic-angular';
import { Logger } from '../../../../../../providers/logger/logger';
// native
-import { SocialSharing } from '@ionic-native/social-sharing';
+import { SocialSharing } from '@ionic-native/social-sharing/ngx';
-// providers
+// services
import { AppProvider } from '../../../../../../providers/app/app';
import { OnGoingProcessProvider } from '../../../../../../providers/on-going-process/on-going-process';
import { PlatformProvider } from '../../../../../../providers/platform/platform';
+import { ModalController, NavParams } from '@ionic/angular';
+import { Router } from '@angular/router';
@Component({
selector: 'page-all-addresses',
- templateUrl: 'all-addresses.html'
+ templateUrl: 'all-addresses.html',
+ styleUrls: ['all-addresses.scss']
})
export class AllAddressesPage {
public noBalance;
@@ -20,17 +22,16 @@ export class AllAddressesPage {
public coin: string;
public isCordova: boolean;
public allAddresses;
-
private walletName: string;
constructor(
- private navParams: NavParams,
- private viewCtrl: ViewController,
+ private viewCtrl: ModalController,
private onGoingProcessProvider: OnGoingProcessProvider,
private socialSharing: SocialSharing,
private appProvider: AppProvider,
private logger: Logger,
- private platformProvider: PlatformProvider
+ private platformProvider: PlatformProvider,
+ private navParams: NavParams
) {
this.walletName = this.navParams.data.walletName;
this.noBalance = this.navParams.data.noBalance;
diff --git a/src/app/pages/settings/wallet-settings/wallet-settings-advanced/wallet-addresses/wallet-addresses.html b/src/app/pages/settings/wallet-settings/wallet-settings-advanced/wallet-addresses/wallet-addresses.html
new file mode 100644
index 00000000000..0c83f1c27a1
--- /dev/null
+++ b/src/app/pages/settings/wallet-settings/wallet-settings-advanced/wallet-addresses/wallet-addresses.html
@@ -0,0 +1,123 @@
+
+
+
+
+ Each bitcoin wallet can generate billions of addresses from your 12-word recovery phrase. A new address is automatically generated and shown each time you receive a payment.
+
+
+
+
+
+ It's a good idea to avoid reusing addresses - this both protects your privacy and keeps your bitcoins secure against hypothetical attacks by quantum computers.
+
+
+
+
+
+ Scan addresses for funds
+
+
+
+
+ Loading addresses...
+
+
+
+
+
+
+ {{'Account Inputs' | translate}}
+
+
+
+
+
+
+
+
+
+
+
+ Total account inputs
+
+
+ {{allUtxosNb}} [{{allUtxosSum}}]
+
+
+
+
+
+
+
+
+
+
+
+ Low amount inputs
+
+
+ {{lowUtxosNb}} [{{ lowUtxosSum }}]
+
+
+
+
+
+
+
+
+
+
+
+ Bitcoin network fee
+
+
+ ~{{minFeePer}}
+ [{{minFee}}]
+
+
+
+
+
+
+
+
+
+
+
+
+ {{'Addresses with balance' | translate}}
+
+
+
+
+
+
+
+ {{w.address}}
+ {{w.amount | satToUnit: wallet.coin}}
+
+
+
+
+
+
+
+
+
+ {{'Unused addresses' | translate}}
+
+
+
+
+
+
+
+ {{u.address}}
+ {{u.path}} {{u.createdOn * 1000 | amDateFormat:'MMMM Do YYYY, hh:mm a'}}
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/pages/settings/wallet-settings/wallet-settings-advanced/wallet-addresses/wallet-addresses.scss b/src/app/pages/settings/wallet-settings/wallet-settings-advanced/wallet-addresses/wallet-addresses.scss
new file mode 100644
index 00000000000..0c03fe9f7ac
--- /dev/null
+++ b/src/app/pages/settings/wallet-settings/wallet-settings-advanced/wallet-addresses/wallet-addresses.scss
@@ -0,0 +1,77 @@
+page-wallet-addresses {
+ ion-list {
+ margin-bottom: 3rem;
+ &.ios {
+ margin-bottom: 5rem;
+ }
+ }
+ .add-icon {
+ font-size: 1.7rem !important;
+ margin: 0 !important;
+ padding: 20px !important;
+ }
+ .loading {
+ display: flex;
+ justify-content: center;
+ padding: 30px;
+ span {
+ margin: auto 10px auto 10px;
+ }
+ }
+
+ ion-item {
+ ion-label {
+ h3, h4 {
+ padding: 0;
+ font-size: 16px !important;
+ font-weight: 400 !important;
+ color: #001E2E;
+ letter-spacing: 0.5px;
+ }
+ p {
+ color: rgba(0, 30, 46, 0.6) !important;
+ line-height: 20px !important;
+ letter-spacing: 0.25px;
+ }
+ }
+ &.scan-item {
+ --padding-top: 5px;
+ --padding-bottom: 5px;
+ border: 1px solid rgba(112, 129, 138, 0.16);
+ border-right: 0;
+ border-left: 0;
+ ion-label {
+ color: var(--color-primary) !important;
+ }
+ }
+ &.item-wallet-input {
+ ion-label {
+ display: flex;
+ justify-content: space-between;
+ }
+ }
+
+ .network-fee-title {
+ line-height: 42px;
+ }
+ }
+ .explanation {
+ padding: 0 1rem 1rem 1rem;
+ font-size: 14px;
+ line-height: 20px;
+ letter-spacing: 0.25px;
+ color: rgba(0, 30, 46, 0.6);
+ &-sub {
+ padding: 0;
+ }
+ }
+}
+
+.up-down-icon {
+ width: 15px !important;
+ height: 15px !important;
+ margin: 0 !important;
+ padding: 0 !important;
+}
+
+
diff --git a/src/app/pages/settings/wallet-settings/wallet-settings-advanced/wallet-addresses/wallet-addresses.ts b/src/app/pages/settings/wallet-settings/wallet-settings-advanced/wallet-addresses/wallet-addresses.ts
new file mode 100644
index 00000000000..cd8060c86f9
--- /dev/null
+++ b/src/app/pages/settings/wallet-settings/wallet-settings-advanced/wallet-addresses/wallet-addresses.ts
@@ -0,0 +1,217 @@
+import { Component, ViewEncapsulation } from '@angular/core';
+import { TranslateService } from '@ngx-translate/core';
+import { Logger } from '../../../../../providers/logger/logger';
+
+// services
+import { BwcErrorProvider } from '../../../../../providers/bwc-error/bwc-error';
+import { PopupProvider } from '../../../../../providers/popup/popup';
+import { ProfileProvider } from '../../../../../providers/profile/profile';
+import { TxFormatProvider } from '../../../../../providers/tx-format/tx-format';
+import { WalletProvider } from '../../../../../providers/wallet/wallet';
+import { AppProvider } from 'src/app/providers';
+
+// pages
+import { WalletDetailsPage } from '../../../../wallet-details/wallet-details';
+import { AllAddressesPage } from './all-addresses/all-addresses';
+
+import * as _ from 'lodash';
+import { ModalController } from '@ionic/angular';
+import { Router } from '@angular/router';
+
+@Component({
+ selector: 'page-wallet-addresses',
+ templateUrl: 'wallet-addresses.html',
+ styleUrls: ['wallet-addresses.scss'],
+ encapsulation: ViewEncapsulation.None
+})
+export class WalletAddressesPage {
+ public wallet;
+ public loading: boolean;
+ public latestUnused;
+ public latestWithBalance;
+ public viewAll: boolean;
+ public lowUtxosNb: number;
+ public allUtxosNb: number;
+ public lowUtxosSum: string;
+ public allUtxosSum: string;
+ public minFee: string;
+ public minFeePer: string;
+ public isShowWalletInpus: boolean;
+ public isShowAddressBalance: boolean;
+ public isShowUnsedAddress: boolean;
+ public currentTheme: string;
+
+ private UNUSED_ADDRESS_LIMIT: number;
+ private BALANCE_ADDRESS_LIMIT: number;
+ private withBalance;
+ private noBalance;
+ navParamsData;
+
+ constructor(
+ private profileProvider: ProfileProvider,
+ private walletProvider: WalletProvider,
+ private router: Router,
+ private logger: Logger,
+ private bwcErrorProvider: BwcErrorProvider,
+ private popupProvider: PopupProvider,
+ private modalCtrl: ModalController,
+ private txFormatProvider: TxFormatProvider,
+ private appProvider: AppProvider,
+ private translate: TranslateService
+ ) {
+ if (this.router.getCurrentNavigation()) {
+ this.navParamsData = this.router.getCurrentNavigation().extras.state ? this.router.getCurrentNavigation().extras.state : {};
+ } else {
+ this.navParamsData = history ? history.state : {};
+ }
+ this.UNUSED_ADDRESS_LIMIT = 5;
+ this.BALANCE_ADDRESS_LIMIT = 5;
+ this.wallet = this.profileProvider.getWallet(this.navParamsData.walletId);
+ this.withBalance = null;
+ this.noBalance = null;
+ this.isShowWalletInpus = true;
+ this.isShowAddressBalance = true;
+ this.isShowUnsedAddress = true;
+ this.currentTheme = this.appProvider.themeProvider.currentAppTheme;
+ }
+
+ ionViewWillEnter() {
+ this.loading = true;
+ this.walletProvider
+ .getMainAddresses(this.wallet, {
+ doNotVerify: true
+ })
+ .then(allAddresses => {
+ const { token, multisigEthInfo } = this.wallet.credentials;
+ this.walletProvider
+ .getBalance(this.wallet, {
+ tokenAddress: token ? token.address : '',
+ multisigContractAddress: multisigEthInfo
+ ? multisigEthInfo.multisigContractAddress
+ : ''
+ })
+ .then(resp => {
+ this.withBalance = resp.byAddress;
+
+ const idx = _.keyBy(this.withBalance, 'address');
+ this.noBalance = _.reject(allAddresses, x => {
+ return idx[x.address];
+ });
+
+ 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
+ );
+ this.viewAll =
+ this.noBalance.length > this.UNUSED_ADDRESS_LIMIT ||
+ this.withBalance.length > this.BALANCE_ADDRESS_LIMIT;
+
+ this.loading = false;
+ })
+ .catch(err => {
+ this.logger.error(err);
+ this.loading = false;
+ this.popupProvider.ionicAlert(
+ this.bwcErrorProvider.msg(
+ err,
+ this.translate.instant('Could not update account')
+ )
+ );
+ });
+ })
+ .catch(err => {
+ this.logger.error(err);
+ this.loading = false;
+ this.popupProvider.ionicAlert(
+ this.bwcErrorProvider.msg(
+ err,
+ this.translate.instant('Could not update account')
+ )
+ );
+ });
+
+ this.walletProvider
+ .getLowUtxos(this.wallet)
+ .then(resp => {
+ if (resp && resp.allUtxos && resp.allUtxos.length) {
+ const allSum = _.sumBy(resp.allUtxos || 0, 'satoshis');
+ const per = (resp.minFee / allSum) * 100;
+
+ this.lowUtxosNb = resp.lowUtxos.length;
+ this.allUtxosNb = resp.allUtxos.length;
+ this.lowUtxosSum = this.txFormatProvider.formatAmountStr(
+ this.wallet.coin,
+ _.sumBy(resp.lowUtxos || 0, 'satoshis')
+ );
+ this.allUtxosSum = this.txFormatProvider.formatAmountStr(
+ this.wallet.coin,
+ allSum
+ );
+ this.minFee = this.txFormatProvider.formatAmountStr(
+ this.wallet.coin,
+ resp.minFee || 0
+ );
+ this.minFeePer = per.toFixed(2) + '%';
+ }
+ })
+ .catch(err => {
+ this.logger.warn('GetLowUtxos', err);
+ });
+ }
+
+ private processList(list): void {
+ _.each(list, n => {
+ n.path = n.path ? n.path.replace(/^m/g, 'xpub') : null;
+ n.address = this.walletProvider.getAddressView(
+ this.wallet.coin,
+ this.wallet.network,
+ n.address
+ );
+ });
+ }
+
+ public async viewAllAddresses() {
+ const modal = await this.modalCtrl.create({
+ component: AllAddressesPage,
+ componentProps: {
+ noBalance: this.noBalance,
+ withBalance: this.withBalance,
+ coin: this.wallet.coin,
+ walletName: this.wallet.name
+ }
+ });
+ await modal.present();
+ }
+
+ public scan() {
+ this.walletProvider.startScan(this.wallet);
+ this.router.navigate([''], { replaceUrl: true }).then(() => {
+ setTimeout(() => {
+ this.router.navigate(['/wallet-details'], {
+ state: { walletId: this.wallet.credentials.walletId }
+ });
+ }, 1000);
+ });
+ }
+
+ public handleClickShowWallInputs() {
+ this.isShowWalletInpus = !this.isShowWalletInpus;
+ }
+
+ public handleClickAddessBalance() {
+ this.isShowAddressBalance = !this.isShowAddressBalance;
+ }
+
+ public handleClickUnsedAdress() {
+ this.isShowUnsedAddress = !this.isShowUnsedAddress;
+ }
+}
diff --git a/src/pages/settings/wallet-settings/wallet-settings-advanced/wallet-duplicate/wallet-duplicate.html b/src/app/pages/settings/wallet-settings/wallet-settings-advanced/wallet-duplicate/wallet-duplicate.html
similarity index 87%
rename from src/pages/settings/wallet-settings/wallet-settings-advanced/wallet-duplicate/wallet-duplicate.html
rename to src/app/pages/settings/wallet-settings/wallet-settings-advanced/wallet-duplicate/wallet-duplicate.html
index fd449cfa530..d5ac64f9cd2 100644
--- a/src/pages/settings/wallet-settings/wallet-settings-advanced/wallet-duplicate/wallet-duplicate.html
+++ b/src/app/pages/settings/wallet-settings/wallet-settings-advanced/wallet-duplicate/wallet-duplicate.html
@@ -18,8 +18,8 @@
-