From e3bf9364b8b88f9add37f5a97fd6b65ba711e51d Mon Sep 17 00:00:00 2001 From: Sam Date: Sun, 22 Sep 2019 01:18:21 -0400 Subject: [PATCH] Add CancelRequest to keybase --- types.go | 1 + wallet.go | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/types.go b/types.go index da04e7f..2929019 100644 --- a/types.go +++ b/types.go @@ -504,6 +504,7 @@ type keybase interface { username() string version() string RequestPayment(user string, amount float64, memo ...string) + CancelRequest(requestID string) error } type status struct { diff --git a/wallet.go b/wallet.go index 24c749f..cfc11a6 100644 --- a/wallet.go +++ b/wallet.go @@ -59,3 +59,9 @@ func (k *Keybase) RequestPayment(user string, amount float64, memo ...string) er _, err := k.Exec("wallet", "request", user, fmt.Sprintf("%f", amount)) return err } + +// CancelRequest cancels a request for payment previously sent to a user +func (k *Keybase) CancelRequest(requestID string) error { + _, err := k.Exec("wallet", "cancel-request", requestID) + return err +}