@@ -479,7 +479,7 @@ func (s *Service) GetUTXOs(_ *http.Request, args *api.GetUTXOsArgs, response *ap
479
479
}
480
480
response .UTXOs [i ], err = formatting .Encode (args .Encoding , bytes )
481
481
if err != nil {
482
- return fmt .Errorf ("couldn't encode UTXO %s as string : %w" , utxo .InputID (), err )
482
+ return fmt .Errorf ("couldn't encode UTXO %s as %s : %w" , utxo .InputID (), args . Encoding , err )
483
483
}
484
484
}
485
485
@@ -2160,7 +2160,7 @@ func (s *Service) GetTx(_ *http.Request, args *api.GetTxArgs, response *api.GetT
2160
2160
2161
2161
response .Tx , err = formatting .Encode (args .Encoding , txBytes )
2162
2162
if err != nil {
2163
- return fmt .Errorf ("couldn't encode tx as a string : %w" , err )
2163
+ return fmt .Errorf ("couldn't encode tx as %s : %w" , args . Encoding , err )
2164
2164
}
2165
2165
return nil
2166
2166
}
@@ -2332,7 +2332,7 @@ func (s *Service) GetStake(_ *http.Request, args *GetStakeArgs, response *GetSta
2332
2332
}
2333
2333
response .Outputs [i ], err = formatting .Encode (args .Encoding , bytes )
2334
2334
if err != nil {
2335
- return fmt .Errorf ("couldn't encode output %s as string : %w" , output .ID , err )
2335
+ return fmt .Errorf ("couldn't encode output %s as %s : %w" , output .ID , args . Encoding , err )
2336
2336
}
2337
2337
}
2338
2338
response .Encoding = args .Encoding
@@ -2505,7 +2505,7 @@ func (s *Service) GetRewardUTXOs(_ *http.Request, args *api.GetTxArgs, reply *Ge
2505
2505
2506
2506
utxoStr , err := formatting .Encode (args .Encoding , utxoBytes )
2507
2507
if err != nil {
2508
- return fmt .Errorf ("couldn't encode utxo as a string : %w" , err )
2508
+ return fmt .Errorf ("couldn't encode utxo as %s : %w" , args . Encoding , err )
2509
2509
}
2510
2510
reply .UTXOs [i ] = utxoStr
2511
2511
}
@@ -2589,7 +2589,7 @@ func (s *Service) GetBlock(_ *http.Request, args *api.GetBlockArgs, response *ap
2589
2589
2590
2590
response .Block , err = formatting .Encode (args .Encoding , block .Bytes ())
2591
2591
if err != nil {
2592
- return fmt .Errorf ("couldn't encode block %s as string : %w" , args .BlockID , err )
2592
+ return fmt .Errorf ("couldn't encode block %s as %s : %w" , args .BlockID , args . Encoding , err )
2593
2593
}
2594
2594
2595
2595
return nil
@@ -2615,6 +2615,7 @@ func (s *Service) getAPIOwner(owner *secp256k1fx.OutputOwners) (*platformapi.Own
2615
2615
apiOwner := & platformapi.Owner {
2616
2616
Locktime : json .Uint64 (owner .Locktime ),
2617
2617
Threshold : json .Uint32 (owner .Threshold ),
2618
+ Addresses : make ([]string , 0 , len (owner .Addrs )),
2618
2619
}
2619
2620
for _ , addr := range owner .Addrs {
2620
2621
addrStr , err := s .addrManager .FormatLocalAddress (addr )
0 commit comments