Skip to content

Commit

Permalink
fix: validateAccountRequireUpgradeOrDeploy condition check (#288)
Browse files Browse the repository at this point in the history
  • Loading branch information
khanti42 authored Jul 12, 2024
1 parent e4c65e2 commit 0f49ab0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/starknet-snap/src/utils/snapUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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!`,
),
]),
},
Expand Down
2 changes: 1 addition & 1 deletion packages/starknet-snap/src/utils/starknetUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
}
};

0 comments on commit 0f49ab0

Please sign in to comment.