mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 07:25:10 +00:00
changed getContract arg
Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>
This commit is contained in:
parent
550e95f091
commit
5d6e916436
2 changed files with 2 additions and 5 deletions
|
|
@ -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 };
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue