-
Notifications
You must be signed in to change notification settings - Fork 60
Update to Lisk Core 1.0.0 API - Closes #341 #1032
Conversation
e951c03
to
c5a56cd
Compare
c5a56cd
to
ca1e6fb
Compare
... because the former was removed in Lisk Core 1.0.0
ac5990a
to
27f59fc
Compare
c198b8c
to
798c356
Compare
798c356
to
c59ae6e
Compare
I found the following issues:
@yasharAyari you can fix them in this PR od create a follow-up. |
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.
One more thing:
- all API calls used to dispatch event
loadingStarted
before andloadingFinished
after to show/hide the loading bar.
src/actions/peers.js
Outdated
if (!config.testnet && response.nethash !== netHashes.mainnet) { | ||
config.nethash = response.nethash; | ||
const getNethash = new Lisk.APIClient(config.nodes, config.nethash, {}); | ||
getNethash.node.getConstants().then((response) => { |
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.
getNethash
is not describing what is stored in the variable, it is more something like apiClientInstance
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.
In general loadingFinished
should be not only in all then
callbacks but also in catch
callbacks. Otherwise, every time something fails, the loading bar stays forever.
src/store/middlewares/login.js
Outdated
@@ -24,15 +25,17 @@ const loginMiddleware = store => next => (action) => { | |||
address, | |||
}; | |||
const { activePeer } = action.data; | |||
|
|||
loadingStarted('loginMiddleware'); | |||
loadingFinished('loginMiddleware'); |
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.
loadingFinished
looks like extra here
Is this branch supposed to work with beta6 nodes? I get an error 400 when Nano tries to load http://node01.betanet.lisk.prolina.org:5000/api/transactions?senderIdOrRecipientId=6237734014301098166L&limit=25&offset=0&sort=timestamp%3Adesc |
@webmaster128 That parameter will be fixed in beta7 LiskArchive/lisk-sdk#1920 |
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.
Now it's great. Good job, Yashar.
I cannot approve the PR, because I opened it in the first place. Feel free to approve it yourself.
What was the problem?
Lisk Nano used Lisk Core 0.9.X API
How did I fix it?
Updated to Lisk Core 1.0.0 API
Changes include the following:
/api/accounts/delegates
to/api/votes
)data
object, before the name of the object depended on the endpoint (e.g.transactions
,delegates
)account.secondSignature
property was removed.account.secondPublicKey
can be used insteaddelegate. rate
property was removed.delegate.rank
can be used insteaddelegate.address
anddelegate.publicKey
was moved todelegate.account.address
anddelegate.account.publicKey
There were some issues in Lisk Core:
Every thing works completely with latest changes of
lisk core
witch contains indevelopment
branch, but there is no release for some of these features. So I had to suspend some of e2e tests.-- infinite scroll in all lists are broken. there is a separated task to fix them #1065
How to test it?
development
branch of lisk coreReview checklist