Fix address.MarshalJSON
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
DataHoarder 2023-07-23 01:10:43 +02:00
parent 03f19ae2ed
commit b7b1344eea
Signed by: DataHoarder
SSH key fingerprint: SHA256:OLTRf6Fl87G52SiR7sWLGNzlJt4WOX+tfI2yxo0z7xk

View file

@ -158,7 +158,7 @@ func (a *Address) ToBase58() []byte {
func (a *Address) MarshalJSON() ([]byte, error) {
a.verifyChecksum()
buf := make([]byte, 0, 95+2)
buf := make([]byte, 95+2)
buf[0] = '"'
moneroutil.EncodeMoneroBase58PreAllocated(buf[1:1], []byte{a.Network}, a.SpendPub.AsSlice(), a.ViewPub.AsSlice(), a.checksum[:])
buf[len(buf)-1] = '"'