Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 3.4.3 #611

Merged
merged 9 commits into from
Oct 26, 2023
8 changes: 8 additions & 0 deletions packages/@core-js/src/utils/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,11 @@ export function throttle<Args extends unknown[]>(

return throttled;
}

export function excludeUndefinedValues<T extends object>(obj: T): T {
return Object.keys(obj).reduce((acc, key) => {
const _acc = acc;
if (obj[key] !== undefined) _acc[key] = obj[key];
return _acc;
}, {} as T);
}
4 changes: 2 additions & 2 deletions packages/mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ android {
applicationId "com.ton_keeper"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 387
versionName "3.4.2"
versionCode 390
versionName "3.4.3"
missingDimensionStrategy 'react-native-camera', 'general'
}

Expand Down
8 changes: 4 additions & 4 deletions packages/mobile/ios/ton_keeper.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = ton_keeper/ton_keeper.entitlements;
CURRENT_PROJECT_VERSION = 387;
CURRENT_PROJECT_VERSION = 390;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = CT523DK2KC;
ENABLE_BITCODE = NO;
Expand All @@ -1244,7 +1244,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 3.4.2;
MARKETING_VERSION = 3.4.3;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand All @@ -1269,7 +1269,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = ton_keeper/ton_keeper.entitlements;
CURRENT_PROJECT_VERSION = 387;
CURRENT_PROJECT_VERSION = 390;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = CT523DK2KC;
INFOPLIST_FILE = ton_keeper/SupportingFiles/Info.plist;
Expand All @@ -1278,7 +1278,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 3.4.2;
MARKETING_VERSION = 3.4.3;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down
3 changes: 1 addition & 2 deletions packages/mobile/src/core/DAppBrowser/DAppBrowser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ const DAppBrowserComponent: FC<DAppBrowserProps> = (props) => {
const resolver = deeplinking.getResolver(req.url, {
params: {
openUrl,
redirectToActivity: false,
},
});

Expand Down Expand Up @@ -136,8 +137,6 @@ const DAppBrowserComponent: FC<DAppBrowserProps> = (props) => {
openDAppsSearch(initialQuery, openUrl);
}, [currentUrl, initialUrl, openUrl]);

const handleUnsubscribeFromNotifications = useCallback(() => {}, []);

