Skip to content

Commit

Permalink
chore: w5 merge conflicts resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
siandreev committed Mar 25, 2024
1 parent 5f6858c commit 213c182
Show file tree
Hide file tree
Showing 13 changed files with 361 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/entries/crypto/asset/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { BLOCKCHAIN_NAME } from '../../crypto';
import { packAssetId } from './basic-asset';
import { TonAsset } from './ton-asset';
import { TronAsset } from './tron-asset';
import { Address } from 'ton-core';
import { Address } from '@ton/core';

export const TRON_USDT_ASSET: TronAsset = {
id: packAssetId(BLOCKCHAIN_NAME.TRON, 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t'),
Expand Down
4 changes: 4 additions & 0 deletions packages/core/src/tonApiV2/models/AccStatusChange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export const AccStatusChange = {
export type AccStatusChange = typeof AccStatusChange[keyof typeof AccStatusChange];


export function instanceOfAccStatusChange(value: any): boolean {
return Object.values(AccStatusChange).includes(value);
}

export function AccStatusChangeFromJSON(json: any): AccStatusChange {
return AccStatusChangeFromJSONTyped(json, false);
}
Expand Down
4 changes: 4 additions & 0 deletions packages/core/src/tonApiV2/models/AccountStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ export const AccountStatus = {
export type AccountStatus = typeof AccountStatus[keyof typeof AccountStatus];


export function instanceOfAccountStatus(value: any): boolean {
return Object.values(AccountStatus).includes(value);
}

export function AccountStatusFromJSON(json: any): AccountStatus {
return AccountStatusFromJSONTyped(json, false);
}
Expand Down
4 changes: 4 additions & 0 deletions packages/core/src/tonApiV2/models/BouncePhaseType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export const BouncePhaseType = {
export type BouncePhaseType = typeof BouncePhaseType[keyof typeof BouncePhaseType];


export function instanceOfBouncePhaseType(value: any): boolean {
return Object.values(BouncePhaseType).includes(value);
}

export function BouncePhaseTypeFromJSON(json: any): BouncePhaseType {
return BouncePhaseTypeFromJSONTyped(json, false);
}
Expand Down
4 changes: 4 additions & 0 deletions packages/core/src/tonApiV2/models/ComputeSkipReason.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export const ComputeSkipReason = {
export type ComputeSkipReason = typeof ComputeSkipReason[keyof typeof ComputeSkipReason];


export function instanceOfComputeSkipReason(value: any): boolean {
return Object.values(ComputeSkipReason).includes(value);
}

export function ComputeSkipReasonFromJSON(json: any): ComputeSkipReason {
return ComputeSkipReasonFromJSONTyped(json, false);
}
Expand Down
4 changes: 4 additions & 0 deletions packages/core/src/tonApiV2/models/JettonVerificationType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export const JettonVerificationType = {
export type JettonVerificationType = typeof JettonVerificationType[keyof typeof JettonVerificationType];


export function instanceOfJettonVerificationType(value: any): boolean {
return Object.values(JettonVerificationType).includes(value);
}

export function JettonVerificationTypeFromJSON(json: any): JettonVerificationType {
return JettonVerificationTypeFromJSONTyped(json, false);
}
Expand Down
4 changes: 4 additions & 0 deletions packages/core/src/tonApiV2/models/PoolImplementationType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export const PoolImplementationType = {
export type PoolImplementationType = typeof PoolImplementationType[keyof typeof PoolImplementationType];


export function instanceOfPoolImplementationType(value: any): boolean {
return Object.values(PoolImplementationType).includes(value);
}

export function PoolImplementationTypeFromJSON(json: any): PoolImplementationType {
return PoolImplementationTypeFromJSONTyped(json, false);
}
Expand Down
4 changes: 4 additions & 0 deletions packages/core/src/tonApiV2/models/TransactionType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ export const TransactionType = {
export type TransactionType = typeof TransactionType[keyof typeof TransactionType];


export function instanceOfTransactionType(value: any): boolean {
return Object.values(TransactionType).includes(value);
}

export function TransactionTypeFromJSON(json: any): TransactionType {
return TransactionTypeFromJSONTyped(json, false);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/utils/address.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Address } from 'ton-core';
import { Address } from '@ton/core';

export function eqAddresses(address1: string, address2?: string) {
try {
Expand Down
1 change: 1 addition & 0 deletions packages/uikit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"@storybook/testing-library": "^0.0.13",
"@ton/core": "0.54.0",
"@ton/crypto": "3.2.0",
"@ton/ton": "^13.11.1",
"@types/country-list-js": "^3.1.3",
"@types/react": "^18.0.26",
"@types/react-beautiful-dnd": "^13.1.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/uikit/src/state/rates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { formatFiatCurrency } from '../hooks/balance';
import { QueryKey } from '../libs/queryKey';
import { AssetData } from '../components/home/Jettons';
import { shiftedDecimals } from '@tonkeeper/core/dist/utils/balance';
import { Address } from 'ton';
import { Address } from '@ton/ton';

export interface TokenRate {
diff7d: string;
Expand Down
13 changes: 10 additions & 3 deletions packages/uikit/src/state/wallet.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { QueryClient, useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
import { Address } from '@ton/core';
import { CryptoCurrency } from '@tonkeeper/core/dist/entries/crypto';
import { FiatCurrencies } from '@tonkeeper/core/dist/entries/fiat';
Expand All @@ -23,14 +23,21 @@ import {
import { shiftedDecimals } from '@tonkeeper/core/dist/utils/balance';
import { isTONDNSDomain } from '@tonkeeper/core/dist/utils/nft';
import BigNumber from 'bignumber.js';
import { AssetData } from '../components/home/Jettons';
import { useAppContext, useWalletContext } from '../hooks/appContext';
import { useAppSdk } from '../hooks/appSdk';
import { useStorage } from '../hooks/storage';
import { JettonKey, QueryKey } from '../libs/queryKey';
import { useAssets } from './home';
import { TokenRate, getRateKey, toTokenRate } from './rates';
import {
getRateKey,
toTokenRate,
useRate,
getTonFiatAmount,
getJettonsFiatAmount,
tokenRate as getTokenRate
} from './rates';
import { DefaultRefetchInterval } from './tonendpoint';
import { KNOWN_TON_ASSETS } from '@tonkeeper/core/dist/entries/crypto/asset/constants';

export const useActiveWallet = () => {
const sdk = useAppSdk();
Expand Down
Loading

0 comments on commit 213c182

Please sign in to comment.