mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-05-31 02:51:03 +00:00
Cleanup issues, allow travis build (#1)
* Cleanup issues, allow travis build * Add missing xmlserializer package * xmlserializer as dev dep
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user