-
Notifications
You must be signed in to change notification settings - Fork 122
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
base: master
Are you sure you want to change the base?
Conversation
lib/src/payments/p2ms.dart
Outdated
else{ | ||
_isDecoded = true; | ||
_chunks = bscript.decompile(output); | ||
_temp['m'] = _chunks[0] - OPS['OP_RESERVED']; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
lib/src/payments/p2ms.dart
Outdated
if (data.input == null) {return;} | ||
var list = bscript.decompile(data.input); | ||
list.removeAt(0); | ||
List<Uint8List> uintList = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uintList => chunks
lib/src/payments/p2ms.dart
Outdated
P2MSData data; | ||
NetworkType network; | ||
List<dynamic> _chunks; | ||
Map _temp; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you're right 👍
There was a problem hiding this comment.
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.
Update my branch for Circle CI
fails these 3 test starting at lines 146
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. |
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.