caivega / ipfslib

Other
2 stars 1 forks source link

S2 - jt_sendTransaction 发行代币报错 #89

Closed foreso-GitHub closed 4 years ago

foreso-GitHub commented 4 years ago

发行代币,发送如下请求,总是返回decimals错误。

{
    "jsonrpc": "2.0",
    "method": "jt_sendTransaction",
    "params": [
        {
            "type": "IssueCoin",
            "from": "jDjvM2rrjgAsYEeFJsSvuXxkbYxZQpdEwu",
            "secret": "shJTqjPJKsgTLDqCQ16nuALHSzjTd",
            "name": "II Token",
            "symbol": "IIT",
            "decimals": 8,
            "total_supply": "1000000000",
            "local":true,
            "flags": 65536
        }
    ],
    "id": 1
}

返回:

{
    "id": 1,
    "jsonrpc": "2.0",
    "result": "decimals must be integer type(string) and in range [0, 18]",
    "status": "error"
}

以前是好的,应该是这两天修出来的bug,导致关于token的自动测试都无法通过。需要优先修正。

foreso-GitHub commented 4 years ago

By Design,因为现在decimals输入参数必须是string。参见https://github.com/caivega/ipfslib/issues/73 关闭issue。