Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d4d802a
bump semvar version to 7.61.6 && build version to 3367
metamaskbot Jan 5, 2026
14442c1
chore: resolution for qs package (#24235)
tommasini Jan 5, 2026
673828f
fix package.json
joaoloureirop Jan 5, 2026
38ad079
fix: missing code from previous CP (#24241)
zone-live Jan 5, 2026
ba08ee9
[skip ci] Bump version number to 3368
metamaskbot Jan 5, 2026
6a7a89d
chore(runway): cherry-pick chore: fix apr issue with znon-zero values…
runway-github[bot] Jan 6, 2026
21ea821
[skip ci] Bump version number to 3371
metamaskbot Jan 6, 2026
d400d2e
chore(perps): Refactor HL subscription service (#24015) (#24274)
gambinish Jan 6, 2026
3f8578c
[skip ci] Bump version number to 3372
metamaskbot Jan 6, 2026
74d7292
[skip ci] Bump version number to 3376
metamaskbot Jan 7, 2026
bd415f5
chore(runway): cherry-pick fix: include hip3 dexes when building posi…
runway-github[bot] Jan 7, 2026
324b07c
[skip ci] Bump version number to 3388
metamaskbot Jan 7, 2026
a79aed2
[skip ci] Bump version number to 3389
metamaskbot Jan 7, 2026
c08da16
[skip ci] Bump version number to 3390
metamaskbot Jan 7, 2026
35e5000
bitrise: do not bump version code on pr_rc_rwy_pipeline
joaoloureirop Jan 7, 2026
8b605f3
[skip ci] Bump version number to 3393
metamaskbot Jan 8, 2026
8580b73
Merge branch 'stable' into release/7.61.6
joaoloureirop Jan 8, 2026
48c63c9
chore(runway): cherry-pick fix(tron): max energy and bandwidth incorr…
runway-github[bot] Jan 9, 2026
223de32
chore(runway): cherry-pick chore: bump @metamask/tron-wallet-snap to …
runway-github[bot] Jan 9, 2026
90a72fc
fix: apr display value
zone-live Jan 9, 2026
e099f12
[skip ci] Bump version number to 3410
metamaskbot Jan 9, 2026
d4b97da
[skip ci] Bump version number to 3412
metamaskbot Jan 9, 2026
7102eb7
release: release/7.61.6-Changelog (#24437)
joaoloureirop Jan 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [7.61.6]

### Fixed

- fix: fix apr issue display value cp-7.61.6 ([#24382](https://github.com/MetaMask/metamask-mobile/pull/24382))
- chore: bump @metamask/tron-wallet-snap to version 1.19.0 cp-7.61.6 ([#24378](https://github.com/MetaMask/metamask-mobile/pull/24378))
- fix(tron): max energy and bandwidth incorrectly set to 1 instead of 0 cp-7.61.6 ([#24376](https://github.com/MetaMask/metamask-mobile/pull/24376))
- fix: include hip3 dexes when building position map on init ([#24300](https://github.com/MetaMask/metamask-mobile/pull/24300))
- chore(perps): Refactor HL subscription service (#24015) ([#24274](https://github.com/MetaMask/metamask-mobile/pull/24274))
- chore: fix apr issue with znon-zero values cp-7.61.6 ([#24261](https://github.com/MetaMask/metamask-mobile/pull/24261))

## [7.61.5]

### Fixed
Expand Down Expand Up @@ -9675,7 +9686,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#957](https://github.com/MetaMask/metamask-mobile/pull/957): fix timeouts (#957)
- [#954](https://github.com/MetaMask/metamask-mobile/pull/954): Bugfix: onboarding navigation (#954)

[Unreleased]: https://github.com/MetaMask/metamask-mobile/compare/v7.61.5...HEAD
[Unreleased]: https://github.com/MetaMask/metamask-mobile/compare/v7.61.6...HEAD
[7.61.6]: https://github.com/MetaMask/metamask-mobile/compare/v7.61.5...v7.61.6
[7.61.5]: https://github.com/MetaMask/metamask-mobile/compare/v7.61.4...v7.61.5
[7.61.4]: https://github.com/MetaMask/metamask-mobile/compare/v7.61.3...v7.61.4
[7.61.3]: https://github.com/MetaMask/metamask-mobile/compare/v7.61.2...v7.61.3
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ android {
applicationId "io.metamask"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionName "7.61.5"
versionCode 3341
versionName "7.61.6"
versionCode 3412
testBuildType System.getProperty('testBuildType', 'debug')
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
manifestPlaceholders.MM_BRANCH_KEY_TEST = "$System.env.MM_BRANCH_KEY_TEST"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ describe('useTronResources', () => {
expect(result.current.energy).toEqual({
type: 'energy',
current: 0,
max: 1,
max: 0,
percentage: 0,
});

expect(result.current.bandwidth).toEqual({
type: 'bandwidth',
current: 0,
max: 1,
max: 0,
percentage: 0,
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ function createResource(
max: number,
): TronResource {
const currentBN = new BigNumber(current);
const maxBN = new BigNumber(max);
const percentageBN = currentBN.dividedBy(maxBN).multipliedBy(100);
// Use max of 1 only for percentage calculation to avoid division by zero
const divisor = new BigNumber(Math.max(1, max));
const percentageBN = currentBN.dividedBy(divisor).multipliedBy(100);

const percentage = BigNumber.min(
100,
Expand All @@ -32,7 +33,7 @@ function createResource(
return {
type,
current,
max,
max, // Keep actual max for display (can be 0)
percentage,
};
}
Expand Down Expand Up @@ -91,12 +92,13 @@ export const useTronResources = (): {
const maxEnergyValue = parseValue(maxEnergy?.balance);
const maxBandwidthValue = parseValue(maxBandwidth?.balance);

const energyMax = Math.max(1, maxEnergyValue);
const bandwidthMax = Math.max(1, maxBandwidthValue);

return {
energy: createResource('energy', energyCurrent, energyMax),
bandwidth: createResource('bandwidth', bandwidthCurrent, bandwidthMax),
energy: createResource('energy', energyCurrent, maxEnergyValue),
bandwidth: createResource(
'bandwidth',
bandwidthCurrent,
maxBandwidthValue,
),
};
}, [tronResources]);
};
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ const EarnInputView = () => {
navBarEventOptions,
///: BEGIN:ONLY_INCLUDE_IF(tron)
earnToken,
tronApyPercent,
isTronEnabled ? tronApyPercent : null,
///: END:ONLY_INCLUDE_IF
),
);
Expand All @@ -897,6 +897,7 @@ const EarnInputView = () => {
earnToken?.name,
earnToken,
///: BEGIN:ONLY_INCLUDE_IF(tron)
isTronEnabled,
tronApyPercent,
///: END:ONLY_INCLUDE_IF
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ const EarnWithdrawInputView = () => {
navBarEventOptions,
///: BEGIN:ONLY_INCLUDE_IF(tron)
receiptTokenToUse,
tronApyPercent,
isTronEnabled ? tronApyPercent : null,
///: END:ONLY_INCLUDE_IF
),
);
Expand All @@ -359,6 +359,7 @@ const EarnWithdrawInputView = () => {
isLending,
tokenLabel,
///: BEGIN:ONLY_INCLUDE_IF(tron)
isTronEnabled,
receiptTokenToUse,
tronApyPercent,
///: END:ONLY_INCLUDE_IF
Expand Down
6 changes: 4 additions & 2 deletions app/components/UI/Navbar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2124,9 +2124,11 @@ export function getStakingNavbar(
}

///: BEGIN:ONLY_INCLUDE_IF(tron)
const parsedOverride = aprOverride ? parseFloat(aprOverride) : 0;
const apr =
aprOverride ??
`${parseFloat(earnToken?.experience?.apr ?? '0').toFixed(1)}%`;
parsedOverride > 0
? aprOverride
: `${parseFloat(earnToken?.experience?.apr ?? '0').toFixed(1)}%`;
///: END:ONLY_INCLUDE_IF

return {
Expand Down
1 change: 1 addition & 0 deletions app/components/UI/Perps/controllers/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,7 @@ export interface Order {
detailedOrderType?: string; // Full order type from exchange (e.g., 'Take Profit Limit', 'Stop Market')
isTrigger?: boolean; // Whether this is a trigger order (TP/SL)
reduceOnly?: boolean; // Whether this is a reduce-only order
triggerPrice?: string; // Trigger condition price for trigger orders (e.g., TP/SL trigger level)
}

export interface Funding {
Expand Down
Loading
Loading