-
-
Notifications
You must be signed in to change notification settings - Fork 246
SWAPS-2839 update bridge controllers for bitcoin #6454
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
Changes from 29 commits
7f345c7
d488050
299d7f3
e6b2bd5
9da14ea
98af283
5dc551b
249acca
eadbd8f
58cef05
f35d3a2
ca9c3d4
cae0407
7651b43
602645b
0c1028a
f2d9198
d2e73fc
45231de
30c24ec
5ac13fa
2e01ad7
b8815c6
acc60f5
644f6d3
81f4d09
ea57895
9e9ba9a
beb089d
3917e27
1af634d
41ce980
fb63f06
959ddbd
0056aec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |
|
||
### Added | ||
|
||
- Add support for Bitcoin bridge transactions ([#6454](https://github.com/MetaMask/core/pull/6454)) | ||
- Handle Bitcoin PSBT (Partially Signed Bitcoin Transaction) format in trade data | ||
- Add `BitcoinTradeDataSchema` and `BitcoinQuoteResponseSchema` validators | ||
- Support Bitcoin chain ID (`ChainId.BTC = 20000000000001`) and CAIP format (`bip122:000000000019d6689c085ae165831e93`) | ||
- Add support for Tron blockchain ([#6454](https://github.com/MetaMask/core/pull/6454)) | ||
- Add `ChainId.TRON = 728126428` and CAIP format (`tron:0x2b6653dc`) | ||
- Add `isTronChainId` utility function | ||
- Export `isNonEvmChainId` utility function to check for non-EVM chains (Solana, Bitcoin, Tron) ([#6454](https://github.com/MetaMask/core/pull/6454)) | ||
- Add `selectDefaultSlippagePercentage` that returns the default slippage for a chain and token combination ([#6616](https://github.com/MetaMask/core/pull/6616)) | ||
- Return `0.5` if requesting a bridge quote | ||
- Return `undefined` (auto) if requesting a Solana swap | ||
|
@@ -18,9 +26,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |
|
||
### Changed | ||
|
||
- **BREAKING:** Rename fee handling for non-EVM chains ([#6454](https://github.com/MetaMask/core/pull/6454)) | ||
- Replace `SolanaFees` type with `NonEvmFees` type | ||
- Replace `solanaFeesInLamports` field with `nonEvmFeesInNative` field | ||
- Update `#appendSolanaFees` to `#appendNonEvmFees` to support all non-EVM chains | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line seems like an internal-only change |
||
- The `nonEvmFeesInNative` field stores fees in the smallest units for each chain (lamports for Solana, satoshis for Bitcoin, sun for Tron) | ||
- Update Snap methods to use new unified interface for non-EVM chains ([#6454](https://github.com/MetaMask/core/pull/6454)) | ||
- Replace `getFeeForTransaction` with `computeFee` method that returns fees in native token units | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems like a breaking change as well. This is a change in the expectations we have of snaps this controller inter-operates with. |
||
- Update fee calculation to handle different unit conversions per chain | ||
- Support fee computation for Bitcoin, Solana, and Tron chains | ||
- Update quote validation to support Bitcoin-specific trade data format ([#6454](https://github.com/MetaMask/core/pull/6454)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: This is fine, but maybe better to move these two entries ("Update quote validation" and "Update selectors and utilities") as sub-bullets of "Add support for Bitcoin bridge transactions". It seems like a detail of that addition, I don't think it's as helpful to frame it as a standalone change. |
||
- Add separate validation for Bitcoin quotes that include `unsignedPsbtBase64` field | ||
- Update selectors and utilities to use `isNonEvmChainId` instead of `isSolanaChainId` for generic non-EVM handling ([#6454](https://github.com/MetaMask/core/pull/6454)) | ||
- Bump `@metamask/controller-utils` from `^11.12.0` to `^11.14.0` ([#6620](https://github.com/MetaMask/core/pull/6620), [#6629](https://github.com/MetaMask/core/pull/6629)) | ||
- Bump `@metamask/base-controller` from `^8.3.0` to `^8.4.0` ([#6632](https://github.com/MetaMask/core/pull/6632)) | ||
|
||
### Removed | ||
|
||
- **BREAKING:** Remove deprecated `SolanaFees` type - use `NonEvmFees` type instead ([#6454](https://github.com/MetaMask/core/pull/6454)) | ||
- **BREAKING:** Remove `solanaFeesInLamports` field from quotes - use `nonEvmFeesInNative` field instead ([#6454](https://github.com/MetaMask/core/pull/6454)) | ||
|
||
## [43.0.0] | ||
|
||
### Added | ||
|
Large diffs are not rendered by default.
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's unclear what is being renamed here, is this a property on a return value? The context made it seem like it was a package export or a method or something. More context would be appreciated here