Skip to content

Commit 93e3826

Browse files
authored
feat: add StringWithNetwork (#53)
1 parent 353f9bc commit 93e3826

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

address.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,14 @@ func (a Address) String() string {
105105
return str
106106
}
107107

108+
func (a Address) StringWithNetwork(network Network) string {
109+
str, err := encode(network, a)
110+
if err != nil {
111+
panic(err) // I don't know if this one is okay
112+
}
113+
return str
114+
}
115+
108116
// Empty returns true if the address is empty, false otherwise.
109117
func (a Address) Empty() bool {
110118
return a == Undef

0 commit comments

Comments
 (0)