Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
KuznetsovNikita committed Nov 26, 2024
1 parent 8cf7d9a commit c800b6e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion packages/core/src/service/walletService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,17 @@ const createPayloadOfStandardTonAccount = async (
return { name, emoji, publicKey, walletAuth, walletIdToActivate, wallets };
};

export const createAccountId = (
export const mayBeCreateAccountId = (
network: Network,
publicKey: string | undefined
): AccountId | undefined => {
if (!publicKey) {
return undefined;
}
return createAccountId(network, publicKey);
};

const createAccountId = (network: Network, publicKey: string): AccountId => {
if (network === Network.TESTNET) {
return `testnet-${publicKey}`;
} else {
Expand Down
4 changes: 2 additions & 2 deletions packages/uikit/src/components/create/ChoseWalletVersions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { isAccountTonWalletStandard } from '@tonkeeper/core/dist/entries/account
import { mnemonicToKeypair } from '@tonkeeper/core/dist/service/mnemonicService';
import { MnemonicType } from '@tonkeeper/core/dist/entries/password';
import { Network } from '@tonkeeper/core/dist/entries/network';
import { createAccountId } from '@tonkeeper/core/dist/service/walletService';
import { mayBeCreateAccountId } from '@tonkeeper/core/dist/service/walletService';

const Wrapper = styled.div`
flex: 1;
Expand Down Expand Up @@ -80,7 +80,7 @@ export const ChoseWalletVersions: FC<{
const [publicKey, setPublicKey] = useState<string | undefined>(undefined);
const { data: wallets } = useStandardTonWalletVersions(network, publicKey);
const [checkedVersions, setCheckedVersions] = useState<WalletVersion[]>([]);
const accountState = useAccountState(createAccountId(network, publicKey));
const accountState = useAccountState(mayBeCreateAccountId(network, publicKey));

useEffect(() => {
if (sdk.isIOs()) {
Expand Down

0 comments on commit c800b6e

Please sign in to comment.