Skip to content

Commit

Permalink
Merge pull request #943 from tonwhales/release/v2.3.4
Browse files Browse the repository at this point in the history
Release/v2.3.4
  • Loading branch information
whalestech authored Jun 14, 2024
2 parents 197cecf + 6bc5a1a commit 1138a7c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 80 deletions.
2 changes: 1 addition & 1 deletion VERSION_CODE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
197
198
74 changes: 1 addition & 73 deletions app/fragments/wallet/PendingTxPreviewFragment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,79 +32,7 @@ import { PendingTransaction } from "../../engine/state/pending";
import { parseBody } from "../../engine/transactions/parseWalletTransaction";
import { resolveOperation } from "../../engine/transactions/resolveOperation";
import { RoundButton } from "../../components/RoundButton";
import { SimpleTransferParams } from "../secure/SimpleTransferFragment";
import { TransferFragmentProps } from "../secure/TransferFragment";
import { fromBnWithDecimals } from "../../utils/withDecimals";

type PendingTxParams = (SimpleTransferParams & { type: 'simple' }) | (TransferFragmentProps & { type: 'transfer' });

function pendingTxToSimpleTransferParams(tx: PendingTransaction, testOnly: boolean): PendingTxParams | null {
if (!tx.address) {
return null;
}

// Skip batch transactions
if (tx.body?.type === 'batch') {
return null;
}

if (tx.body?.type === 'token') {
const amount = fromBnWithDecimals(tx.body.amount, tx.body.jetton.decimals ?? 9);

return {
type: 'simple',
target: tx.body.target.toString({ testOnly: true, bounceable: tx.body.bounceable }),
comment: tx.body.comment,
amount: toNano(amount),
stateInit: null,
job: null,
jetton: tx.body.jetton.wallet,
callback: null
};
}

if (tx.body?.type === 'payload') {
return {
type: 'transfer',
text: null,
job: null,
order: {
type: 'order',
messages: [{
target: tx.address?.toString({ testOnly, bounceable: tx.bounceable }) || '',
amount: -tx.amount,
amountAll: false,
stateInit: tx.body.stateInit || null,
payload: tx.body.cell
}]
}
};
}

if (tx.body?.type === 'comment') {
return {
type: 'simple',
target: tx.address?.toString({ testOnly, bounceable: tx.bounceable }) || '',
comment: tx.body.comment,
amount: -tx.amount,
stateInit: null,
job: null,
jetton: null,
callback: null
};
}

return {
type: 'simple',
target: tx.address.toString({ testOnly, bounceable: tx.bounceable }),
comment: null,
amount: -tx.amount,
stateInit: null,
job: null,
jetton: null,
callback: null
};
}
import { pendingTxToTransferParams } from "../../utils/toTransferParams";

const PendingTxPreview = () => {
const theme = useTheme();
Expand Down
5 changes: 2 additions & 3 deletions app/useLinkNavigator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ import { ResolvedUrl } from './utils/resolveUrl';
import { Queries } from './engine/queries';
import { useClient4 } from './engine/hooks';
import { useSelectedAccount } from './engine/hooks';
import { jettonWalletAddressQueryFn } from './engine/hooks/jettons/useJettonWalletAddress';
import { useQueryClient } from '@tanstack/react-query';
import { Address } from '@ton/core';
import { ToastDuration, useToaster } from './components/toast/ToastProvider';
import { useCallback } from 'react';
import { jettonWalletQueryFn } from './engine/hooks/jettons/usePrefetchHints';
import { jettonWalletAddressQueryFn, jettonWalletQueryFn } from './engine/hooks/jettons/usePrefetchHints';
import { useGlobalLoader } from './components/useGlobalLoader';
import { StoredJettonWallet } from './engine/metadata/StoredMetadata';

Expand Down Expand Up @@ -67,7 +66,7 @@ export function useLinkNavigator(
try {
jettonWalletAddress = await queryClient.fetchQuery({
queryKey: Queries.Jettons().Address(selected!.addressString).Wallet(resolved.jettonMaster.toString({ testOnly: isTestnet })),
queryFn: jettonWalletAddressQueryFn(client, resolved.jettonMaster.toString({ testOnly: isTestnet }), selected!.addressString, isTestnet)
queryFn: jettonWalletAddressQueryFn(resolved.jettonMaster.toString({ testOnly: isTestnet }), selected!.addressString, isTestnet)
});
} catch {
console.warn('Failed to fetch jetton wallet address', selected!.addressString, resolved.jettonMaster.toString({ testOnly: isTestnet }));
Expand Down
4 changes: 2 additions & 2 deletions ios/wallet/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>2.3.3</string>
<string>2.3.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -41,7 +41,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>197</string>
<string>198</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wallet",
"version": "2.3.3",
"version": "2.3.4",
"scripts": {
"start": "expo start --dev-client",
"android": "expo run:android",
Expand Down

0 comments on commit 1138a7c

Please sign in to comment.