Skip to content

sign-tx function sign transaction incorrectly. #77

@tunghm-ibl

Description

@tunghm-ibl

My version:
PLUGIN_VERSION="0.2.7"
VAULT_VERSION="1.4.0"

I use api https://localhost:8200/v1/ethereum/accounts/operator/sign-tx to sign my transaction.

Response:
{
"request_id": "44363911-657f-de63-b84b-2134dacd1d63",
"lease_id": "",
"renewable": false,
"lease_duration": 0,
"data": {
"address_from": "0x429eb0be5f2e874cedefcce53b5b20d411b8e89a",
"address_to": "0x36d1f896E55A6577C62fdd6B84fbf74582266711",
"amount": "0",
"amount_in_usd": "0",
"gas_limit": "21000",
"gas_price": "20000000000",
"signed_transaction": "0xf864808504a817c8008252089436d1f896e55a6577c62fdd6b84fbf7458226671180801ca036ebd7874b62feb46480a2bb2ea52ad2f6a7a2bd376038d2d283644918053f3ea03de93f716c367a8f4ac478da0e88c9cfdbd2d37175857aa8a24bfb4b27d17c92",
"starting_balance": 10000000000000000000,
"starting_balance_in_usd": "0",
"total_spend": "0",
"transaction_hash": "0xe71c3b8075228e49a4a7bf90a3571e04efad72daedb80662a431033cc55098af"
},
"wrap_info": null,
"warnings": null,
"auth": null
}

But this result is incorrect. My testing:
const EthTx = require('ethereumjs-tx')
cont sender = new EthTx(signed_transaction).getSenderAddress().toString('hex')
// sender is 0x1b82c7572e2efb8291e4d2b2d3a279fc384555c2 not match address_from.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions