feat(sdk-core): added OFC BitGo signing on trading accounts object#8666
feat(sdk-core): added OFC BitGo signing on trading accounts object#8666alextse-bg wants to merge 3 commits intomasterfrom
Conversation
467a1cc to
d75bd7a
Compare
|
reimplements the reverted PR: #8624 Taken out the changes to ofcToken/ofc.ts. Changes to these files has no impact on current code path (since we are signing with the user key right now, |
| const prv = await this.wallet.getPrv({ walletPassphrase }); | ||
| const signedBuffer: Buffer = await this.wallet.baseCoin.signMessage({ prv }, payload); | ||
| const signature = signedBuffer.toString('hex'); | ||
| const signature = await this.wallet.toTradingAccount().signPayload({ payload, walletPassphrase }); |
There was a problem hiding this comment.
Should prepareAllocation fail fast when walletPassphrase / prv is missing but the wallet requires user signing (if that flag is knowable without extra round trips), instead of building the payload and failing at sign time?
There was a problem hiding this comment.
build time shouldn't cost too long since the only costly operations here is stringify. I can add a fail fast if it is needed.
zahin-mohammad
left a comment
There was a problem hiding this comment.
In general lgtm, but please address the as any
4c63875 to
4a7666a
Compare
make wallet passphrase optional when signing trading account TXs allow the use of prv when signing trading account TXs Ticket: WCN-217-1
When no walletPassphrase is present in the request body or environment, pass undefined to tradingAccount.signPayload() instead of throwing. The SDK routes passphrase-less signing through KMS internally. Ticket: WCN-215-1
TICKET: WCN-217