[MBE]: Consolidate unspents for btc#43
Conversation
mohammadalfaiyazbitgo
left a comment
There was a problem hiding this comment.
some comments to address and please rebase & regenerate the api json.
|
|
||
| const ConsolidateUnspentsResponse: HttpResponse = { | ||
| 200: t.any, | ||
| 202: t.any, |
There was a problem hiding this comment.
where do you return a 202?
| }; | ||
|
|
||
| const ConsolidateUnspentsResponse: HttpResponse = { | ||
| 200: t.any, |
There was a problem hiding this comment.
please type this
| }; | ||
|
|
||
| export const ConsolidateUnspentsRequest = { | ||
| pubkey: t.string, |
There was a problem hiding this comment.
if you have the walletId then you can just retrieve the pub key from the sdk
There was a problem hiding this comment.
I've added the pubkey as a param in signing explicilty so they know they need to keep track of the pub. we still verify it against the pubkey on the wallet. can remove this in the future if we want
| pubkey: t.string, | ||
| source: t.union([t.literal('user'), t.literal('backup')]), | ||
| walletPassphrase: t.union([t.undefined, t.string]), | ||
| xprv: t.union([t.undefined, t.string]), |
There was a problem hiding this comment.
you don't need this.
There was a problem hiding this comment.
@mohammadalfaiyazbitgo mentioned only xprv removed
| const enclavedExpressClient = req.enclavedExpressClient; | ||
| const reqId = new RequestTracer(); | ||
| const bitgo = req.bitgo; | ||
| const baseCoin = bitgo.coin((req as any).params.coin); |
There was a problem hiding this comment.
use req.decoded it will be already typed.
| const params = (req as any).decoded; | ||
| const walletId = (req as any).params.walletId; |
There was a problem hiding this comment.
you don't need to cast to any
|
|
||
| try { | ||
| // Create custom signing function that delegates to EBE | ||
| const customSigningFunction = async (signParams: any) => { |
There was a problem hiding this comment.
does this need to be typed to any
a1a1bfc to
39e807a
Compare
| }; | ||
|
|
||
| export const ConsolidateUnspentsRequest = { | ||
| pubkey: t.string, |
There was a problem hiding this comment.
I've added the pubkey as a param in signing explicilty so they know they need to keep track of the pub. we still verify it against the pubkey on the wallet. can remove this in the future if we want
| export const ConsolidateUnspentsRequest = { | ||
| pubkey: t.string, | ||
| source: t.union([t.literal('user'), t.literal('backup')]), | ||
| walletPassphrase: t.union([t.undefined, t.string]), |
There was a problem hiding this comment.
remove this please, we're not using wallet passhphrases with onprem
1fb05c1 to
2f9826f
Compare
6b184dd to
a910f96
Compare
a910f96 to
620f4d6
Compare
620f4d6 to
58ae73d
Compare
The base branch was changed.
feat(mbp): swagger update
1715fbb to
52e6a5a
Compare
[MBE]: Consolidate unspents for btc
Tasks: WP-4675