github.com/decred/politeia@v1.4.0/politeiawww/cmd/pictl/userproposalpaywalltx.go (about)

     1  // Copyright (c) 2020 The Decred developers
     2  // Use of this source code is governed by an ISC
     3  // license that can be found in the LICENSE file.
     4  
     5  package main
     6  
     7  import "github.com/decred/politeia/politeiawww/cmd/shared"
     8  
     9  // userProposalPaywallTxCmd retrieves the payment details for a pending payment,
    10  // if one exists, for the logged in user.
    11  type userProposalPaywallTxCmd struct{}
    12  
    13  // Execute executes the userProposalPaywallTxCmd command.
    14  //
    15  // This function satisfies the go-flags Commander interface.
    16  func (cmd *userProposalPaywallTxCmd) Execute(args []string) error {
    17  	pppr, err := client.UserProposalPaywallTx()
    18  	if err != nil {
    19  		return err
    20  	}
    21  	return shared.PrintJSON(pppr)
    22  }
    23  
    24  // userProposalPaywallTxHelpMsg is the output for the help command when
    25  // 'userproposalpaywalltx' is specified.
    26  const userProposalPaywallTxHelpMsg = `userproposalpaywalltx
    27  
    28  Get pending payment details for the logged in user.
    29  
    30  Arguments: None`