January 2020
Intermediate to advanced
530 pages
11h 11m
English
The settleLC method is called when the Seller wants to initiate a settlement. The method starts by instantiating the LCMaster contract.
Next, it calls the viewLC method in LCMaster with the LC number for which settlement is requested. It gets the LC number from the fields defined in the state, as follows:
settleLC = () => { let app = this; var contractMaster = new this.web3.eth.Contract(this.LCMaster.abi,this.LCMaster.address); contractMaster.methods.viewLC(app.state.fields.LCNo).call().then(function(response){
On a successful response, we capture the LC contract address for the LC number, from the response in the LCAddress local variable, as follows:
if(response) { let LCAddress = response[6];
We instantiate ...
Read now
Unlock full access