-
Notifications
You must be signed in to change notification settings - Fork 23
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
feat: add mint-tokens endpoint for p2sh wallet #312
feat: add mint-tokens endpoint for p2sh wallet #312
Conversation
Codecov Report
@@ Coverage Diff @@
## feat/multisig-for-bridge #312 +/- ##
===========================================================
Coverage ? 87.17%
===========================================================
Files ? 35
Lines ? 1372
Branches ? 276
===========================================================
Hits ? 1196
Misses ? 155
Partials ? 21 |
0c8fc2e
to
cdc0a2d
Compare
} | ||
|
||
const mintTokenTransaction = await req.wallet.prepareMintTokensData( | ||
token, |
Check failure
Code scanning / CodeQL
NoSQL database query built from user-controlled sources (experimental)
395b058
to
630d666
Compare
be0cb18
to
651c12e
Compare
ca83e45
to
6ce6199
Compare
package-lock.json
Outdated
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "hathor-wallet-headless", | |||
"version": "0.22.0-rc1", | |||
"version": "0.22.0-rc2", |
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.
Why are you changing this? Shouldn't you change the lib version?
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.
Fixed with rebase.
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.
See:
"version": "0.22.0-rc3", |
package.json
Outdated
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "hathor-wallet-headless", | |||
"version": "0.22.0-rc1", | |||
"version": "0.22.0-rc2", |
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.
Why are you changing this?
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.
Fixed with rebase.
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.
See:
"version": "0.22.0-rc3", |
src/api-docs.js
Outdated
@@ -6,7 +6,7 @@ const apiDoc = { | |||
info: { | |||
title: 'Headless Hathor Wallet API', | |||
description: 'This wallet is fully controlled through an HTTP API.', | |||
version: '0.22.0-rc1', | |||
version: '0.22.0-rc3', |
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.
Why change this?
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.
Fixed with rebase.
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.
See:
version: '0.22.0-rc3', |
src/api-docs.js
Outdated
}, | ||
address: { | ||
type: 'string', | ||
description: 'Optional destination address of the minted tokens.' |
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.
This is not optional, it's in the required array
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.
No. It is optional. I changed the required definition.
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.
See:
hathor-wallet-headless/src/api-docs.js
Line 1314 in 5b82047
required: ['token', 'amount'], |
src/api-docs.js
Outdated
'application/json': { | ||
examples: { | ||
error: { | ||
summary: 'Insuficient amount of tokens', |
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.
summary: 'Insuficient amount of tokens', | |
summary: 'Insufficient amount of tokens', |
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.
Fixed.
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.
See:
hathor-wallet-headless/src/api-docs.js
Line 1362 in 5b82047
summary: 'Insufficient amount of tokens', |
'/mint-tokens', | ||
body('token').isString().notEmpty(), | ||
body('amount').isInt({ min: 1 }).toInt(), | ||
body('address').isString().notEmpty().optional(), |
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.
Is it optional? The api docs description says it isn't.
But if the idea is to copy what we have in the current mint-tokens api, then it should be optional and the api docs must be fixed (the current mint tokens api docs as well).
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.
It was fixed in the api docs.
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.
See comment: #312 (comment)
ca283b1
to
d9d8a82
Compare
6ce6199
to
36be128
Compare
d9d8a82
to
a069090
Compare
a069090
to
5b82047
Compare
Acceptance Criteria
Security Checklist
Closes: #302