Skip to content
This repository has been archived by the owner on Jun 11, 2022. It is now read-only.

Commit

Permalink
Fix links to QR code handlers.This fixes #81
Browse files Browse the repository at this point in the history
  • Loading branch information
johansten committed May 13, 2018
1 parent 3e2f21f commit ee0fae0
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 25 deletions.
11 changes: 7 additions & 4 deletions app/core/services/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import 'ionic-sdk/release/js/ionic.bundle';
import StellarSdk from 'stellar-sdk';
import contacts from './contacts.js';

import ContactListController from '../../pages/global-settings/contact-list.component';

const isEmpty = (obj) => Object.keys(obj).length === 0;

angular.module('app.service.commands', [])
Expand Down Expand Up @@ -92,7 +94,7 @@ angular.module('app.service.commands', [])
account: account,
key: key
}));
$location.path(`/side-menu/import-account/${data}`);
$location.path(`/page/add-account/import-account/${data}`);
}

function handleCentaurusImport(backupString) {
Expand All @@ -101,7 +103,7 @@ angular.module('app.service.commands', [])
cipher: backupString.slice(19)
}));

$location.path(`/side-menu/import-centaurus/${data}`);
$location.path(`/page/add-account/import-centaurus/${data}`);
}

function handleContact(account) {
Expand All @@ -119,7 +121,8 @@ angular.module('app.service.commands', [])
data.network = account.network;
}

Modal.show('app/account/modals/add-contact.html', data);
/* :KLUDGE: */
new ContactListController(Modal).addContact(data);
}
}

Expand All @@ -142,7 +145,7 @@ angular.module('app.service.commands', [])
object.memo = payment.memo;
}

$location.path('/account/send')
$location.path('/page/send')
.search(object);
}

Expand Down
4 changes: 4 additions & 0 deletions app/pages/add-account/import-account.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export default class ImportAccountController {
this.isScanned = true;
this.account.seed = data.key;
this.account.network = data.account.network;

if (!this.isEncrypted) {
this.state = 2;
}
}

const numAccounts = Object.keys(this.Wallet.accounts).length;
Expand Down
38 changes: 19 additions & 19 deletions app/pages/add-account/import-account.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@
<div ng-show="vm.state==1">
<div class="list">
<form name="importAccountForm">
<div class="item item-divider"></div>

<label class="item item-input item-inset item-stacked-label" ng-if="!vm.isScanned">
<span class="input-label">
{{'account.seed.label' | translate}}
</span>
<input type="text" ng-model="vm.account.seed" ng-change="vm.onChange()" required valid-seed>
</label>

<label class="item item-input item-inset item-stacked-label" ng-if="vm.isEncrypted">
<span class="input-label">
{{'account.password.label' | translate}}
</span>
<input type="password" ng-model="vm.account.password" ng-change="vm.onChange()" seed="vm.account.seed" valid-password2 required>
</label>

<div ng-if="!vm.isScanned">
<network-selector network="vm.account.network"></network-selector>
</div>
<div class="item item-divider"></div>

<label class="item item-input item-inset item-stacked-label" ng-if="!vm.isScanned">
<span class="input-label">
{{'account.seed.label' | translate}}
</span>
<input type="text" ng-model="vm.account.seed" ng-change="vm.onChange()" required valid-seed>
</label>

<label class="item item-input item-inset item-stacked-label" ng-if="vm.isEncrypted">
<span class="input-label">
{{'account.password.label' | translate}}
</span>
<input type="password" ng-model="vm.account.password" ng-change="vm.onChange()" seed="vm.account.seed" valid-password2 required>
</label>

<div ng-if="!vm.isScanned">
<network-selector network="vm.account.network"></network-selector>
</div>
</form>

<div style="padding:8px 16px" ng-hide="importAccountForm.$invalid">
Expand Down
4 changes: 2 additions & 2 deletions app/pages/global-settings/contact-list.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export default class ContactListController {
this.minHeight = this.getMinHeight();
}

addContact() {
this.Modal.show(addContactModal);
addContact(data) {
this.Modal.show(addContactModal, data);
}

getMinHeight() {
Expand Down

0 comments on commit ee0fae0

Please sign in to comment.