Merge remote-tracking branch 'origin/next' into feat/dyn-base-fee

This commit is contained in:
Łukasz Magiera
2020-08-06 23:41:54 +02:00
14 changed files with 180 additions and 24 deletions
+9 -1
View File
@@ -58,12 +58,20 @@ var paychGetCmd = &cli.Command{
ctx := ReqContext(cctx)
// Send a message to chain to create channel / add funds to existing
// channel
info, err := api.PaychGet(ctx, from, to, types.BigInt(amt))
if err != nil {
return err
}
fmt.Println(info.Channel.String())
// Wait for the message to be confirmed
chAddr, err := api.PaychGetWaitReady(ctx, info.ChannelMessage)
if err != nil {
return err
}
fmt.Println(chAddr)
return nil
},
}
+10
View File
@@ -215,6 +215,10 @@ var walletImport = &cli.Command{
Usage: "specify input format for key",
Value: "hex-lotus",
},
&cli.BoolFlag{
Name: "as-default",
Usage: "import the given key as your new default key",
},
},
Action: func(cctx *cli.Context) error {
api, closer, err := GetFullNodeAPI(cctx)
@@ -287,6 +291,12 @@ var walletImport = &cli.Command{
return err
}
if cctx.Bool("as-default") {
if err := api.WalletSetDefault(ctx, addr); err != nil {
return fmt.Errorf("failed to set default key: %w", err)
}
}
fmt.Printf("imported key %s successfully!\n", addr)
return nil
},