Skip to content

Commit 06a10ce

Browse files
author
Dom Steil
committed
adding
1 parent acee4ed commit 06a10ce

File tree

2 files changed

+4
-34
lines changed

2 files changed

+4
-34
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "substrate-ui",
33
"version": "1.0.0",
4-
"description": "Dom's Substrate UI",
4+
"description": "Gav's Substrate UI",
55
"main": "index.js",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1",
@@ -22,7 +22,7 @@
2222
"substrate",
2323
"ui"
2424
],
25-
"author": "Dom Steil",
25+
"author": "Gav Wood",
2626
"license": "ISC",
2727
"devDependencies": {
2828
"babel-cli": "^6.26.0",

src/app.jsx

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const { generateMnemonic } = require('bip39')
44
import {Icon, List, Label, Header, Segment, Divider, Button} from 'semantic-ui-react';
55
import {Bond, TransformBond} from 'oo7';
66
import {ReactiveComponent, If, Rspan} from 'oo7-react';
7-
import {calls, runtime, chain, system, runtimeUp, ss58Encode, addressBook, secretStore, metadata} from 'oo7-substrate';
7+
import {calls, runtime, chain, system, runtimeUp, ss58Encode, addressBook, secretStore} from 'oo7-substrate';
88
import Identicon from 'polkadot-identicon';
99
import {AccountIdBond, SignerBond} from './AccountIdBond.jsx';
1010
import {BalanceBond} from './BalanceBond.jsx';
@@ -28,7 +28,6 @@ export class App extends ReactiveComponent {
2828
window.chain = chain;
2929
window.calls = calls;
3030
window.that = this;
31-
window.metadata = metadata;
3231

3332
this.source = new Bond;
3433
this.amount = new Bond;
@@ -40,9 +39,6 @@ export class App extends ReactiveComponent {
4039
this.seedAccount = this.seed.map(s => s ? secretStore().accountFromPhrase(s) : undefined)
4140
this.seedAccount.use()
4241
this.runtime = new Bond;
43-
this.parachainBinary = new Bond;
44-
this.parachainId = new Bond;
45-
this.parachainHead = new Bond;
4642
}
4743

4844
readyRender() {
@@ -199,9 +195,7 @@ export class App extends ReactiveComponent {
199195
icon='send'
200196
tx={{
201197
sender: runtime.balances.tryIndex(this.source),
202-
call: calls.balances.transfer(this.destination, this.amount),
203-
compact: false,
204-
longevity: true
198+
call: calls.balances.transfer(this.destination, this.amount)
205199
}}
206200
/>
207201
</Segment>
@@ -225,30 +219,6 @@ export class App extends ReactiveComponent {
225219
}}
226220
/>
227221
</Segment>
228-
<Divider hidden />
229-
<If condition={runtime.metadata.map(m => m.modules && m.modules.some(o => o.prefix === 'sudo') && m.modules.some(o => o.prefix === 'parachains'))} then={
230-
<Segment style={{margin: '1em'}} padded>
231-
<Header as='h2'>
232-
<Icon name='chain' />
233-
<Header.Content>
234-
Parachain Registration
235-
<Header.Subheader>Add a new Parachain</Header.Subheader>
236-
</Header.Content>
237-
</Header>
238-
<div style={{paddingBottom: '1em'}}></div>
239-
<InputBond bond={this.parachainId} placeholder='Enter a Parachain ID'/>
240-
<InputBond bond={this.parachainHead} placeholder='Initial head data for the Parachain'/>
241-
<FileUploadBond bond={this.parachainBinary} content='Select Parachain Binary' />
242-
<TransactButton
243-
content="Register"
244-
icon='warning'
245-
tx={{
246-
sender: runtime.sudo ? runtime.sudo.key : null,
247-
call: calls.sudo.sudo(calls.parachains.registerParachain(this.parachainId, this.parachainBinary, this.parachainHead.map(hexToBytes)))
248-
}}
249-
/>
250-
</Segment>
251-
}/>
252222
</div>);
253223
}
254224
}

0 commit comments

Comments
 (0)