Commit 75478fff authored by Alberto Lerda's avatar Alberto Lerda Committed by Jaromil
Browse files

fix: ethereum nonce exported as number

parent 29ca85a2
......@@ -85,8 +85,13 @@ ZEN.add_schema(
export = O.to_hex },
ethereum_address = { import = O.from_hex,
export = O.to_hex },
ethereum_nonce = function(obj)
return ZEN.get(obj, '.', INT.new, tonumber) end,
-- TODO generic import from string in zenroom.big,
-- if a number begins with 0x import it as hex
-- otherwise as decimal (here we have to use tonumber
-- in order to contemplate hex strings)
ethereum_nonce = { import = function(o)
return INT.new(tonumber(o)) end,
export = function(o) return o:decimal() end },
ethereum_transaction = { import = import_eth_tx,
export = export_eth_tx },
signed_ethereum_transaction = { import = O.from_hex,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment