Skip to content

Commit

Permalink
Add checks for negative priority fee.
Browse files Browse the repository at this point in the history
  • Loading branch information
ankur2136 committed Apr 9, 2024
1 parent f9c9153 commit f31bd37
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/cli/src/CliSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function resolveBuildToolsPath(buildToolsPath: string | undefined) {
function latestReleaseMessage() {
showMessage(
`Publishing Tools Version ${ Constants.CLI_VERSION }`,
"- priority fee has been updated to handle network congestion\n- short_description value reduced to 30 character limit",
"- priority fee has been updated to 500000 lamports = 0.0005 SOL. To adjust this value use param `-p or --priority-fee-lamports`",
"warning"
);
}
Expand Down
4 changes: 4 additions & 0 deletions packages/core/src/CoreUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ export const mintNft = async (
const { uri } = await metaplex.nfts().uploadMetadata(json);
const computeBudget = 250000

if (priorityFeeLamports < 0) {
throw new Error("Priority fees cannot be negative")
}

const txBuilder = await metaplex
.nfts()
.builders()
Expand Down

0 comments on commit f31bd37

Please sign in to comment.