Skip to content

Commit 7a42e9f

Browse files
committed
1 parent fbd569d commit 7a42e9f

File tree

4 files changed

+16
-19
lines changed

4 files changed

+16
-19
lines changed

api/dist/index.js

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -128,45 +128,43 @@ var sendSignedTransactionProposal = /*#__PURE__*/function () {
128128
switch (_context2.prev = _context2.next) {
129129
case 0:
130130
username = _ref3.username, user = _ref3.user, chaincode = _ref3.chaincode, contract = _ref3.contract, fcn = _ref3.fcn, args = _ref3.args;
131-
console.log('in send sign'); // Create a new file system based wallet for managing identities.
132-
131+
// Create a new file system based wallet for managing identities.
133132
walletPath = _path["default"].join(WALLET_PATH, "".concat(user.username, ".id"));
134133

135134
_fs["default"].writeFileSync(walletPath, JSON.stringify(user.wallet));
136135

137-
_context2.next = 6;
136+
_context2.next = 5;
138137
return _fabricNetwork.Wallets.newFileSystemWallet(WALLET_PATH);
139138

140-
case 6:
139+
case 5:
141140
wallet = _context2.sent;
142-
_context2.next = 9;
141+
_context2.next = 8;
143142
return wallet.get(username);
144143

145-
case 9:
144+
case 8:
146145
identity = _context2.sent;
147146
// build a user object for authenticating with the CA
148147
provider = wallet.getProviderRegistry().getProvider(identity.type);
149148
ccp = JSON.parse(_fs["default"].readFileSync(CCP_PATH, 'utf8'));
150149
client = new _fabricCommon.Client(ccp);
151-
_context2.next = 15;
150+
_context2.next = 14;
152151
return provider.getUserContext(user.wallet, username);
153152

154-
case 15:
153+
case 14:
155154
userContext = _context2.sent;
156-
_context2.next = 18;
155+
_context2.next = 17;
157156
return getContractAndGateway({
158157
user: user,
159158
chaincode: chaincode,
160159
contract: contract
161160
});
162161

163-
case 18:
162+
case 17:
164163
_yield$getContractAnd = _context2.sent;
165164
network = _yield$getContractAnd.network;
166165
channel = network.getChannel(); // return proposal response
167166

168-
console.log('just before sending');
169-
_context2.next = 24;
167+
_context2.next = 22;
170168
return (0, _hyperledgerFabricOfflineTransactionSigning.sendProposal)({
171169
client: client,
172170
channel: channel,
@@ -181,11 +179,10 @@ var sendSignedTransactionProposal = /*#__PURE__*/function () {
181179
return result = res;
182180
});
183181

184-
case 24:
185-
console.log('just after sending');
182+
case 22:
186183
return _context2.abrupt("return", result);
187184

188-
case 26:
185+
case 23:
189186
case "end":
190187
return _context2.stop();
191188
}

api/lib/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const sendSignedTransactionProposal = async ({
5757
const ccp = JSON.parse(fs.readFileSync(CCP_PATH, 'utf8'));
5858
const client = new Client(ccp);
5959
const userContext = await provider.getUserContext(user.wallet, username);
60-
60+
6161
// get channel
6262
const { network } = await getContractAndGateway({ user, chaincode, contract });
6363
const channel = network.getChannel();
@@ -67,6 +67,6 @@ export const sendSignedTransactionProposal = async ({
6767
await sendProposal({ client, channel, user: userContext, privateKeyPEM: user.wallet.credentials.privateKey, chaincode, fcn, args })
6868
.catch(e => { throw new Error(e); })
6969
.then(res => result = res);
70-
70+
7171
return result;
7272
};

chaincode/typescript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "blockotus-organ-helper-chaincode-typescript",
3-
"version": "0.1.7-beta",
3+
"version": "0.2.8-beta",
44
"description": "helper chaincode implemented in node.js",
55
"main": "dist/index.js",
66
"typings": "dist/index.d.ts",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "blockotus-organ-helper",
3-
"version": "0.2.4-alpha",
3+
"version": "0.2.8-beta",
44
"description": "Hyperledger Fabric Chaincode. BLOCKOTUS Organ. Network Open Standard.",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)