Creating the BankTabCreate.js component

The BankTabCreate.js component renders a screen that can be used for capturing the details for creating a new LC. On submitting the request, it calls the createLC method, which generates a new LC contract on the blockchain. More on this method later, when we write our App.js code. The code can be seen here:

</div>
<InputField onInputChangeUpdateField={props.onInputChangeUpdateField}
fields={props.fields} name="BuyerAccount" placeholder="Buyer Account"/>

<InputField onInputChangeUpdateField={props.onInputChangeUpdateField}
fields={props.fields} name="SellerAccount" placeholder="Seller Account"/>

<InputField onInputChangeUpdateField={props.onInputChangeUpdateField}
fields={props.fields} name="Amount" placeholder="Amount"addon="USD"/>

<InputField onInputChangeUpdateField={props.onInputChangeUpdateField}
fields={props.fields} name="DOExpiry" placeholder="Date of Expiry (YYYYMMDD)"/>
</div>

</div>
<div className="panel-block is-paddingless is-12 ">
<div className="column has-text-centered ">

<div className="button" onClick={() => props.createLC()}>
Submit
</div>


<div className="button" onClick={() => props.closeTab()}>
Back
</div>

The screen captures the Buyer's Ethereum account address, the Seller's Ethereum account address, the amount of the LC escrow, and the DOE of the LC through the input fields. By clicking on the Submit button, it calls the createLC method to invoke the LCMaster smart contract.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.142.248