Skip to content

Commit 6333eda

Browse files
authored
Merge branch 'main' into fix/flakytest
2 parents 67633f8 + 78fc4c3 commit 6333eda

File tree

9 files changed

+28
-23
lines changed

9 files changed

+28
-23
lines changed

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ npmMinimalAgeGate: 4320 # 3 days (in minutes)
2424
# regardless of their publish age.
2525
npmPreapprovedPackages:
2626
- "@metamask/*"
27+
- "@metamask-previews/*"
2728
- "@lavamoat/*"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metamask/core-monorepo",
3-
"version": "638.0.0",
3+
"version": "639.0.0",
44
"private": true,
55
"description": "Monorepo for packages shared between MetaMask clients",
66
"repository": {

packages/assets-controllers/CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [83.1.0]
11+
1012
### Added
1113

1214
- Add `Monad Mainnet` into `SUPPORTED_NETWORKS_ACCOUNTS_API_V4`
@@ -2166,7 +2168,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
21662168
21672169
- Use Ethers for AssetsContractController ([#845](https://github.com/MetaMask/core/pull/845))
21682170
2169-
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@83.0.0...HEAD
2171+
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@83.1.0...HEAD
2172+
[83.1.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@83.0.0...@metamask/assets-controllers@83.1.0
21702173
[83.0.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@82.0.0...@metamask/assets-controllers@83.0.0
21712174
[82.0.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@81.0.1...@metamask/assets-controllers@82.0.0
21722175
[81.0.1]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@81.0.0...@metamask/assets-controllers@81.0.1

packages/assets-controllers/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metamask/assets-controllers",
3-
"version": "83.0.0",
3+
"version": "83.1.0",
44
"description": "Controllers which manage interactions involving ERC-20, ERC-721, and ERC-1155 tokens (including NFTs)",
55
"keywords": [
66
"MetaMask",

packages/bridge-controller/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
},
6767
"devDependencies": {
6868
"@metamask/accounts-controller": "^33.1.1",
69-
"@metamask/assets-controllers": "^83.0.0",
69+
"@metamask/assets-controllers": "^83.1.0",
7070
"@metamask/auto-changelog": "^3.4.4",
7171
"@metamask/eth-json-rpc-provider": "^5.0.1",
7272
"@metamask/network-controller": "^24.3.0",

packages/subscription-controller/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Changed
1111

12+
- Make `getCryptoApproveTransactionParams` synchronous ([#6930](https://github.com/MetaMask/core/pull/6930))
1213
- Bump `@metamask/base-controller` from `^8.4.1` to `^8.4.2` ([#6917](https://github.com/MetaMask/core/pull/6917))
1314

1415
## [2.0.0]

packages/subscription-controller/src/SubscriptionController.test.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ describe('SubscriptionController', () => {
962962
},
963963
},
964964
async ({ controller }) => {
965-
const result = await controller.getCryptoApproveTransactionParams({
965+
const result = controller.getCryptoApproveTransactionParams({
966966
chainId: '0x1',
967967
paymentTokenAddress: '0xtoken',
968968
productType: PRODUCT_TYPES.SHIELD,
@@ -981,14 +981,14 @@ describe('SubscriptionController', () => {
981981

982982
it('throws when pricing not found', async () => {
983983
await withController(async ({ controller }) => {
984-
await expect(
984+
expect(() =>
985985
controller.getCryptoApproveTransactionParams({
986986
chainId: '0x1',
987987
paymentTokenAddress: '0xtoken',
988988
productType: PRODUCT_TYPES.SHIELD,
989989
interval: RECURRING_INTERVALS.month,
990990
}),
991-
).rejects.toThrow('Subscription pricing not found');
991+
).toThrow('Subscription pricing not found');
992992
});
993993
});
994994

@@ -1003,14 +1003,14 @@ describe('SubscriptionController', () => {
10031003
},
10041004
},
10051005
async ({ controller }) => {
1006-
await expect(
1006+
expect(() =>
10071007
controller.getCryptoApproveTransactionParams({
10081008
chainId: '0x1',
10091009
paymentTokenAddress: '0xtoken',
10101010
productType: PRODUCT_TYPES.SHIELD,
10111011
interval: RECURRING_INTERVALS.month,
10121012
}),
1013-
).rejects.toThrow('Product price not found');
1013+
).toThrow('Product price not found');
10141014
},
10151015
);
10161016
});
@@ -1040,14 +1040,14 @@ describe('SubscriptionController', () => {
10401040
},
10411041
},
10421042
async ({ controller }) => {
1043-
await expect(
1043+
expect(() =>
10441044
controller.getCryptoApproveTransactionParams({
10451045
chainId: '0x1',
10461046
paymentTokenAddress: '0xtoken',
10471047
productType: PRODUCT_TYPES.SHIELD,
10481048
interval: RECURRING_INTERVALS.month,
10491049
}),
1050-
).rejects.toThrow('Price not found');
1050+
).toThrow('Price not found');
10511051
},
10521052
);
10531053
});
@@ -1067,14 +1067,14 @@ describe('SubscriptionController', () => {
10671067
},
10681068
},
10691069
async ({ controller }) => {
1070-
await expect(
1070+
expect(() =>
10711071
controller.getCryptoApproveTransactionParams({
10721072
chainId: '0x1',
10731073
paymentTokenAddress: '0xtoken',
10741074
productType: PRODUCT_TYPES.SHIELD,
10751075
interval: RECURRING_INTERVALS.month,
10761076
}),
1077-
).rejects.toThrow('Chains payment info not found');
1077+
).toThrow('Chains payment info not found');
10781078
},
10791079
);
10801080
});
@@ -1101,14 +1101,14 @@ describe('SubscriptionController', () => {
11011101
},
11021102
},
11031103
async ({ controller }) => {
1104-
await expect(
1104+
expect(() =>
11051105
controller.getCryptoApproveTransactionParams({
11061106
chainId: '0x1',
11071107
paymentTokenAddress: '0xtoken',
11081108
productType: PRODUCT_TYPES.SHIELD,
11091109
interval: RECURRING_INTERVALS.month,
11101110
}),
1111-
).rejects.toThrow('Invalid chain id');
1111+
).toThrow('Invalid chain id');
11121112
},
11131113
);
11141114
});
@@ -1121,14 +1121,14 @@ describe('SubscriptionController', () => {
11211121
},
11221122
},
11231123
async ({ controller }) => {
1124-
await expect(
1124+
expect(() =>
11251125
controller.getCryptoApproveTransactionParams({
11261126
chainId: '0x1',
11271127
paymentTokenAddress: '0xtoken-invalid',
11281128
productType: PRODUCT_TYPES.SHIELD,
11291129
interval: RECURRING_INTERVALS.month,
11301130
}),
1131-
).rejects.toThrow('Invalid token address');
1131+
).toThrow('Invalid token address');
11321132
},
11331133
);
11341134
});
@@ -1162,14 +1162,14 @@ describe('SubscriptionController', () => {
11621162
},
11631163
},
11641164
async ({ controller }) => {
1165-
await expect(
1165+
expect(() =>
11661166
controller.getCryptoApproveTransactionParams({
11671167
chainId: '0x1',
11681168
paymentTokenAddress: '0xtoken',
11691169
productType: PRODUCT_TYPES.SHIELD,
11701170
interval: RECURRING_INTERVALS.month,
11711171
}),
1172-
).rejects.toThrow('Conversion rate not found');
1172+
).toThrow('Conversion rate not found');
11731173
},
11741174
);
11751175
});

