Skip to content

Release 73.0.0#1630

Merged
matthewwalsh0 merged 5 commits intomainfrom
release/73.0.0
Aug 25, 2023
Merged

Release 73.0.0#1630
matthewwalsh0 merged 5 commits intomainfrom
release/73.0.0

Conversation

@matthewwalsh0
Copy link
Copy Markdown
Member

@matthewwalsh0 matthewwalsh0 commented Aug 24, 2023

Release new version of @metamask/transaction-controller.

Added

  • Add baseFeePerGas to transaction metadata (#1590)
  • Add txReceipt to transaction metadata (#1592)
  • Add initApprovals method to generate approval requests from unapproved transactions (#1575)
  • Add dappSuggestedGasFees to transaction metadata (#1617)
  • Add optional incomingTransactions constructor arguments (#1579)
    • apiKey
    • includeTokenTransfers
    • isEnabled
    • updateTransactions
  • Add incoming transaction methods (#1579)
    • startIncomingTransactionPolling
    • stopIncomingTransactionPolling
    • updateIncomingTransactions
  • Add requireApproval option to addTransaction method options (#1580)
  • Add address argument to wipeTransactions method (#1573)

Changed

  • BREAKING: Add required getSelectedAddress callback argument to constructor (#1579)
  • BREAKING: Add isSupportedNetwork method to RemoteTransactionSource interface (#1579)
  • BREAKING: Move all but first argument to options bag in addTransaction method (#1576)
  • BREAKING: Update properties of RemoteTransactionSourceRequest type (#1579)
    • The fromBlock property has changed from string to number
    • The networkType property has been removed
    • This type is intended mainly for internal use, so it's likely this change doesn't affect most projects

Removed

  • BREAKING: Remove fetchAll method (#1579)
    • This method was used to fetch transaction history from Etherscan
    • This is now handled automatically by the controller on each new block, if polling is enabled
    • Polling can be enabled or disabled by calling startIncomingTransactionPolling or stopIncomingTransactionPolling respectively
    • An immediate update can be requested by calling updateIncomingTransactions
    • The new constructor parameter incomingTransactions.isEnabled acts as an override to disable this functionality based on a client preference for example
  • BREAKING: Remove prepareUnsignedEthTx and getCommonConfiguration methods (#1581)
    • These methods were intended mainly for internal use, so it's likely this change doesn't affect most projects

@matthewwalsh0 matthewwalsh0 marked this pull request as ready for review August 24, 2023 14:51
@matthewwalsh0 matthewwalsh0 requested a review from a team as a code owner August 24, 2023 14:51

## [9.0.0]
### Added
- **BREAKING**: Add required `getSelectedAddress` callback argument to constructor ([#1579](https://github.com/MetaMask/core/pull/1579))
Copy link
Copy Markdown
Member

@Gudahtt Gudahtt Aug 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I can see how it makes sense to phrase this change entry as "Added required ___", but it feels more appropriate under the "Changed" category. Added is more often used for "new features" that can be taken advantage of, whereas this is a change in expectations for the caller. Likewise for the second entry as well.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great point, done.


### Changed
- **BREAKING**: Move all but first argument to options bag in `addTransaction` method ([#1576](https://github.com/MetaMask/core/pull/1576))
- **BREAKING**: Update `fromBlock` and `limit` types in `RemoteTransactionSourceRequest` ([#1579](https://github.com/MetaMask/core/pull/1579))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Reading this from the perspective of a mobile/extension maintainer, it's unclear how these have changed, or what actions I should take to accommodate these changes. If the "recommended action" for a breaking change isn't obvious, additional detail is greatly appreciated.

In this case it seems kinda moot, because it's a type that seems primarily meant for internal use. But from reading the changelog, it seemed like a change I'd need to handle at first.

Here's an attempt to explain that better, and also it corrects a mistake regarding the limit property (limit was unaffected, it was networkType that was removed)

Suggested change
- **BREAKING**: Update `fromBlock` and `limit` types in `RemoteTransactionSourceRequest` ([#1579](https://github.com/MetaMask/core/pull/1579))
- **BREAKING**: Update properties of `RemoteTransactionSourceRequest` type ([#1579](https://github.com/MetaMask/core/pull/1579))
- The `fromBlock` property has changed from `string` to `number`
- The `networkType` property has been removed
- This type is intended mainly for internal use, so it's likely this change doesn't affect most projects

Copy link
Copy Markdown
Contributor

@legobeat legobeat Aug 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd skip the last added line here, more noise than signal imo: This type is intended mainly for internal use, so it's likely this change doesn't affect most projects.

Same as #1630 (comment)

Great expansion otherwise 👍

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure how verbose we should be in these changelogs, but this is indeed much clearer, done.

- **BREAKING**: Update `fromBlock` and `limit` types in `RemoteTransactionSourceRequest` ([#1579](https://github.com/MetaMask/core/pull/1579))

### Removed
- **BREAKING**: Remove `fetchAll` method ([#1579](https://github.com/MetaMask/core/pull/1579))
Copy link
Copy Markdown
Member

@Gudahtt Gudahtt Aug 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's an attempt to explain in more detail how this breaking change should be handled:

Suggested change
- **BREAKING**: Remove `fetchAll` method ([#1579](https://github.com/MetaMask/core/pull/1579))
- **BREAKING**: Remove `fetchAll` method ([#1579](https://github.com/MetaMask/core/pull/1579))
- This method was used to fetch transaction history from Etherscan. This is now handled automatically by the controller instead; new transactions are fetched for each new block if polling is enabled.
- Polling can be enabled or disabled by calling `startIncomingTransactionPolling` or `stopIncomingTransactionPolling` respectively.
- An immediate update can be requested by calling `updateIncomingTransactions`
- The new constructor parameter `incomingTransactions.isEnabled` controls whether incoming transactions are enabled or not upon construction.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful, done.


### Removed
- **BREAKING**: Remove `fetchAll` method ([#1579](https://github.com/MetaMask/core/pull/1579))
- **BREAKING**: Remove `prepareUnsignedEthTx` and `getCommonConfiguration` methods ([#1581](https://github.com/MetaMask/core/pull/1581))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional detail about the change:

Suggested change
- **BREAKING**: Remove `prepareUnsignedEthTx` and `getCommonConfiguration` methods ([#1581](https://github.com/MetaMask/core/pull/1581))
- **BREAKING**: Remove `prepareUnsignedEthTx` and `getCommonConfiguration` methods ([#1581](https://github.com/MetaMask/core/pull/1581))
- - These methods were intended mainly for internal use, so it's likely this change doesn't affect most projects

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This particular line seems like it takes more than it gives and the changelog can do without it?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

I've left the additional line as it does indeed add some noise but I think the relief and info for the future adopter is by far the lesser of two evils.

(We're also adopting this in the clients but I think it's a great standard to follow)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I was on the fence about it as well! But this seems OK for now.

It felt wrong to leave public changes undocumented, even if we weren't aware of any usage of them. But it also felt misleading to list them here with no context, as reviewers might not realize that it doesn't impact them.

@Gudahtt
Copy link
Copy Markdown
Member

Gudahtt commented Aug 24, 2023

Looks good! Had a few changelog suggestions, let me know what you think.

Lots of pending changes in other packages, but I did verify that this package doesn't depend on any of them. The changes to immediate dependencies are all due to #1622 which doesn't affect the published packages.

@matthewwalsh0
Copy link
Copy Markdown
Member Author

Looks good! Had a few changelog suggestions, let me know what you think.

Lots of pending changes in other packages, but I did verify that this package doesn't depend on any of them. The changes to immediate dependencies are all due to #1622 which doesn't affect the published packages.

Thanks Mark, I've done all your recommended changes, much more info and will add more detail for breaking changes going forward.

Concerning other packages, I always do a manual diff of each other package before ignoring them to ensure no dependencies 👍

Copy link
Copy Markdown
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@matthewwalsh0 matthewwalsh0 merged commit 6381bb8 into main Aug 25, 2023
@matthewwalsh0 matthewwalsh0 deleted the release/73.0.0 branch August 25, 2023 13:01
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants