Starting on destination UI.

This commit is contained in:
Brendon Duncan 2018-08-02 11:48:41 +12:00
commit ff643bf479
2 changed files with 17 additions and 2 deletions

View file

@ -7,6 +7,13 @@ angular
function reviewController(configService, gettextCatalog, profileService, $scope, txFormatService) {
var vm = this;
vm.destination = {
address: '',
balanceAmount: '',
balanceCurrecy: '',
color: '',
name: ''
};
vm.feeCrypto = '';
vm.feeFiat = '';
vm.origin = {
@ -27,7 +34,7 @@ function reviewController(configService, gettextCatalog, profileService, $scope,
var priceDisplayIsFiat = true;
var satoshis = null;
var toAddress = '';
var toWalletId = '';
var destinationWalletId = '';
@ -47,6 +54,14 @@ function reviewController(configService, gettextCatalog, profileService, $scope,
vm.origin.color = originWallet.color;
vm.origin.name = originWallet.name;
destinationWalletId = data.stateParams.toWalletId;
if (destinationWalletId) {
var destinationWallet = profileService.getWallet(destinationWalletId);
vm.destination.color = destinationWallet.color;
vm.destination.name = destinationWallet.name;
}
configService.get(function onConfig(err, config) {
if (err) {
$log.err('Error getting config.', err);

View file

@ -37,7 +37,7 @@
<div class="item item-gutterless item-complex item-avatar">
<div class="item-content item-content-avatar">
<img src="img/contact-placeholder.svg" class="bg">
<h2>Satoshi Nakamoto</h2>
<h2>{{vm.destination.name}}</h2>
<p>128.67</p>
</div>
<div class="item-content item-content-compact" ng-init="addressExpanded = false">