packages/subscription-controller/src/SubscriptionController.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,9 +421,9 @@ export class SubscriptionController extends StaticIntervalPollingController()<
421421
* @param request.interval - The interval
422422
* @returns The crypto approve transaction params
423423
*/
424-
async getCryptoApproveTransactionParams(
424+
getCryptoApproveTransactionParams(
425425
request: GetCryptoApproveTransactionRequest,
426-
): Promise<GetCryptoApproveTransactionResponse> {
426+
): GetCryptoApproveTransactionResponse {
427427
const { pricing } = this.state;
428428
if (!pricing) {
429429
throw new Error('Subscription pricing not found');

yarn.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2737,7 +2737,7 @@ __metadata:
27372737
languageName: unknown
27382738
linkType: soft
27392739

2740-
"@metamask/assets-controllers@npm:^83.0.0, @metamask/assets-controllers@workspace:packages/assets-controllers":
2740+
"@metamask/assets-controllers@npm:^83.1.0, @metamask/assets-controllers@workspace:packages/assets-controllers":
27412741
version: 0.0.0-use.local
27422742
resolution: "@metamask/assets-controllers@workspace:packages/assets-controllers"
27432743
dependencies:
@@ -2898,7 +2898,7 @@ __metadata:
28982898
"@ethersproject/contracts": "npm:^5.7.0"
28992899
"@ethersproject/providers": "npm:^5.7.0"
29002900
"@metamask/accounts-controller": "npm:^33.1.1"
2901-
"@metamask/assets-controllers": "npm:^83.0.0"
2901+
"@metamask/assets-controllers": "npm:^83.1.0"
29022902
"@metamask/auto-changelog": "npm:^3.4.4"
29032903
"@metamask/base-controller": "npm:^8.4.2"
29042904
"@metamask/controller-utils": "npm:^11.14.1"

0 commit comments

Comments
 (0)