caivega / ipfslib

Other
2 stars 1 forks source link

S1 - jt_signTransaction:发送代币的数额是负数 #60

Closed zyd82 closed 3 years ago

zyd82 commented 4 years ago

发送如下请求,其中发送代币的数额是负数:-1000或-1.5等

{
    "jsonrpc": "2.0",
    "method": "jt_signTransaction",
    "params": [
        {
            "from": "jEwE94Yhi2iLqVuFAL7K1XbHoaFES9N3pm",
            "secret": "ssCR6vTQeD4rBDaD7cGZCM9w6bVfH",
            "to": "js3MF5kQkTG6NBVj9HEiw9cFe4ckNvMYGg",
            "value": "-1000/KKKKT" =》负整数或负小数
        }
    ],
    "id": 1
}

7545和9545上都返回长哈希,用jt_sendRawTransaction发送该哈希余额都会发生变化,发送钱包的代币余额变多,接收钱包的代币余额变少。

zyd82 commented 4 years ago

版本v0.2.1-testing,9545上验证通过

zyd82 commented 3 years ago

9545验证通过,验证版本v0.5.3-dev

{
    "id": 1,
    "jsonrpc": "2.0",
    "message": {
        "reason": "1 errors",
        "result": [
            {
                "error": "value must be integer type and >= 0",
                "message": {
                    "from": "jGQ14U9BeHn6kV9eofnVsshSCxAecBawPM",
                    "to": "jPdx7mG595P6CowtGYbxRkik9HdWUWtB2J",
                    "value": "-1.1/ZYDT"
                },
                "status": -278
            }
        ]
    },
    "result": [
        ""
    ],
    "status": -278
}