diff --git a/src/multisigHandler.ts b/src/multisigHandler.ts index a30b3d3..b31ba0a 100644 --- a/src/multisigHandler.ts +++ b/src/multisigHandler.ts @@ -152,19 +152,19 @@ export default class FilecoinMultisigHandler { Requester: this.envParamsProvider.getFilecoinMainNodeAddress(), To: to, Value: amount, - Method: 0, + Method: '3844450837', Params: '', }; const proposalHash = filecoin_signer.computeProposalHash(proposal_params); - const receiptMessage = await this.waitTransactionReceipt(txCid); - const recpt = JSON.parse(JSON.stringify(receiptMessage)); + // const receiptMessage = await this.waitTransactionReceipt(txCid); + // const recpt = JSON.parse(JSON.stringify(receiptMessage)); - const txnid = recpt['ReturnDec']['TxnID']; - console.log(`txnid: ${txnid}`); + // const txnid = recpt['ReturnDec']['TxnID']; + // console.log(`txnid: ${txnid}`); let approve_params = { - ID: txnid, + ID: txCid, ProposalHash: proposalHash.toString('base64'), }; diff --git a/src/test.ts b/src/test.ts index f298f30..433d410 100644 --- a/src/test.ts +++ b/src/test.ts @@ -32,7 +32,7 @@ async function main() { let minerId = 'f02064263'; let encodeParams = 'RACH/30='; - let txnid = 1; + let txnid = '2019'; // 主节点发起变更owner请求 // let rs = await multisigHandler.initNewMultisigChangeOwner2( @@ -40,16 +40,29 @@ async function main() { // encodeParams // ); - // 副节点同意变更owner请求 - let rs = await multisigHandler.approveMultisigChangeOwner2( - minerId, - txnid, - encodeParams + // + let rs = await multisigHandler.approveMultisigTransfer( + 'f02097134', + '1000000000000000000000', + '2019', + ); + + // let minerId= 'f02182258' + // let encodedParam = 'glgxA6iB70GipHYFgVEQeldoHr/p5Yg1gLQDwlqjKeVoRm45IZSSAZLdNen6iwljqNT02YFYMQOLXt3QCH6aMUjevr+TXUBzrw7lduDNzMDW6vBQG2BEbmzbrzCo8qKEG2u/IftwfEs=' + + // let rs = await multisigHandler.approveMultisigChangeWorker( + // minerId, + // 1951, + // encodedParam, + + // ); + console.log(`result is: ${rs}`); } + main() .then() .catch(err => console.log(err))