Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

render.gno

0.44 Kb · 23 lines
 1package txfees
 2
 3import (
 4	"chain/banker"
 5	"strings"
 6)
 7
 8func Render(cur realm, _ string) string {
 9	banker_ := banker.NewReadonlyBanker()
10	realmAddr := cur.Address()
11	balance := banker_.GetCoins(realmAddr).String()
12
13	if strings.TrimSpace(balance) == "" {
14		balance = "\\<empty\\>"
15	}
16
17	var output string
18	output += "# Transaction Fees\n"
19	output += "Balance: " + balance + "\n\n"
20
21	output += "Bucket address: " + realmAddr.String() + "\n"
22	return output
23}