rpc: provide old transfers in getnep5transfers
Return performed transfers even if contract was migrated.
This commit is contained in:
parent
7cd1bca1e1
commit
f0d75afc48
6 changed files with 95 additions and 29 deletions
|
@ -658,6 +658,11 @@ func (s *Server) getDecimals(h util.Uint160, cache map[util.Uint160]int64) (int6
|
|||
if d, ok := cache[h]; ok {
|
||||
return d, nil
|
||||
}
|
||||
m, err := s.chain.GetNEP5Metadata(h)
|
||||
if err == nil {
|
||||
cache[h] = m.Decimals
|
||||
return m.Decimals, nil
|
||||
}
|
||||
script, err := request.CreateFunctionInvocationScript(h, request.Params{
|
||||
{
|
||||
Type: request.StringT,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue