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

Support for bitcoin transactions/address generation #5

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from

Conversation

Midren
Copy link

@Midren Midren commented Mar 25, 2020

Changes:

  • Added coinType for address generation
  • Fixed address generation tests to support coinType
  • Add bitcoin_transaction_sign method to REST API

Does this change need to mentioned in CHANGELOG.md?
yes

Requires testing
yes

@Midren Midren self-assigned this Mar 29, 2020
@Midren
Copy link
Author

Midren commented Mar 29, 2020

@therealssj Could you explain, why this test should have Failure msg, because I cannot find a reason?

@Midren Midren added the enhancement New feature or request label Mar 29, 2020
@therealssj
Copy link
Contributor

@RomanMilishchuk the test is just that when the gateway method TransactionSign returns a Failure msg then the httpResponse is 409 "failure msg"
so the body cannot have any errors

@Midren
Copy link
Author

Midren commented Mar 31, 2020

@therealssj but why on the given inputs TransactionSign should fail with Failure msg?

@RomanMilishchuk the test is just that when the gateway method TransactionSign returns a Failure msg then the httpResponse is 409 "failure msg"
so the body cannot have any errors

@therealssj
Copy link
Contributor

@RomanMilishchuk the test is a check for what happens when TransactionSign method returns 409 with some error msg

the test is basically checking that this part of code https://github.com/SkycoinProject/hardware-wallet-daemon/blob/master/src/api/transaction_sign.go#L110

is working as it shud

@Senyoret1
Copy link

@Midren do you have any test params which work with the new bitcoin_transaction_sign transaction endpoint? I tried to call it with this data:

{
	"transaction_inputs": [{
		"index": 0,
		"prev_hash": "0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098"
	}],
	"transaction_outputs": [{
		"address_index": null,
		"address": "12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX",
		"coins": "1"
	}]
}

Usign that data the response was protocol error: unexpected TXINPUT on every odd try and Failed with message: Signing transaction failed on every even try.

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

Successfully merging this pull request may close these issues.

3 participants