-
Notifications
You must be signed in to change notification settings - Fork 67
Tron transaction signing #50
Tron transaction signing #50
Conversation
SwiftLint found issuesWarnings
Errors
Generated by 🚫 Danger |
@@ -0,0 +1,4377 @@ | |||
// DO NOT EDIT. |
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.
Can we include the original protobuf file and a script to generate this 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.
I've updated README.md to include the steps
Sources/Data+String.swift
Outdated
import Foundation | ||
|
||
extension Data { | ||
public func toString() -> String { |
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 these extensions are useful. They don't provide any extra clarity on use and introduce an unexpected side effect of returning empty string on error.
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 they are redundant, will remove them, cheers.
Sources/Data+String.swift
Outdated
} | ||
} | ||
|
||
extension String { |
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.
Same here.
} | ||
|
||
public mutating func addSignature(_ signature: Data) { | ||
self.signature.append(signature) |
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
is redundant here.
Sources/Tron/TronTransaction.swift
Outdated
} | ||
|
||
extension TronTransaction.RawData { | ||
public mutating func toData() -> 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.
I don't think this should be mutating, we should return a copy of the 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.
That makes sense, will fix it.
Please exclude |
…otocol Buffer to Swift
# Conflicts: # TrustCore.xcodeproj/project.pbxproj
Test case is in TronTransactionTests