caivega / ipfslib

Other
2 stars 1 forks source link

S3 - jt_signTransaction:fee参数为字符串时的问题 #54

Closed zyd82 closed 3 years ago

zyd82 commented 4 years ago

发送如下jt_signTransaction请求,其中fee参数为字符串

{
    "jsonrpc": "2.0",
    "method": "jt_signTransaction",
    "params": [
        {
            "from": "jEwE94Yhi2iLqVuFAL7K1XbHoaFES9N3pm",
            "secret": "ssCR6vTQeD4rBDaD7cGZCM9w6bVfH",
            "to": "js3MF5kQkTG6NBVj9HEiw9cFe4ckNvMYGg",
            "value": "1000",
            "fee": "asdsa"
        }
    ],
    "id": 1
}

7545和9545上,都返回如下

{
    "id": 0,
    "jsonrpc": "2.0",
    "result": "interface conversion: interface {} is string, not float64",
    "status": "error"
}

建议返回相应提示信息。

caivega commented 4 years ago

见 issue #27

zyd82 commented 3 years ago

9545已验证,验证版本v0.5.3-dev

{
    "id": 1,
    "jsonrpc": "2.0",
    "message": {
        "reason": "1 errors",
        "result": [
            {
                "error": "strconv.ParseUint: parsing \"asdsa\": invalid syntax",
                "message": {
                    "fee": "asdsa",
                    "from": "jPdx7mG595P6CowtGYbxRkik9HdWUWtB2J",
                    "to": "jGQ14U9BeHn6kV9eofnVsshSCxAecBawPM",
                    "value": "999910000/ZYDTL/jPdx7mG595P6CowtGYbxRkik9HdWUWtB2J"
                },
                "status": -278
            }
        ]
    },
    "result": [
        ""
    ],
    "status": -278
}