This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
solana-cli transfer subcommand naively tries to pay even if unfunded #9899
Labels
good first issue
Good for newcomers
Milestone
Problem
Failed system transfers (due to insufficient funds) charges a transaction fee on the payer account. And even if
solana-cli
can check whether the tx will fail or not because of that in advance, it naive submits the transfer transaction naively.This is a bit unhelpful. Small, but it causes spending a tx fee and looks silly from the user's viewpoint.
For example, user must again manually calculate the reduced all remaining fund when doing manually this unimplemented thing: #9862
Proposed Solution
Fail by deafult by doing account's fund balance check and introduce
--force
? But then this will introduce false-positives due to toctou vulnerability. Maybe #8971 is the ultimate fix?context
https://discord.com/channels/428295358100013066/439194979856809985/707339402250158210
The text was updated successfully, but these errors were encountered: