caivega / ipfslib

Other
2 stars 1 forks source link

S3 - jt_signTransaction:不存在的参数名称 #50

Closed zyd82 closed 3 years ago

zyd82 commented 4 years ago

发送如下jt_signTransaction请求,其中有一个不存在的参数名称fgsdfgsdfgdfs

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

7545和9545上都返回长串哈希,用jt_sendRawTransaction发起哈希交易,都成功,发起钱包的余额和接收钱包余额都发生变化。建议停止交易,返回相应的提示信息。

zyd82 commented 3 years ago

9545: v0.5.2-dev版本上交易成功

{
    "jsonrpc": "2.0",
    "method": "jt_signTransaction",
    "params": [
        {
            "type": "IssueCoin",
            "from": "jGQ14U9BeHn6kV9eofnVsshSCxAecBawPM",
            "secret": "ssbNTc65vNxwa1f69JA4FgVUBEMH8",
            "name": "aldi_token",
            "symbol": "jgdtd",
            "decimals": "8",
            "total_supply": "100000000",
            "flags": 65536,
            "fgsdfgsdfgdfs": ["test"]  <==不存在的参数名称
        }
    ],
    "id": 1
}
foreso-GitHub commented 3 years ago

给个提示:Invalid Parameter

caivega commented 3 years ago

已经修复,下一个build验证

zyd82 commented 3 years ago

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

{
    "id": 1,
    "jsonrpc": "2.0",
    "message": {
        "reason": "1 errors",
        "result": [
            {
                "error": "invalid parameter fgsdfgsdfgdfs",
                "message": {
                    "fgsdfgsdfgdfs": [
                        "test"
                    ],
                    "from": "jPdx7mG595P6CowtGYbxRkik9HdWUWtB2J",
                    "to": "js3MF5kQkTG6NBVj9HEiw9cFe4ckNvMYGg",
                    "value": "1000"
                },
                "status": -278
            }
        ]
    },
    "result": [
        ""
    ],
    "status": -278
}