permaweb / aos

An operating system for AO: The hyper parallel computer
https://ao.g8way.io
Other
74 stars 52 forks source link

bug(token-blueprint): utils.toNumber() would error if it was used #288

Closed dvinubius closed 3 months ago

dvinubius commented 3 months ago

Problem

The token blueprint has

local utils = {
  -- ...
  toNumber = function(a) return tonumber(a) end
  -- .. 
}

The function errors for bint inputs. It intended specifically to facilitate usage of bints though.

It's currently not used, so the bug was not observed yet.

Solution

Should be

return bint.tonumber(a)
Screenshot 2024-07-11 at 19 44 43