Skip to content

Commit

Permalink
client-sdk: Add PrettyPrint to StakeThresholds
Browse files Browse the repository at this point in the history
  • Loading branch information
matevz committed Nov 18, 2024
1 parent 8444b42 commit 26cb546
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions client-sdk/go/modules/rofl/types.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package rofl

import (
"context"
"fmt"
"io"

"github.com/oasisprotocol/curve25519-voi/primitives/x25519"

beacon "github.com/oasisprotocol/oasis-core/go/beacon/api"
Expand Down Expand Up @@ -141,3 +145,13 @@ type Event struct {
type StakeThresholds struct {
AppCreate *types.BaseUnits `json:"app_create"`
}

func (st *StakeThresholds) PrettyPrint(ctx context.Context, prefix string, w io.Writer) {
fmt.Fprintf(w, "%sApp create: ", prefix)
st.AppCreate.PrettyPrint(ctx, "", w)
fmt.Fprint(w, "\n")
}

func (st *StakeThresholds) PrettyType() (interface{}, error) {
return st, nil
}

0 comments on commit 26cb546

Please sign in to comment.