Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sign-tx function sign transaction incorrectly. #77

Open
tunghm-ibl opened this issue Apr 15, 2020 · 0 comments
Open

sign-tx function sign transaction incorrectly. #77

tunghm-ibl opened this issue Apr 15, 2020 · 0 comments

Comments

@tunghm-ibl
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant