-
Notifications
You must be signed in to change notification settings - Fork 260
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
Swift4.2 #168
Conversation
…lated unexpected behavior
p.pointee | ||
} | ||
return _HDKey(privateKey: result, | ||
publicKey: result, |
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.
Are really both of privateKey
and publicKey
the same value?
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.
Oh this is kind of bad architecture of _HDKey.
I think _HDKey should be refactored, but it's not in the scope of this PR.
@@ -104,6 +104,12 @@ class MockHelperTests: XCTestCase { | |||
} | |||
} | |||
} | |||
|
|||
func testP2SHRecursively() { |
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 don't think this test is necessary. If it is, please comment for the reason.
@@ -0,0 +1,24 @@ | |||
// | |||
// SerializationTests.swift |
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 modify copy right.
Is there anything else that prevents this PR from being merged? |
@DevilDimon Sorry for long time absence. Will merge this branch. |
@@ -140,11 +143,11 @@ public class _HDKey { | |||
data.append(0) // padding | |||
data += privateKey ?? Data() |
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.
If privateKey is nil, it should return nil
- Return nil if index is greater than 0x80000000 - Return nil if hardend but has no private key
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.
Self reviewed. LGTM.
Requirements
Description of the Change
Converted from Swift 4.1.2 to 4.2
Alternate Designs
Do nothing.
Benefits
Modern language.
Possible Drawbacks
Users who are using Xcode 9.0 or older cannot use BitcoinKit.
I'm not sure about this.
Applicable Issues
closes #163