Skip to content

Commit 3e0dda8

Browse files
authored
Merge branch 'main' into feat/tat-1662-trade-fee-does-not-adjust-for-market-or-limit-order-maker-or-taker
2 parents 43f039e + 139b310 commit 3e0dda8

File tree

132 files changed

+23996
-19722
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+23996
-19722
lines changed

.github/scripts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"ts-node": "^10.5.0",
2626
"typescript": "~5.4.5"
2727
},
28-
"packageManager": "yarn@3.8.7",
28+
"packageManager": "yarn@4.10.3",
2929
"lavamoat": {
3030
"allowScripts": {
3131
"@lavamoat/preinstall-always-fail": false,

.github/scripts/yarn.lock

Lines changed: 461 additions & 461 deletions
Large diffs are not rendered by default.

.github/workflows/run-e2e-api-specs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- name: Enable Corepack and setup Yarn
4747
run: |
4848
corepack enable
49-
corepack prepare yarn@3.8.7 --activate
49+
corepack prepare yarn@4.10.3 --activate
5050
5151
- name: Install JavaScript dependencies with retry
5252
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 #v3.0.2

.yarn/patches/@metamask-bridge-status-controller-npm-47.2.0-1c8660e896.patch

Lines changed: 0 additions & 13 deletions
This file was deleted.

.yarn/patches/@metamask-bridge-status-controller-npm-50.1.0-308ed9262e.patch

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,38 @@
1+
diff --git a/dist/bridge-status-controller.cjs b/dist/bridge-status-controller.cjs
2+
index 6aabde7229d9c6ce349b148a16b5e8857f9670be..52f87a160c701c8e38dabf74b5043b9781fad9f5 100644
3+
--- a/dist/bridge-status-controller.cjs
4+
+++ b/dist/bridge-status-controller.cjs
5+
@@ -334,6 +334,7 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
6+
}
7+
if (status.status === bridge_controller_1.StatusTypes.COMPLETE) {
8+
__classPrivateFieldGet(this, _BridgeStatusController_trackUnifiedSwapBridgeEvent, "f").call(this, bridge_controller_1.UnifiedSwapBridgeEventName.Completed, bridgeTxMetaId);
9+
+ this.messagingSystem.publish('BridgeStatusController:destinationTransactionCompleted', historyItem.quote.destAsset.assetId);
10+
}
11+
if (status.status === bridge_controller_1.StatusTypes.FAILED) {
12+
__classPrivateFieldGet(this, _BridgeStatusController_trackUnifiedSwapBridgeEvent, "f").call(this, bridge_controller_1.UnifiedSwapBridgeEventName.Failed, bridgeTxMetaId);
13+
diff --git a/dist/types.d.cts b/dist/types.d.cts
14+
index 047c064a382ba909ef1801aeb2b46fbbdc0991c0..287eb8459fa4e75744b7e575d2330547cf8c561a 100644
15+
--- a/dist/types.d.cts
16+
+++ b/dist/types.d.cts
17+
@@ -176,7 +176,15 @@ export type BridgeStatusControllerRestartPollingForFailedAttemptsAction = Bridge
18+
export type BridgeStatusControllerGetBridgeHistoryItemByTxMetaIdAction = BridgeStatusControllerAction<BridgeStatusAction.GET_BRIDGE_HISTORY_ITEM_BY_TX_META_ID>;
19+
export type BridgeStatusControllerActions = BridgeStatusControllerStartPollingForBridgeTxStatusAction | BridgeStatusControllerWipeBridgeStatusAction | BridgeStatusControllerResetStateAction | BridgeStatusControllerGetStateAction | BridgeStatusControllerSubmitTxAction | BridgeStatusControllerRestartPollingForFailedAttemptsAction | BridgeStatusControllerGetBridgeHistoryItemByTxMetaIdAction;
20+
export type BridgeStatusControllerStateChangeEvent = ControllerStateChangeEvent<typeof BRIDGE_STATUS_CONTROLLER_NAME, BridgeStatusControllerState>;
21+
-export type BridgeStatusControllerEvents = BridgeStatusControllerStateChangeEvent;
22+
+/**
23+
++ * This event is published when the destination bridge transaction is completed
24+
++ * The payload is the asset received on the destination chain
25+
++ */
26+
+export type BridgeStatusControllerDestinationTransactionCompletedEvent = {
27+
+ type: 'BridgeStatusController:destinationTransactionCompleted';
28+
+ payload: [CaipAssetType];
29+
+};
30+
+export type BridgeStatusControllerEvents = BridgeStatusControllerStateChangeEvent | BridgeStatusControllerDestinationTransactionCompletedEvent;
31+
/**
32+
* The external actions available to the BridgeStatusController.
33+
*/
134
diff --git a/dist/utils/swap-received-amount.cjs b/dist/utils/swap-received-amount.cjs
2-
index 4c01024e3ebba952b0bbded0aa7bb7e2690629f1..4809ec09ab2b94fc0dbb5160d464da4dab61c57e 100644
35+
index 4c01024e3ebba952b0bbded0aa7bb7e2690629f1..4c41504ce0609d8b7be1f6b045d0ac3e66447646 100644
336
--- a/dist/utils/swap-received-amount.cjs
437
+++ b/dist/utils/swap-received-amount.cjs
538
@@ -28,7 +28,7 @@ const getReceivedERC20Amount = (historyItem, txMeta) => {

.yarn/releases/yarn-3.8.7.cjs

Lines changed: 0 additions & 875 deletions
This file was deleted.

.yarn/releases/yarn-4.10.3.cjs

Lines changed: 942 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
compressionLevel: mixed
2+
3+
enableGlobalCache: false
4+
15
enableScripts: false
26

37
nodeLinker: node-modules
@@ -9,4 +13,4 @@ npmAuditIgnoreAdvisories:
913
# The affected versions <6.0.6, is only present in wdio which is a dev dependency
1014
- 1104663
1115

12-
yarnPath: .yarn/releases/yarn-3.8.7.cjs
16+
yarnPath: .yarn/releases/yarn-4.10.3.cjs

app/component-library/components-temp/MultichainAccounts/AccountCell/AccountCell.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import {
2929
import { createAccountGroupDetailsNavigationDetails } from '../../../../components/Views/MultichainAccounts/sheets/MultichainAccountActions/MultichainAccountActions';
3030
import { getNetworkImageSource } from '../../../../util/networks';
3131
import { formatChainIdToCaip } from '@metamask/bridge-controller';
32-
import { formatAddress } from '../../../../util/address';
32+
import { renderShortAddress } from '../../../../util/address';
3333

3434
interface AccountCellProps {
3535
accountGroup: AccountGroupObject;
@@ -90,10 +90,7 @@ const AccountCell = ({
9090
const internalAccountFromAccountGroupForChainId =
9191
getInternalAccountByAccountGroupAndScope(caipChainId, accountGroup.id);
9292
networkAccountAddress = internalAccountFromAccountGroupForChainId?.address
93-
? formatAddress(
94-
internalAccountFromAccountGroupForChainId.address,
95-
'short',
96-
)
93+
? renderShortAddress(internalAccountFromAccountGroupForChainId.address, 4)
9794
: undefined;
9895
networkImageSource = getNetworkImageSource({ chainId });
9996
}

app/component-library/components-temp/MultichainAccounts/MultichainAccountSelectorList/MultichainAccountSelectorList.test.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ describe('MultichainAccountSelectorList', () => {
814814

815815
expect(queryByText('Account 2')).toBeTruthy();
816816
});
817-
it('renders a far selected account in the initial viewport when provided as initial selection', () => {
817+
it('renders a far selected account in the initial viewport when provided as initial selection', async () => {
818818
// Create many accounts so the selected one is far enough to require initialScrollIndex
819819
const total = 60;
820820
const accounts = Array.from({ length: total }, (_, i) =>
@@ -834,7 +834,14 @@ describe('MultichainAccountSelectorList', () => {
834834
{ state: createMockState([wallet1], internalAccounts) },
835835
);
836836

837-
// Without initialScrollIndex, this would not be visible initially
837+
// Wait for requestAnimationFrame to execute the scroll
838+
await act(async () => {
839+
await new Promise((resolve) =>
840+
requestAnimationFrame(() => resolve(undefined)),
841+
);
842+
});
843+
844+
// After scroll, the selected account should be visible
838845
expect(queryByText(`Account ${selectedIdx + 1}`)).toBeTruthy();
839846
expect(queryByText('Account 1')).toBeFalsy();
840847
});

0 commit comments

Comments
 (0)