CoinZark Swap Plugin#15
Conversation
swansontec
left a comment
There was a problem hiding this comment.
Generally looks good. I just noticed a few minor style things, which you can either fix or leave at your discretion.
| // CoinZark will return canDeposit / canReceive as status of the | ||
| // coins. The coin we want to exchange from should have canDeposit enabled | ||
| // and the coin we want to exchange to should have canReceive enabled. | ||
| if (!(currencies === null || currencies.result === null)) { |
There was a problem hiding this comment.
We prefer double-equals with null ( == null). This is the one exception to the === everywhere rule, since the == catches both null and undefined, and basically means "doesn't exist".
There was a problem hiding this comment.
Actually, reading it again, (currencies != null && currencies.result != null) might be even more obvious.
| fromCorrect = true | ||
| } | ||
|
|
||
| if (curr.id === toCurrencyCode && curr.canReceive === 1) { |
There was a problem hiding this comment.
Could we treat canReceive like a boolean, removing the === 1 part? Otherwise, if the API ever returned true in the future, this would break.
There was a problem hiding this comment.
The API returns a number here. If the API ever changes, it will be published as a new version and will require a change in the plug-in regardless.
|
A note on scheduling: We are currently in QA on a release right now, so master will hopefully be open for merging early next week. |
This pull request includes the changes for the integration of CoinZark as an Exchange provider in the Edge wallet. See also The related PR in
edge-react-gui