Cleanup issues, allow travis build (#1)

* Cleanup issues, allow travis build

* Add missing xmlserializer package

* xmlserializer as dev dep
This commit is contained in:
Jaco Greeff
2018-12-05 13:17:11 +01:00
committed by GitHub
parent 21c47a7d3a
commit ea2394f390
5 changed files with 45 additions and 59 deletions
+7 -3
View File
@@ -5,13 +5,17 @@
import { KeyringSectionOption } from './types';
import React from 'react';
import toShortAddress from '@polkadot/ui-app/util/toShortAddress';
import { isUndefined } from '@polkadot/util';
import KeyPair from './KeyPair';
export default function createItem (address: string, _name?: string): KeyringSectionOption {
const name = _name === undefined
? toShortAddress(address)
const name = isUndefined(_name)
? (
(address.length > 15)
? `${address.slice(0, 7)}${address.slice(-7)}`
: address
)
: _name;
return {