mirror of
https://github.com/logos-storage/nim-json-rpc.git
synced 2026-01-11 01:53:11 +00:00
fix stint to json to output hex rather than decimal
This commit is contained in:
parent
e125d7883e
commit
89ece166db
@ -1,7 +1,7 @@
|
||||
import json, stint, strutils
|
||||
|
||||
template stintStr(n: UInt256|Int256): JsonNode =
|
||||
var s = n.toString
|
||||
var s = n.toHex
|
||||
if s.len mod 2 != 0: s = "0" & s
|
||||
s = "0x" & s
|
||||
%s
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user