{"record":{"id":"6a7185a66781b67a","repo":"affaan-m/ECC","slug":"insufficient-balance","errorCode":null,"errorMessage":"Insufficient balance","messagePattern":"Insufficient balance","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"skills/security-review/SKILL.md","lineNumber":387,"sourceCode":"```\n\n#### Transaction Verification\n```typescript\nasync function verifyTransaction(transaction: Transaction) {\n  // Verify recipient\n  if (transaction.to !== expectedRecipient) {\n    throw new Error('Invalid recipient')\n  }\n\n  // Verify amount\n  if (transaction.amount > maxAmount) {\n    throw new Error('Amount exceeds limit')\n  }\n\n  // Verify user has sufficient balance\n  const balance = await getBalance(transaction.from)\n  if (balance < transaction.amount) {\n    throw new Error('Insufficient balance')\n  }\n\n  return true\n}\n```\n\n#### Verification Steps\n- [ ] Wallet signatures verified\n- [ ] Transaction details validated\n- [ ] Balance checks before transactions\n- [ ] No blind transaction signing\n\n### 10. Dependency Security\n\n#### Regular Updates\n```bash\n# Check for vulnerabilities\nnpm audit","sourceCodeStart":369,"sourceCodeEnd":405,"githubUrl":"https://github.com/affaan-m/ECC/blob/d8409a4b0813771235555e32e3d8046a73988bfa/skills/security-review/SKILL.md#L369-L405","documentation":"Illustrative balance guard from the security-review skill: getBalance(transaction.from) is less than the transfer amount, so the transaction would fail on-chain anyway and is rejected before signing. The sender account has insufficient funds.","triggerScenarios":"Thrown at skills/security-review/SKILL.md:387 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Refresh the balance immediately before sending to avoid stale data","Reject early with a clear insufficient-funds error to the user","Never blind-sign; always re-check balance for execution-capable agents"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d8409a4b0813771235555e32e3d8046a73988bfa","analyzedAt":"2026-08-26T12:15:34.022Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}