Skip to content

Commit

Permalink
add entity app zero boost notice
Browse files Browse the repository at this point in the history
  • Loading branch information
michavie committed May 29, 2024
1 parent 150931e commit 25895fd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/extensions/entity/src/BoostSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ export function BoostSection(props: Props) {

const handleSubmit = (e: SyntheticEvent) => {
e.preventDefault()
if (!payment) return
if (!payment || payment.amountAsBigInteger.isZero()) {
app.showToast('Can not boost with zero', 'error')
return
}

const value = payment.isEgld() ? payment.amountAsBigInteger : 0
const tokenTransfers = payment.isEgld() ? [] : [payment]

Expand Down

0 comments on commit 25895fd

Please sign in to comment.