return (
<S.Container>
<BrowserNavBar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { Wallet } from 'blockchain';
import { Tonapi } from '$libs/Tonapi';
import { Modal } from '@tonkeeper/uikit';
import { push } from '$navigation/imperative';
import { SheetActions, useNavigation } from '@tonkeeper/router';
import { SheetActions } from '@tonkeeper/router';
import { openReplaceDomainAddress } from './NFTOperations/ReplaceDomainAddressModal';
import { Address } from '@tonkeeper/core';

Expand Down Expand Up @@ -112,7 +112,6 @@ export const LinkingDomainModal: React.FC<LinkingDomainModalProps> = ({
fee: initialFee,
onDone,
}) => {
const nav = useNavigation();
const [walletAddress, setWalletAddress] = React.useState(defaultWalletAddress);
const [fee] = React.useState(initialFee);
const copyText = useCopyText();
Expand Down Expand Up @@ -187,7 +186,7 @@ export const LinkingDomainModal: React.FC<LinkingDomainModalProps> = ({
<S.InfoItem>
<S.InfoItemLabel>{t('nft_fee')}</S.InfoItemLabel>
<S.InfoItemValue>
{!!fee ? (
{fee ? (
<Text variant="body1">≈ {fee} TON</Text>
) : (
<Skeleton.Line width={80} />
Expand All @@ -214,9 +213,6 @@ export const LinkingDomainModal: React.FC<LinkingDomainModalProps> = ({
},
} as any
}
onCloseModal={() => {
nav.goBack()
}}
/>
</Modal.Content>
</Modal>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,15 @@ import { t } from '@tonkeeper/shared/i18n';
import { Modal } from '@tonkeeper/uikit';
import { Address } from '@tonkeeper/core';

type NFTChangeOwnerModalProps = TxRequestBody<NftChangeOwnerParams>;
type NFTChangeOwnerModalProps = TxRequestBody<NftChangeOwnerParams> & {
redirectToActivity?: boolean;
};

export const NFTChangeOwnerModal = ({ params, ...options }: NFTChangeOwnerModalProps) => {
export const NFTChangeOwnerModal = ({
params,
redirectToActivity,
...options
}: NFTChangeOwnerModalProps) => {
const meta = useDownloadCollectionMeta(params.nftCollectionAddress);
const { footerRef, onConfirm } = useNFTOperationState(options);
const [isShownDetails, setIsShownDetails] = React.useState(false);
Expand Down Expand Up @@ -81,7 +87,7 @@ export const NFTChangeOwnerModal = ({ params, ...options }: NFTChangeOwnerModalP
<S.InfoItem>
<S.InfoItemLabel>{t('nft_fee')}</S.InfoItemLabel>
<S.InfoItemValue>
{!!fee ? (
{fee ? (
<Text variant="body1">{toLocaleNumber(fee)} TON</Text>
) : (
<Skeleton.Line width={80} />
Expand Down Expand Up @@ -112,7 +118,11 @@ export const NFTChangeOwnerModal = ({ params, ...options }: NFTChangeOwnerModalP
</S.Container>
</Modal.ScrollView>
<Modal.Footer>
<NFTOperationFooter onPressConfirm={handleConfirm} ref={footerRef} />
<NFTOperationFooter
onPressConfirm={handleConfirm}
redirectToActivity={redirectToActivity}
ref={footerRef}
/>
</Modal.Footer>
</Modal>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ import { t } from '@tonkeeper/shared/i18n';
import { Modal } from '@tonkeeper/uikit';
import { Address } from '@tonkeeper/core';

type NFTCollectionDeployModalProps = TxRequestBody<NftCollectionDeployParams>;
type NFTCollectionDeployModalProps = TxRequestBody<NftCollectionDeployParams> & {
redirectToActivity?: boolean;
};

export const NFTCollectionDeployModal = ({
params,
redirectToActivity,
...options
}: NFTCollectionDeployModalProps) => {
const meta = useDownloadMetaFromUri<NFTCollectionMeta>(params.collectionContentUri);
Expand Down Expand Up @@ -149,7 +152,11 @@ export const NFTCollectionDeployModal = ({
</S.Container>
</Modal.ScrollView>
<Modal.Footer>
<NFTOperationFooter onPressConfirm={handleConfirm} ref={footerRef} />
<NFTOperationFooter
onPressConfirm={handleConfirm}
redirectToActivity={redirectToActivity}
ref={footerRef}
/>
</Modal.Footer>
</Modal>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,15 @@ import { t } from '@tonkeeper/shared/i18n';
import { Modal } from '@tonkeeper/uikit';
import { Address } from '@tonkeeper/core';

type NFTItemDeployModalProps = TxRequestBody<NftItemDeployParams>;
type NFTItemDeployModalProps = TxRequestBody<NftItemDeployParams> & {
redirectToActivity?: boolean;
};

export const NFTItemDeployModal = ({ params, ...options }: NFTItemDeployModalProps) => {
export const NFTItemDeployModal = ({
params,
redirectToActivity,
...options
}: NFTItemDeployModalProps) => {
const itemMeta = useDownloadMetaFromUri<NFTItemMeta>(
params.nftItemContentBaseUri + params.itemContentUri,
);
Expand Down Expand Up @@ -130,7 +136,11 @@ export const NFTItemDeployModal = ({ params, ...options }: NFTItemDeployModalPro
</S.Container>
</Modal.ScrollView>
<Modal.Footer>
<NFTOperationFooter onPressConfirm={handleConfirm} ref={footerRef} />
<NFTOperationFooter
onPressConfirm={handleConfirm}
redirectToActivity={redirectToActivity}
ref={footerRef}
/>
</Modal.Footer>
</Modal>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';
import { useCopyText } from '$hooks/useCopyText';
import { useInstance } from '$hooks/useInstance';
import { useWallet} from '$hooks/useWallet';
import {Highlight, Icon, Skeleton, Text} from '$uikit';
import { toLocaleNumber} from '$utils';
import { useWallet } from '$hooks/useWallet';
import { Highlight, Icon, Skeleton, Text } from '$uikit';
import { toLocaleNumber } from '$utils';
import { debugLog } from '$utils/debugLog';
import { NFTOperationFooter, useNFTOperationState } from '../NFTOperationFooter';
import { NftSaleCancelParams, TxRequestBody } from '../TXRequest.types';
Expand All @@ -14,9 +14,15 @@ import * as S from '../NFTOperations.styles';
import { t } from '@tonkeeper/shared/i18n';
import { Modal } from '@tonkeeper/uikit';

type NFTSaleCancelModalProps = TxRequestBody<NftSaleCancelParams>;
type NFTSaleCancelModalProps = TxRequestBody<NftSaleCancelParams> & {
redirectToActivity?: boolean;
};

export const NFTSaleCancelModal = ({ params, ...options }: NFTSaleCancelModalProps) => {
export const NFTSaleCancelModal = ({
params,
redirectToActivity,
...options
}: NFTSaleCancelModalProps) => {
const item = useDownloadNFT(params.nftItemAddress);
const { footerRef, onConfirm } = useNFTOperationState(options);
const [fee, setFee] = React.useState('');
Expand Down Expand Up @@ -101,7 +107,11 @@ export const NFTSaleCancelModal = ({ params, ...options }: NFTSaleCancelModalPro
</S.Container>
</Modal.ScrollView>
<Modal.Footer>
<NFTOperationFooter onPressConfirm={handleConfirm} ref={footerRef} />
<NFTOperationFooter
onPressConfirm={handleConfirm}
ref={footerRef}
redirectToActivity={redirectToActivity}
/>
</Modal.Footer>
</Modal>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ import { Ton } from '$libs/Ton';
import { Modal } from '@tonkeeper/uikit';
import { Address } from '@tonkeeper/core';

type NFTSalePlaceModalProps = TxRequestBody<NftSalePlaceGetgemsParams>;
type NFTSalePlaceModalProps = TxRequestBody<NftSalePlaceGetgemsParams> & {
redirectToActivity?: boolean;
};

export const NFTSalePlaceGetgemsModal = ({
params,
redirectToActivity,
...options
}: NFTSalePlaceModalProps) => {
const item = useDownloadNFT(params.nftItemAddress);
Expand Down Expand Up @@ -279,7 +282,11 @@ export const NFTSalePlaceGetgemsModal = ({
</S.Container>
</Modal.ScrollView>
<Modal.Footer>
<NFTOperationFooter onPressConfirm={handleConfirm} ref={footerRef} />
<NFTOperationFooter
onPressConfirm={handleConfirm}
ref={footerRef}
redirectToActivity={redirectToActivity}
/>
</Modal.Footer>
</Modal>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,15 @@ import { Ton } from '$libs/Ton';
import { Modal } from '@tonkeeper/uikit';
import { Address } from '@tonkeeper/core';

type NFTSalePlaceModalProps = TxRequestBody<NftSalePlaceParams>;
type NFTSalePlaceModalProps = TxRequestBody<NftSalePlaceParams> & {
redirectToActivity?: boolean;
};

export const NFTSalePlaceModal = ({ params, ...options }: NFTSalePlaceModalProps) => {
export const NFTSalePlaceModal = ({
params,
redirectToActivity,
...options
}: NFTSalePlaceModalProps) => {
const item = useDownloadNFT(params.nftItemAddress);
const { footerRef, onConfirm } = useNFTOperationState(options);
const [isShownDetails, setIsShownDetails] = React.useState(false);
Expand Down Expand Up @@ -249,7 +255,11 @@ export const NFTSalePlaceModal = ({ params, ...options }: NFTSalePlaceModalProps
</S.Container>
</Modal.ScrollView>
<Modal.Footer>
<NFTOperationFooter onPressConfirm={handleConfirm} ref={footerRef} />
<NFTOperationFooter
onPressConfirm={handleConfirm}
redirectToActivity={redirectToActivity}
ref={footerRef}
/>
</Modal.Footer>
</Modal>
);
Expand Down
Loading