changed getContract arg

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>
This commit is contained in:
sapthasurendran 2021-07-26 14:53:53 +05:30 committed by James Taylor
parent 550e95f091
commit 5d6e916436
2 changed files with 2 additions and 5 deletions

View file

@ -69,13 +69,10 @@ export const getGateway = async (): Promise<Gateway> => {
};
export const getContracts = async (
gateway: Gateway
network: Network
): Promise<{ contract: Contract; qscc: Contract }> => {
const network = await gateway.getNetwork(config.channelName);
const contract = network.getContract(config.chaincodeName);
const qscc = network.getContract('qscc');
return { contract, qscc };
};

View file

@ -50,8 +50,8 @@ export const createServer = async (): Promise<Application> => {
}
const gateway = await getGateway();
const contracts = await getContracts(gateway);
const network = await getNetwork(gateway);
const contracts = await getContracts(network);
app.set('contracts', contracts);
app.set('redis', redis);
app.set('network', network);