Skip to content

Commit

Permalink
clean up breach (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
yapishu authored Jan 20, 2025
1 parent a7e5d04 commit f290e3c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
6 changes: 1 addition & 5 deletions cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,7 @@ var ModBreachCmd = &cobra.Command{
if err != nil {
return fmt.Errorf("error getting passphrase flag: %v", err)
}
life, err := cmd.Flags().GetInt("life")
if err != nil {
return fmt.Errorf("error getting life flag: %v", err)
}
keysTx, err := libprg.Breach(point, masterTicket, passphrase, life)
keysTx, err := libprg.Breach(point, masterTicket, passphrase)
if err != nil {
return fmt.Errorf("error processing breach: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion handlers/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ func ModBreach() http.HandlerFunc {
ticket := r.URL.Query().Get("ticket")
passphrase := r.URL.Query().Get("passphrase")

tx, err := libprg.Breach(point, ticket, passphrase, 0)
tx, err := libprg.Breach(point, ticket, passphrase)
if err != nil {
http.Error(w, fmt.Sprintf("Error processing breach: %v", err), http.StatusInternalServerError)
return
Expand Down
4 changes: 2 additions & 2 deletions libprg/libprg.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ func Adopt(point, masterTicket, passphrase, adoptee string) (types.Transaction,
return handleTransaction(point, masterTicket, passphrase, adoptee, roller.Client.Adopt)
}

func Breach(point, ticket, passphrase string, life int) (types.Transaction, error) {
wallet, _, patp, err := getWalletAndPoint(point, ticket, passphrase, life, false)
func Breach(point, ticket, passphrase string) (types.Transaction, error) {
wallet, _, patp, err := getWalletAndPoint(point, ticket, passphrase, 0, false)
if err != nil {
return types.Transaction{}, err
}
Expand Down

0 comments on commit f290e3c

Please sign in to comment.