/* global angular */

angular.module('app')
.directive('accountName', function (Reverse) {
	'use strict';

	function link(scope, element, attributes) {

		scope.$watch('id', function () {

			if (scope.id === undefined) {
				return;
			}

			const network = scope.network || scope.$parent.network;
			Reverse.lookupAndFill(
				res => {
					element[0].innerText = res;
				},
				scope.id,
				network,
				scope.tx
			);
		});
	}

	return {
		restrict: 'E',
		scope: {
			id: '@',
			network: '@',
			tx: '='
		},
		link: link
	};
});

@@ -331,16 +331,107 @@
 es =%3E %7B%0A
+%09%09%09%09%09if (res === scope.id) %7B%0A%09%09%09%09%09%09res = res.slice(0, 4) + '....' + res.slice(-4);%0A %09%09%09%09%09%7D%0A
 %09%09%09%09%09ele

Make account IDs shorter for easier display