ghost-portal/packages/ui-app/src/InputExtrinsic/options/section.js
Jaco Greeff b11a6981a2
Optimise components (#39)
* ui-react-app -> ui-app

* CopyButton, Input & Password components

* Convert all to use ui-app/{Input, Label}

* Change to PureComponent where we have onChange listeners

* Cleanup layouts

* Swap dropdown components, remove uselexx constructors

* Allow address/account forget

* Bump

* Searching with headers operational

* flex grow/shrink for icon + account add

* Fix balance & transaction display (account/address management)

* Adjust balance layout

* Equalise padding
2018-05-11 18:08:10 +02:00

22 lines
536 B
JavaScript

// Copyright 2017-2018 Jaco Greeff
// This software may be modified and distributed under the terms
// of the ISC license. See the LICENSE file for details.
// @flow
import map from '@polkadot/extrinsics-substrate';
export default function createOptions (type: 'private' | 'public'): Array<*> {
return Object
.keys(map)
.sort()
.filter((name) => {
const methods = map[name].methods[type];
return Object.keys(methods).length !== 0;
})
.map((name) => ({
text: name,
value: name
}));
}