feat(express): add cancel wallet share express route - #9369
Draft
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
Draft
feat(express): add cancel wallet share express route#9369bitgo-ai-agent-dev[bot] wants to merge 1 commit into
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
Conversation
Add a typed DELETE /api/v2/{coin}/walletshare/{id} route to the
BitGo Express server so callers can cancel outgoing wallet share
requests.
The SDK's Wallets.cancelShare() already issued the correct HTTP
DELETE to the BitGo API, but BitGo Express had no handler for
this endpoint. The accept-share endpoint had a similar gap that
was addressed with app.post(); this change adds a first-class
typed route following the same pattern as shareWallet.
Changes:
- modules/express/src/typedRoutes/api/v2/cancelWalletShare.ts:
new typed route definition (params, response codecs,
httpRoute export)
- modules/express/src/typedRoutes/api/index.ts: register
DeleteCancelWalletShare under 'express.wallet.cancelShare'
inside ExpressWalletManagementApiSpec
- modules/express/src/clientRoutes.ts: export
handleV2CancelWalletShare handler and register it with
router.delete
- modules/express/test/unit/clientRoutes/cancelWalletShare.ts:
unit tests for the new handler
- modules/bitgo/test/v2/unit/wallets.ts: unit tests for
Wallets.cancelShare() (DELETE /walletshare/:id)
Ticket: WCI-1164
Session-Id: 39708184-a685-4405-b0cf-0c296a1bf0d3
Task-Id: 7c07317a-7a0a-4ead-8e23-6f96f60d1755
ralph-bitgo
Bot
force-pushed
the
wci-1164-cancel-wallet-share-request
branch
from
July 28, 2026 09:53
09383ed to
2a06fe4
Compare
bitgo-ai-agent-dev
Bot
force-pushed
the
wci-1164-cancel-wallet-share-request
branch
from
July 28, 2026 09:53
2a06fe4 to
1c4aac0
Compare
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.
What
DELETE /api/v2/{coin}/walletshare/{id}route to BitGo Express that lets callers cancel outgoing wallet share requestsmodules/express/src/typedRoutes/api/v2/cancelWalletShare.ts'express.wallet.cancelShare'inExpressWalletManagementApiSpechandleV2CancelWalletShareexported fromclientRoutes.tsWallets.cancelShare()in the SDKWhy
Wallets.cancelShare()already issued the correctDELETE /api/v2/:coin/walletshare/:idto the BitGo API, but Express had no typed route wired up for it. This meant any client using BitGo Express to cancel a wallet share would get a 404 or fall through to the generic REST proxy without proper request validation or typed response handling.Test plan
modules/express/test/unit/clientRoutes/cancelWalletShare.ts— verifieshandleV2CancelWalletSharecallscancelShare({ walletShareId })and returns a typed responsemodules/bitgo/test/v2/unit/wallets.ts— verifiesWallets.cancelShare()sendsDELETE /api/v2/tbtc/walletshare/:idand throws whenwalletShareIdis missingTicket: CUS-1301