feat: using SQL to handle the wallet list;#260
Open
dadiorchen wants to merge 4 commits intoGreenstand:masterfrom
Open
feat: using SQL to handle the wallet list;#260dadiorchen wants to merge 4 commits intoGreenstand:masterfrom
dadiorchen wants to merge 4 commits intoGreenstand:masterfrom
Conversation
ZavenArra
requested changes
Aug 19, 2021
__tests__/integration/wallet.spec.js
Outdated
| const chai = require("chai"); | ||
| const server = require("../../server/app"); | ||
| chai.use(require('chai-uuid')); | ||
| const Zaven = require("../mock-data/Zaven.json"); |
Contributor
There was a problem hiding this comment.
Can we use a generic title here rather than my name?
server/routes/walletRouter.js
Outdated
| const numBegin = numStart ? numStart - 1 : 0; | ||
| const numEnd = numBegin + numLimit; | ||
| walletsJson = walletsJson.slice(numBegin, numEnd); | ||
| const walletsJson = await walletService.getSubWalletList(res.locals.wallet_id, parseInt(offset || 1) - 1, parseInt(limit)) |
Contributor
There was a problem hiding this comment.
Let's fix this so that the offset send in the request starts with 0 as per normal practice, that than '1'
| * A faster way to get sub wallet list directly, from DB, and count | ||
| * the token in these wallet | ||
| */ | ||
| async getSubWalletList(walletId, offset, limit){ |
Collaborator
Author
|
@ZavenArra new commits removed your name, and set offset to start with 0. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.