Skip to content

Commit

Permalink
Prevent allocating 0 datacap in the future
Browse files Browse the repository at this point in the history
  • Loading branch information
kacperzuk-neti committed Sep 24, 2024
1 parent 1d6c22f commit aff9ad5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/hooks/useWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,8 @@ const useWallet = (): WalletState => {
setMessage('Sending proposal...')

const bytesDatacap = Math.floor(anyToBytes(proposalAllocationAmount))
if (bytesDatacap === 0) throw new Error("Can't grant 0 datacap.");

const messageCID =
allocatorType === AllocatorTypeEnum.CONTRACT
? await sendProposalContract(
Expand Down

0 comments on commit aff9ad5

Please sign in to comment.