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

RpcClient: Simplify message id processing #916

Merged
merged 2 commits into from
Feb 25, 2020

Conversation

davidyuk
Copy link
Member

messageId in RpcClient is defined as a constant, and it is passed to sendMessage and receive methods as a primitive value, but as I know primitive variables are passed by values (not by reference) so it can't be mutated outside of function scope, also messageId can't be mutated because it is defined as a constant.

So, I propose to drop not working and confusing code.

@codecov
Copy link

codecov bot commented Feb 25, 2020

Codecov Report

Merging #916 into develop will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #916      +/-   ##
===========================================
+ Coverage    92.71%   92.73%   +0.01%     
===========================================
  Files           57       57              
  Lines         2936     2944       +8     
===========================================
+ Hits          2722     2730       +8     
  Misses         214      214
Impacted Files Coverage Δ
.../utils/aepp-wallet-communication/rpc/wallet-rpc.js 98.96% <100%> (+0.03%) ⬆️
es/node.js 97.14% <100%> (+0.17%) ⬆️
...utils/aepp-wallet-communication/rpc/rpc-clients.js 97.36% <100%> (+0.18%) ⬆️
es/account/index.js 100% <100%> (ø) ⬆️
es/node-pool/index.js 100% <100%> (ø) ⬆️

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 ece53de...6874d15. Read the comment docs.

@nduchak nduchak merged commit af2f3a0 into develop Feb 25, 2020
@nduchak nduchak deleted the feature/simplify-message-id-processing branch February 25, 2020 11:08
@nduchak nduchak mentioned this pull request Feb 25, 2020
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