Skip to content

Support for bitcoin transactions/address generation#5

Open
Midren wants to merge 16 commits intoSkycoinProject:developfrom
Macrosrider:milishchuk_bitcoin_support
Open

Support for bitcoin transactions/address generation#5
Midren wants to merge 16 commits intoSkycoinProject:developfrom
Macrosrider:milishchuk_bitcoin_support

Conversation

@Midren
Copy link
Copy Markdown

@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
Copy Markdown
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
Copy Markdown
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

@therealssj
Copy link
Copy Markdown
Contributor

@Midren
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

@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.

4 participants