diff --git a/core/src/ledger/storage_api/token.rs b/core/src/ledger/storage_api/token.rs index c1e6573a21..b177029f7e 100644 --- a/core/src/ledger/storage_api/token.rs +++ b/core/src/ledger/storage_api/token.rs @@ -33,6 +33,9 @@ pub fn transfer( where S: StorageRead + StorageWrite, { + if amount.is_zero() { + return Ok(()); + } let src_key = token::balance_key(token, src); let src_balance = read_balance(storage, token, src)?; match src_balance.checked_sub(amount) {