Skip to content

Commit 980fd8b

Browse files
authored
release: 7.73.2 (#29233)
# 🚀 v7.73.2 Testing & Release Quality Process Hi Team, As part of our new **MetaMask Release Quality Process**, here’s a quick overview of the key processes, testing strategies, and milestones to ensure a smooth and high-quality deployment. --- ## 📋 Key Processes ### Testing Strategy - **Developer Teams:** Conduct regression and exploratory testing for your functional areas, including automated and manual tests for critical workflows. - **QA Team:** Focus on exploratory testing across the wallet, prioritize high-impact areas, and triage any Sentry errors found during testing. - **Customer Success Team:** Validate new functionalities and provide feedback to support release monitoring. ### GitHub Signoff - Each team must **sign off on the Release Candidate (RC)** via GitHub by the end of the validation timeline (**Tuesday EOD PT**). - Ensure all tests outlined in the Testing Plan are executed, and any identified issues are addressed. ### Issue Resolution - **Resolve all Release Blockers** (Sev0 and Sev1) by **Tuesday EOD PT**. - For unresolved blockers, PRs may be reverted, or feature flags disabled to maintain release quality and timelines. ### Cherry-Picking Criteria - Only **critical fixes** meeting outlined criteria will be cherry-picked. - Developers must ensure these fixes are thoroughly reviewed, tested, and merged by **Tuesday EOD PT**. --- ## 🗓️ Timeline and Milestones 1. **Today (Friday):** Begin Release Candidate validation. 2. **Tuesday EOD PT:** Finalize RC with all fixes and cherry-picks. 3. **Wednesday:** Buffer day for final checks. 4. **Thursday:** Submit release to app stores and begin rollout to 1% of users. 5. **Monday:** Scale deployment to 10%. 6. **Tuesday:** Full rollout to 100%. --- ## ✅ Signoff Checklist Each team is responsible for signing off via GitHub. Use the checkbox below to track signoff completion: # Team sign-off checklist - [ ] Mobile Platform This process is a major step forward in ensuring release stability and quality. Let’s stay aligned and make this release a success! 🚀 Feel free to reach out if you have questions or need clarification. Many thanks in advance # Reference - Testing plan sheet - https://docs.google.com/spreadsheets/d/1tsoodlAlyvEUpkkcNcbZ4PM9HuC9cEM80RZeoVv5OCQ/edit?gid=404070372#gid=404070372
2 parents ab68073 + 2d7e63d commit 980fd8b

60 files changed

Lines changed: 5388 additions & 478 deletions

File tree

Some content is hidden

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

CHANGELOG.md

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

88
## [Unreleased]
99

10+
## [7.73.2]
11+
12+
### Added
13+
14+
- Added Polymarket CLOB v2 support (#29076)
15+
16+
### Fixed
17+
18+
- Fixed Perps $0 balance display for accounts funded via HyperLiquid spot USDC (#29110)
19+
- Fixed Perps balance not refreshing after trades, funding, or transfers for HyperLiquid users, and corrected total balance inflation on Unified-mode accounts (#29226)
20+
1021
## [7.73.1]
1122

1223
### Fixed
@@ -11222,7 +11233,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1122211233
- [#957](https://github.com/MetaMask/metamask-mobile/pull/957): fix timeouts (#957)
1122311234
- [#954](https://github.com/MetaMask/metamask-mobile/pull/954): Bugfix: onboarding navigation (#954)
1122411235

11225-
[Unreleased]: https://github.com/MetaMask/metamask-mobile/compare/v7.73.1...HEAD
11236+
[Unreleased]: https://github.com/MetaMask/metamask-mobile/compare/v7.73.2...HEAD
11237+
[7.73.2]: https://github.com/MetaMask/metamask-mobile/compare/v7.73.1...v7.73.2
1122611238
[7.73.1]: https://github.com/MetaMask/metamask-mobile/compare/v7.73.0...v7.73.1
1122711239
[7.73.0]: https://github.com/MetaMask/metamask-mobile/compare/v7.72.1...v7.73.0
1122811240
[7.72.1]: https://github.com/MetaMask/metamask-mobile/compare/v7.72.0...v7.72.1

android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ android {
187187
applicationId "io.metamask"
188188
minSdkVersion rootProject.ext.minSdkVersion
189189
targetSdkVersion rootProject.ext.targetSdkVersion
190-
versionName "7.73.0"
191-
versionCode 4594
190+
versionName "7.73.2"
191+
versionCode 4647
192192
testBuildType System.getProperty('testBuildType', 'debug')
193193
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
194194
manifestPlaceholders.MM_BRANCH_KEY_TEST = "$System.env.MM_BRANCH_KEY_TEST"

app/components/UI/Perps/Perps.testIds.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,12 @@ export const PerpsWithdrawViewSelectorsIDs = {
323323
DEST_TOKEN_AREA: 'dest-token-area',
324324
CONTINUE_BUTTON: 'continue-button',
325325
BOTTOM_SHEET_TOOLTIP: 'withdraw-bottom-sheet-tooltip',
326+
RECEIVE_VALUE: 'perps-withdraw-receive-value',
327+
FEE_VALUE: 'perps-withdraw-fee-value',
328+
TIME_VALUE: 'perps-withdraw-time-value',
329+
// Must render availableBalance only (not availableToTradeBalance):
330+
// withdraw does not offer spot collateral.
331+
AVAILABLE_BALANCE_TEXT: 'perps-withdraw-available-balance-text',
326332
};
327333

328334
// ========================================

app/components/UI/Perps/Views/PerpsMarketDetailsView/PerpsMarketDetailsView.test.tsx

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,6 +1056,47 @@ describe('PerpsMarketDetailsView', () => {
10561056
).toBeNull();
10571057
});
10581058

1059+
it('shows add funds CTA when total balance is funded but spendable balance has no direct order path', () => {
1060+
mockUseDefaultPayWithTokenWhenNoPerpsBalance.mockReturnValue(null);
1061+
mockUsePerpsAccount.mockReturnValue({
1062+
account: {
1063+
availableBalance: '0.00',
1064+
marginUsed: '0.00',
1065+
unrealizedPnl: '0.00',
1066+
returnOnEquity: '0.00',
1067+
totalBalance: '100.00',
1068+
},
1069+
isInitialLoading: false,
1070+
});
1071+
mockUsePerpsLiveAccount.mockReturnValue({
1072+
account: {
1073+
availableBalance: '0',
1074+
marginUsed: '0',
1075+
unrealizedPnl: '0',
1076+
returnOnEquity: '0',
1077+
totalBalance: '100',
1078+
},
1079+
isInitialLoading: false,
1080+
});
1081+
1082+
const { getByTestId, queryByTestId } = renderWithProvider(
1083+
<PerpsConnectionProvider>
1084+
<PerpsMarketDetailsView />
1085+
</PerpsConnectionProvider>,
1086+
{ state: initialState },
1087+
);
1088+
1089+
expect(
1090+
getByTestId(PerpsMarketDetailsViewSelectorsIDs.ADD_FUNDS_BUTTON),
1091+
).toBeOnTheScreen();
1092+
expect(
1093+
queryByTestId(PerpsMarketDetailsViewSelectorsIDs.LONG_BUTTON),
1094+
).toBeNull();
1095+
expect(
1096+
queryByTestId(PerpsMarketDetailsViewSelectorsIDs.SHORT_BUTTON),
1097+
).toBeNull();
1098+
});
1099+
10591100
it('calls navigateToConfirmation and depositWithConfirmation when add funds is pressed', async () => {
10601101
mockUseDefaultPayWithTokenWhenNoPerpsBalance.mockReturnValue(null);
10611102
mockUsePerpsAccount.mockReturnValue({

app/components/UI/Perps/Views/PerpsMarketDetailsView/PerpsMarketDetailsView.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -429,17 +429,15 @@ const PerpsMarketDetailsView: React.FC<PerpsMarketDetailsViewProps> = () => {
429429
useDefaultPayWithTokenWhenNoPerpsBalance();
430430
const { depositWithConfirmation } = usePerpsTrading();
431431
const { navigateToConfirmation } = useConfirmNavigation();
432-
const availableBalance = Number.parseFloat(
433-
account?.availableBalance?.toString() ?? '0',
432+
const tradeableBalance = Number.parseFloat(
433+
account?.availableToTradeBalance?.toString() ??
434+
account?.availableBalance?.toString() ??
435+
'0',
434436
);
435-
const showAddFundsCTA =
436-
isEligible &&
437-
!isLoadingPosition &&
438-
!existingPosition &&
439-
!isAtOICap &&
437+
const hasDirectOrderFundingPath =
440438
!isLoadingAccount &&
441-
availableBalance < PERPS_MIN_BALANCE_THRESHOLD &&
442-
defaultPayTokenWhenNoPerpsBalance === null;
439+
(tradeableBalance >= PERPS_MIN_BALANCE_THRESHOLD ||
440+
defaultPayTokenWhenNoPerpsBalance !== null);
443441

444442
const handleAddFunds = useCallback(async () => {
445443
if (!isEligible) {
@@ -1151,9 +1149,13 @@ const PerpsMarketDetailsView: React.FC<PerpsMarketDetailsViewProps> = () => {
11511149
const shouldShowNewPositionActions =
11521150
hasLongShortButtons && !existingPosition && !isAtOICap;
11531151
const shouldShowAddFundsCTASection =
1154-
shouldShowNewPositionActions && showAddFundsCTA;
1152+
shouldShowNewPositionActions &&
1153+
isEligible &&
1154+
!isLoadingAccount &&
1155+
!isLoadingPosition &&
1156+
!hasDirectOrderFundingPath;
11551157
const shouldShowLongShortButtonsOnly =
1156-
shouldShowNewPositionActions && !showAddFundsCTA;
1158+
shouldShowNewPositionActions && !shouldShowAddFundsCTASection;
11571159

11581160
const shouldShowPerpsMarketInsights =
11591161
isPerpsInsightsEnabled &&

app/components/UI/Perps/Views/PerpsWithdrawView/PerpsWithdrawView.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,11 @@ const PerpsWithdrawView: React.FC = () => {
403403
]}
404404
/>
405405
</Box>
406-
<Text variant={TextVariant.BodyMD} color={TextColor.Alternative}>
406+
<Text
407+
variant={TextVariant.BodyMD}
408+
color={TextColor.Alternative}
409+
testID={PerpsWithdrawViewSelectorsIDs.AVAILABLE_BALANCE_TEXT}
410+
>
407411
{strings('perps.withdrawal.available_balance', {
408412
amount: formattedBalance,
409413
})}

app/components/UI/Perps/components/PerpsMarketBalanceActions/PerpsMarketBalanceActions.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,13 @@ const PerpsMarketBalanceActions: React.FC<PerpsMarketBalanceActionsProps> = ({
182182
[stopBalanceAnimation],
183183
);
184184

185-
const availableBalance = perpsAccount?.availableBalance || '0';
185+
// Order-entry surface reads availableToTradeBalance (withdrawable +
186+
// unreserved spot collateral). Withdraw surfaces keep reading
187+
// availableBalance directly.
188+
const availableBalance =
189+
perpsAccount?.availableToTradeBalance ??
190+
perpsAccount?.availableBalance ??
191+
'0';
186192

187193
// Show skeleton while loading initial account data
188194
if (isInitialLoading) {

app/components/UI/Perps/hooks/useDefaultPayWithTokenWhenNoPerpsBalance.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,13 @@ export function useDefaultPayWithTokenWhenNoPerpsBalance(): PerpsSelectedPayment
3939
if (!featureEnabled) {
4040
return null;
4141
}
42-
const availableBalance = Number.parseFloat(
43-
perpsAccount?.availableBalance?.toString() ?? '0',
42+
const tradeableBalance = Number.parseFloat(
43+
perpsAccount?.availableToTradeBalance?.toString() ??
44+
perpsAccount?.availableBalance?.toString() ??
45+
'0',
4446
);
4547

46-
if (availableBalance > PERPS_MIN_BALANCE_THRESHOLD) {
48+
if (tradeableBalance > PERPS_MIN_BALANCE_THRESHOLD) {
4749
return null;
4850
}
4951
if (!allowlistAssets?.length) {
@@ -93,6 +95,7 @@ export function useDefaultPayWithTokenWhenNoPerpsBalance(): PerpsSelectedPayment
9395
}, [
9496
featureEnabled,
9597
perpsAccount?.availableBalance,
98+
perpsAccount?.availableToTradeBalance,
9699
allowlistAssets,
97100
activeProvider,
98101
currentNetwork,

app/components/UI/Perps/hooks/usePerpsOrderForm.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ export function usePerpsOrderForm(
9292
const availableBalance = Number.parseFloat(
9393
effectiveAvailableBalanceParam != null
9494
? effectiveAvailableBalanceParam.toString()
95-
: (account?.availableBalance?.toString() ?? '0'),
95+
: (account?.availableToTradeBalance?.toString() ??
96+
account?.availableBalance?.toString() ??
97+
'0'),
9698
);
9799

98100
// When paying with a custom token, use selected token amount in USD (including 0); otherwise use Perps balance

app/components/UI/Perps/utils/hyperLiquidAdapter.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,6 +1077,7 @@ describe('hyperLiquidAdapter', () => {
10771077

10781078
expect(result).toEqual({
10791079
availableBalance: '700.25',
1080+
availableToTradeBalance: '700.25', // withdrawable + free spot (no spot provided)
10801081
marginUsed: '300.25',
10811082
unrealizedPnl: '24.5', // 50.0 + (-25.5)
10821083
returnOnEquity: '7.991673605328893', // Calculated from weighted return and margin
@@ -1120,6 +1121,7 @@ describe('hyperLiquidAdapter', () => {
11201121

11211122
expect(result).toEqual({
11221123
availableBalance: '350.0',
1124+
availableToTradeBalance: '850.5', // withdrawable 350 + free spot 500.5 (hold = 0)
11231125
marginUsed: '150.0',
11241126
unrealizedPnl: '100',
11251127
returnOnEquity: '0',
@@ -1158,6 +1160,7 @@ describe('hyperLiquidAdapter', () => {
11581160

11591161
expect(result).toEqual({
11601162
availableBalance: '800.0',
1163+
availableToTradeBalance: '800', // withdrawable + 0 (no spot totals)
11611164
marginUsed: '200.0',
11621165
unrealizedPnl: '0',
11631166
returnOnEquity: '0',

0 commit comments

Comments
 (0)