@@ -4,7 +4,7 @@ const { generateMnemonic } = require('bip39')
44import { Icon , List , Label , Header , Segment , Divider , Button } from 'semantic-ui-react' ;
55import { Bond , TransformBond } from 'oo7' ;
66import { 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' ;
88import Identicon from 'polkadot-identicon' ;
99import { AccountIdBond , SignerBond } from './AccountIdBond.jsx' ;
1010import { 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