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

Add addressFilter parameter to the router of the tx-APIs #236

Merged
merged 1 commit into from
Apr 15, 2019

Conversation

cubismic
Copy link
Member

addressFilter isn't doing anything in this patch yet.
src/models/logic/transactions.ts should be changed in the future.

addressFilter isn't doing anything in this patch yet.
src/models/logic/transactions.ts should be changed in the future.
@cubismic cubismic requested a review from joojis April 15, 2019 09:19
const LOG_FILTER = ["block", "tx", ...TYPES];

// FIXME:
export const platformAddressSchema = Joi.string();
// FIXME: PlatformAddress or AssetAddress
const address = Joi.string();
const addressFilter = Joi.string().regex(
new RegExp(`^(${ADDRESS_TYPES.join("|")})(,(${ADDRESS_TYPES.join("|")}))*$`)
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make addressFilter invalidate if an address is not given.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codecov-io
Copy link

Codecov Report

Merging #236 into master will decrease coverage by 0.03%.
The diff coverage is 60%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #236      +/-   ##
==========================================
- Coverage   67.45%   67.41%   -0.04%     
==========================================
  Files          76       76              
  Lines        2074     2084      +10     
  Branches      289      293       +4     
==========================================
+ Hits         1399     1405       +6     
  Misses        639      639              
- Partials       36       40       +4
Impacted Files Coverage Δ
src/models/logic/transaction.ts 56.25% <ø> (ø) ⬆️
src/routers/validator.ts 100% <100%> (ø) ⬆️
src/routers/transaction.ts 73.52% <50%> (-2.01%) ⬇️

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 9a1e503...45aba4f. Read the comment docs.

@cubismic cubismic requested a review from joojis April 15, 2019 11:05
@cubismic cubismic merged commit 51065e4 into CodeChain-io:master Apr 15, 2019
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.

3 participants