Skip to content

Commit

Permalink
got it to throw
Browse files Browse the repository at this point in the history
  • Loading branch information
nedsalk committed Feb 20, 2025
1 parent c401f57 commit a2a2e93
Show file tree
Hide file tree
Showing 2 changed files with 280 additions and 245 deletions.
13 changes: 7 additions & 6 deletions packages/account/src/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -920,12 +920,13 @@ export class Account extends AbstractAccount implements WithAddress {

if (request.maxFee.gte(amount)) {
// TODO: to throw or not to throw, that's the question
// throw new FuelError(
// ErrorCode.NOT_ENOUGH_FUNDS,
// `The account(s) sending the transaction don't have enough funds to cover the transaction.`,
// {}
// );
break;
throw new FuelError(
ErrorCode.NOT_ENOUGH_FUNDS,
`The account sending the transaction doesn't have enough funds to cover the transaction.`,
{
transactions,
}
);
}

const { waitForResult } = await this.sendTransaction(request);
Expand Down
Loading

0 comments on commit a2a2e93

Please sign in to comment.