feat(mbe,ebe)!: migrate to beta packages and deprecate bitgo package#81
Conversation
04fd623 to
9f3fd27
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR migrates from the deprecated bitgo package to the new @bitgo-beta packages and introduces a comprehensive coin factory for dynamic coin loading. The changes provide better modularity and prepare for future package deprecation.
- Updates all package imports from
@bitgo/*to@bitgo-beta/*equivalents - Introduces a new
coinFactoryto handle dynamic coin registration and loading - Replaces direct
bitgo.coin()calls withcoinFactory.getCoin()throughout the codebase
Reviewed Changes
Copilot reviewed 50 out of 51 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/shared/coinFactory.ts | New factory for dynamic coin loading with comprehensive coin family support |
| src/types/request.ts | Updates BitGo type from BitGo to BitGoAPI |
| src/shared/transactionUtils.ts | Package migration and bug fix for MPCUnsignedTx validation |
| package.json | Major dependency updates to use @bitgo-beta packages and version management |
Comments suppressed due to low confidence (2)
package.json:2
- [nitpick] The package name still uses
@bitgo/namespace while all dependencies have been migrated to@bitgo-beta/. Consider updating the package name to maintain consistency.
"name": "@bitgo/enclaved-bitgo-express",
src/tests/routes.test.ts:36
- The test expects the package name to be
@bitgo-beta/enclaved-bitgo-expressbut the actual package.json still shows@bitgo/enclaved-bitgo-express. This inconsistency will cause the test to fail.
response.body.should.have.property('name', '@bitgo-beta/enclaved-bitgo-express');
|
|
||
| export function isMPCUnsignedTx(tx: any): tx is MPCUnsignedTx { | ||
| return 'unsignedTx' in tx && isMPCTx(tx); | ||
| return 'unsignedTx' in tx && isMPCTx(tx.unsignedTx); |
There was a problem hiding this comment.
The logic change from isMPCTx(tx) to isMPCTx(tx.unsignedTx) appears to be a bug fix. The function should validate the unsignedTx property of the transaction object, not the entire transaction object itself.
| return 'unsignedTx' in tx && isMPCTx(tx.unsignedTx); | |
| return tx && 'unsignedTx' in tx && isMPCTx(tx.unsignedTx); |
9f3fd27 to
f4e31c0
Compare
|
|
||
| export function isMPCUnsignedTx(tx: any): tx is MPCUnsignedTx { | ||
| return 'unsignedTx' in tx && isMPCTx(tx); | ||
| return 'unsignedTx' in tx && isMPCTx(tx.unsignedTx); |
pranavjain97
left a comment
There was a problem hiding this comment.
How come beta has BitGoAPI but stable uses BitGoBase?
pranavjain97
left a comment
There was a problem hiding this comment.
I'd also re-test some of the happy paths E2E to ensure nothing has broken
| import { AbstractUtxoCoin } from '@bitgo/abstract-utxo'; | ||
| import { SignFinalOptions } from '@bitgo-beta/abstract-eth'; | ||
| import { AbstractUtxoCoin } from '@bitgo-beta/abstract-utxo'; | ||
| import { HalfSignedUtxoTransaction, MethodNotImplementedError, TransactionRecipient } from 'bitgo'; |
055f4d0 to
8be5a10
Compare
Yeah i did an ecdsa recovery & wallet generation. I'll do a multisig create and withdraw tomorrow. |
Yeah the object being passed to |
991a23f to
dee4382
Compare
|
@pranavjain97 tested a multisig wallet create & withdrawal, and an ecdsa create and withdrawal. |
dee4382 to
22ef7b5
Compare
22ef7b5 to
16ed80e
Compare
Breaking Change: Update all packages to bitgo-beta and deprecate usage of bitgo package
Ticket: WP-5336