Skip to content

Commit ad2b856

Browse files
v4.2.5
1 parent a979d69 commit ad2b856

File tree

24 files changed

+198
-69
lines changed

24 files changed

+198
-69
lines changed

changelogs/4.2.5.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Bug fixes and performance improvements

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mytonwallet",
3-
"version": "4.2.4",
3+
"version": "4.2.5",
44
"description": "The most feature-rich web wallet and browser extension for TON – with support of multi-accounts, tokens (jettons), NFT, TON DNS, TON Sites, TON Proxy, and TON Magic.",
55
"main": "index.js",
66
"scripts": {

public/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.2.4
1+
4.2.5

src/api/chains/ton/constants.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,10 @@ export const KnownContracts: Record<ContractName, ContractInfo> = {
308308
oldHash: '5bc82f0c5972ccc6732e98cbe31ea4795da818f9e06c991331568182a8362307',
309309
isSwapAllowed: true,
310310
},
311+
// Example: https://tonscan.org/address/EQARULUYsmJq1RiZ-YiH-IJLcAZUVkVff-KBPwEmmaQGH6aC
311312
stonPtonWallet: {
312313
name: 'stonPtonWallet',
313-
oldHash: '6ccbf71a3ed9c7355f84a698a44a7406574bfb8aa34d4bbd86ab75ee9c994880',
314+
hash: '8836d2f41b39cd2cbdd8a66c10f9665d075242a66003bd8f14485bd6b140d303',
314315
isSwapAllowed: true,
315316
},
316317
stonRouter: {
@@ -357,6 +358,12 @@ export const KnownContracts: Record<ContractName, ContractInfo> = {
357358
hash: '9b9891eaa7db7becc6ccdda1bd9a8d25dc3df2817d57e4b27ec003daf81a4439',
358359
isSwapAllowed: true,
359360
},
361+
// Example: https://tonscan.org/address/EQCHHakhWxSQIWbw6ioW21YnjVKBCDd_gVjF9Mz9_dIuFy23
362+
wrappedToncoTonWallet: {
363+
name: 'wrappedToncoTonWallet',
364+
hash: 'c16fb5d47aa4f0ad23057d34490e6f26a62c71e6422e4f6a8648126857c71438',
365+
isSwapAllowed: true,
366+
},
360367
// `oldHash` should no longer be used for new contracts; it is retained for backwards compatibility with
361368
// contracts for which retrieving the new hash is difficult due to missing address tracking in past.
362369
// The `hash` field has been added for new contracts. It is a hex hash of the code,

src/api/chains/ton/swap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export async function validateDexSwapTransfers(
5050
});
5151
};
5252

53-
assert(transfers.length <= maxSplits, 'Too many main transfers');
53+
assert(mainTransfers.length <= maxSplits, 'Too many main transfers');
5454

5555
if (request.from === TONCOIN.symbol) {
5656
const maxAmount = fromDecimal(request.fromAmount) + fromDecimal(request.ourFee) + MAX_NETWORK_FEE;

src/api/chains/ton/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export type ContractName = ApiTonWalletVersion
8181
| 'dedustPool' | 'dedustVaultNative' | 'dedustVaultJetton'
8282
| 'stonPtonWallet' | 'stonRouter' | 'stonRouterV2_1' | 'stonPoolV2_1'
8383
| 'stonRouterV2_2' | 'stonRouterV2_2_alt' | 'stonPoolV2_2' | 'stonPtonWalletV2'
84-
| 'toncoRouter';
84+
| 'toncoRouter' | 'wrappedToncoTonWallet';
8585

8686
export type ContractInfo = {
8787
name: ContractName;

src/api/chains/tron/transfer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ export async function checkTransactionDraft(
6767
const size = 9 + 60 + Buffer.from(transaction.raw_data_hex, 'hex').byteLength + SIGNATURE_SIZE;
6868
fee = bandwidth > size ? 0n : BigInt(size) * BigInt(bandwidthUnitFee);
6969

70-
// If the account is not activated, we pay an extra 1 TRX for activation
70+
// If the account is not activated, we pay an extra 1 TRX and 100 bandwidth fees for activation
7171
if (account.balance === undefined) {
72-
fee += ONE_TRX;
72+
fee += ONE_TRX + 100n * BigInt(bandwidthUnitFee);
7373
}
7474
}
7575

src/api/methods/swap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export async function swapSubmit(
9696
const tonWallet = await fetchStoredWallet(accountId, 'ton');
9797

9898
const { address } = tonWallet;
99-
const authToken = tonWallet.authToken ?? await getBackendAuthToken(accountId, password);
99+
const authToken = await getBackendAuthToken(accountId, password);
100100

101101
try {
102102
const transferList: TonTransferParams[] = transfers.map((transfer) => ({

src/components/main/sections/Card/Card.module.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ $signSizeDiff: 0.375rem;
228228
position: relative;
229229
top: -0.1875rem;
230230
left: -0.0625rem;
231-
font-size: 1.75rem;
231+
font-size: calc(1.75rem * var(--font-size-scale, 1));
232232
}
233233

234234
.iconCaretSmall {
@@ -240,7 +240,7 @@ $signSizeDiff: 0.375rem;
240240
.iconCaretFraction {
241241
position: relative;
242242
top: -0.125rem;
243-
font-size: 1.375rem;
243+
font-size: calc(1.375rem * var(--font-size-scale, 1));
244244
color: var(--second-text);
245245

246246
@include mixins.transition($color-transition);

0 commit comments

Comments
 (0)