diff --git a/cli/multisig.go b/cli/multisig.go index 97a77a75b..90b074421 100644 --- a/cli/multisig.go +++ b/cli/multisig.go @@ -677,7 +677,7 @@ var msigAddProposeCmd = &cli.Command{ return err } - fmt.Println("sent add proposal in message: ", msgCid) + fmt.Fprintln(cctx.App.Writer, "sent add proposal in message: ", msgCid) wait, err := api.StateWaitMsg(ctx, msgCid, build.MessageConfidence) if err != nil { diff --git a/cli/test/multisig.go b/cli/test/multisig.go index 96025aa8c..e77879346 100644 --- a/cli/test/multisig.go +++ b/cli/test/multisig.go @@ -68,10 +68,43 @@ func RunMultisigTest(t *testing.T, cmds []*lcli.Command, clientNode test.TestNod msigRobustAddr := parts[1] fmt.Println("msig robust address:", msigRobustAddr) - // msig inspect - cmd = []string{"msig", "inspect", msigRobustAddr} + // Propose to add a new address to the msig + // msig add-propose --from= + paramFrom := fmt.Sprintf("--from=%s", walletAddrs[0]) + cmd = []string{ + "msig", "add-propose", + paramFrom, + msigRobustAddr, + walletAddrs[3].String(), + } out = clientCLI.runCmd(cmd) fmt.Println(out) + // msig inspect + cmd = []string{"msig", "inspect", "--vesting", "--decode-params", msigRobustAddr} + out = clientCLI.runCmd(cmd) + fmt.Println(out) + + // Expect correct balance require.Regexp(t, regexp.MustCompile("Balance: 0.000000000000001 FIL"), out) + // Expect 1 transaction + require.Regexp(t, regexp.MustCompile(`Transactions:\s*1`), out) + // Expect transaction to be "AddSigner" + require.Regexp(t, regexp.MustCompile(`AddSigner`), out) + + // Approve adding the new address + // msig add-approve --from= 0 false + txnID := "0" + paramFrom = fmt.Sprintf("--from=%s", walletAddrs[1]) + cmd = []string{ + "msig", "add-approve", + paramFrom, + msigRobustAddr, + walletAddrs[0].String(), + txnID, + walletAddrs[3].String(), + "false", + } + out = clientCLI.runCmd(cmd) + fmt.Println(out) }