Skip to content

Conversation

@Highjhacker
Copy link
Contributor

Proposed changes

Allow the use of both publickey and publicKey for the Message class to work correctly with the API.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)

Checklist

  • I have read the CONTRIBUTING documentation
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works

@faustbrian faustbrian self-requested a review December 14, 2018 14:14
@codecov-io
Copy link

codecov-io commented Dec 14, 2018

Codecov Report

Merging #66 into master will decrease coverage by 0.39%.
The diff coverage is 80%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #66     +/-   ##
=========================================
- Coverage   79.42%   79.02%   -0.4%     
=========================================
  Files          42       42             
  Lines         700      701      +1     
  Branches       69       71      +2     
=========================================
- Hits          556      554      -2     
- Misses        115      116      +1     
- Partials       29       31      +2
Impacted Files Coverage Δ
crypto/transactions/transaction.py 85.12% <100%> (ø) ⬆️
crypto/utils/message.py 92.85% <77.77%> (-7.15%) ⬇️
crypto/identity/address.py 90.9% <0%> (-3.04%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b9abd6c...3a919e5. Read the comment docs.

@faustbrian faustbrian changed the title fix : Fixed it, now can work with both publickey and publicKey fix: messages now can work with both publickey and publicKey Dec 14, 2018
@Highjhacker
Copy link
Contributor Author

Highjhacker commented Dec 14, 2018

Right now everything work as it should be, the only detail to change is here

def sign(cls, message, passphrase): ... return cls(message, signature, private_key.public_key)

Ideally something like

if hasattr(cls, 'publickey'): return cls(message,signature,publickey=private_key.public_key) elif hasattr(cls, 'publicKey'): return cls(message,signature,publicKey=private_key.public_key)
would do the trick, but it isn't possible to access attributes with cls, still digging that part.

@faustbrian faustbrian changed the base branch from master to develop December 18, 2018 08:17
@faustbrian faustbrian merged commit f6a26ec into ArkEcosystem:develop Dec 18, 2018
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.

3 participants