From 0f49ab09b57735158a74eed715cc6665c372ee6d Mon Sep 17 00:00:00 2001 From: khanti42 Date: Fri, 12 Jul 2024 10:26:30 +0200 Subject: [PATCH] fix: validateAccountRequireUpgradeOrDeploy condition check (#288) --- packages/starknet-snap/src/utils/snapUtils.ts | 2 +- packages/starknet-snap/src/utils/starknetUtils.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/starknet-snap/src/utils/snapUtils.ts b/packages/starknet-snap/src/utils/snapUtils.ts index 9b0aefa2..d8699494 100644 --- a/packages/starknet-snap/src/utils/snapUtils.ts +++ b/packages/starknet-snap/src/utils/snapUtils.ts @@ -788,7 +788,7 @@ export async function showDeployRequestModal(wallet) { text( `Visit the [companion dapp for Starknet](${dappUrl( process.env.SNAP_ENV, - )}) to deploy pour account.\nThank you!`, + )}) to deploy your account.\nThank you!`, ), ]), }, diff --git a/packages/starknet-snap/src/utils/starknetUtils.ts b/packages/starknet-snap/src/utils/starknetUtils.ts index 860b6b02..4c0dee23 100644 --- a/packages/starknet-snap/src/utils/starknetUtils.ts +++ b/packages/starknet-snap/src/utils/starknetUtils.ts @@ -902,7 +902,7 @@ export const getStarkNameUtil = async (network: Network, userAddress: string) => export const validateAccountRequireUpgradeOrDeploy = async (network: Network, address: string, pubKey: string) => { if (await isUpgradeRequired(network, address)) { throw new UpgradeRequiredError('Upgrade required'); - } else if (!(await isDeployRequired(network, address, pubKey))) { + } else if (await isDeployRequired(network, address, pubKey)) { throw new DeployRequiredError(`Cairo 0 contract address ${address} balance is not empty, deploy required`); } };