@@ -3,7 +3,7 @@ import 'bootstrap/dist/css/bootstrap.css'
33
44import React from 'react'
55import { Container , Row , Col , Form , Button } from 'react-bootstrap'
6- import { BITBOX , Crypto } from 'bitbox-sdk'
6+ import { BITBOX } from 'bitbox-sdk'
77import { ECPair } from 'bitcoincashjs-lib'
88import { CashCompiler , ElectrumNetworkProvider , Contract , SignatureTemplate } from 'cashscript'
99
@@ -12,16 +12,13 @@ interface AppState {
1212 balance ?: number
1313 seed : string
1414 keypair ?: ECPair
15- loading : boolean
1615 receiveAddress : string
1716 transactionLink ?: string
1817}
1918
20-
2119class App extends React . Component < { } , AppState > {
2220 state : AppState = {
2321 seed : 'CashScript' ,
24- loading : false ,
2522 receiveAddress : 'bchtest:pzfsp649y00eay9mm3ky63ln72v3h6tx6gul8mlg93' ,
2623 }
2724
@@ -32,7 +29,6 @@ class App extends React.Component<{}, AppState> {
3229 }
3330
3431 async compileContract ( seed : string ) {
35- this . setState ( { loading : true } )
3632 // Fetch CashFile
3733 const source = await this . getContractSource ( )
3834
@@ -61,7 +57,7 @@ class App extends React.Component<{}, AppState> {
6157 // Retrieve contract balance
6258 const balance = await contract . getBalance ( )
6359
64- this . setState ( { contract, balance, keypair : alice , loading : false } )
60+ this . setState ( { contract, balance, keypair : alice } )
6561 }
6662
6763 async sendTestTransaction ( receiveAddress : string ) {
0 commit comments