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

Preparing for Multi-signature Transactions #1

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

itsMikeLowrey
Copy link

I would like to use this library to do multisig transactions in dart for bitcoin. This is the first port of libraries from bitcoinjs required to accomplish this.

else{
_isDecoded = true;
_chunks = bscript.decompile(output);
_temp['m'] = _chunks[0] - OPS['OP_RESERVED'];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use P2MSData, dynamic some cases cause dangerous

Copy link
Author

@itsMikeLowrey itsMikeLowrey Jan 21, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I the type of _chunks from List? I am unsure where to use P2MSData types, aside from the _temp issue addressed later.

if (data.input == null) {return;}
var list = bscript.decompile(data.input);
list.removeAt(0);
List<Uint8List> uintList = [];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uintList => chunks

P2MSData data;
NetworkType network;
List<dynamic> _chunks;
Map _temp;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_temp does not make sense

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean that _temp should not exist and that I should change the value of P2MSData data directly?
The following code:
_temp['m'] = _chunks[0] - OPS['OP_RESERVED'];
should be:
data.m = _chunks[0] - OPS['OP_RESERVED']; instead?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you're right 👍

Copy link
Author

@itsMikeLowrey itsMikeLowrey Jan 21, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed all _temp usage, but it has caused the code to regress and fail 3 test. I reference this regression in this commit. I am unsure of how to fix this. I don't think we need this test anymore, but it feels wrong to delete test, in response to code regression.

anicdh pushed a commit that referenced this pull request Jan 19, 2019
@itsMikeLowrey
Copy link
Author

I removed all _temp usage, but it has caused the code to regress and fail 3 test. I reference this regression in this commit. I am unsure of how to fix this. I don't think we need this test anymore, but it feels wrong to delete test, in response to code regression.

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

Successfully merging this pull request may close these issues.

2 participants