Skip to content

feat(api): added isAuthenticated, currentNetwork and localCurrency to the nOS API#1187

Merged
DalderupMaurice merged 5 commits intodevelopfrom
feature/nos-api-settings
Oct 18, 2019
Merged

feat(api): added isAuthenticated, currentNetwork and localCurrency to the nOS API#1187
DalderupMaurice merged 5 commits intodevelopfrom
feature/nos-api-settings

Conversation

@DalderupMaurice
Copy link
Copy Markdown
Member

@DalderupMaurice DalderupMaurice commented Oct 13, 2019

Description

Adds

window.NOS.V1.getCurrentNetwork()
window.NOS.V1.getLocalCurrency()
window.NOS.V1.isAuthenticated()

to the nOS API

Also allowed the following API calls to be called without the need for the user to be signed in

  'isAuthenticated',
  'getStorage',
  'getLastBlock',
  'getCurrentNetwork',
  'getLocalCurrency'

Motivation and Context

How Has This Been Tested?

image

Screenshots (if appropriate)

Types of changes

  • Chore (tests, refactors, and fixes)
  • New feature (adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have read the CONTRIBUTING guidelines and confirm that my code follows the code style of this project.
  • Tests for the changes have been added (for bug fixes/features)

Documentation

  • Docs need to be added/updated (for bug fixes/features)

Closing issues

Fixes #870

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 13, 2019

Codecov Report

Merging #1187 into develop will decrease coverage by 0.33%.
The diff coverage is 20%.

@@            Coverage Diff             @@
##           develop   #1187      +/-   ##
==========================================
- Coverage    50.23%   49.9%   -0.34%     
==========================================
  Files          240     248       +8     
  Lines         2096    2120      +24     
  Branches       280     282       +2     
==========================================
+ Hits          1053    1058       +5     
- Misses         867     884      +17     
- Partials       176     178       +2

@DalderupMaurice DalderupMaurice changed the title feat(api): added current network to the nOS API feat(api): added current network and local currency to the nOS API Oct 13, 2019
@DalderupMaurice DalderupMaurice added the PR: needs review Pull request label Oct 13, 2019
@DalderupMaurice DalderupMaurice changed the title feat(api): added current network and local currency to the nOS API feat(api): added isAuthenticated, currentNetwork and localCurrency to the nOS API Oct 17, 2019
@DalderupMaurice DalderupMaurice added PR: good to merge Reviewed and approved and removed PR: needs review Pull request labels Oct 18, 2019
@DalderupMaurice DalderupMaurice merged commit 30fd7b3 into develop Oct 18, 2019
@DalderupMaurice DalderupMaurice deleted the feature/nos-api-settings branch October 18, 2019 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: good to merge Reviewed and approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Read-only API access to nOS client settings

1 participant