Skip to content

fix(coinpay): reject non-string blockchain values - #82

Open
aiirvizionz wants to merge 1 commit into
profullstack:masterfrom
aiirvizionz:clientkit/strict-coinpay-blockchain
Open

fix(coinpay): reject non-string blockchain values#82
aiirvizionz wants to merge 1 commit into
profullstack:masterfrom
aiirvizionz:clientkit/strict-coinpay-blockchain

Conversation

@aiirvizionz

Copy link
Copy Markdown
Contributor

Summary

  • reject non-string CoinPay blockchain inputs instead of coercing objects, arrays, or numbers
  • keep missing/empty string values defaulting to SOL
  • add regression coverage for array, object, and numeric inputs

Why

normalizeCoinpayBlockchain accepted any unknown value through String(value || "SOL"), so non-string data could be silently coerced into a supported blockchain value. For payment/invoice plumbing, keeping the accepted input shape strict avoids accidental or surprising normalization.

Validation

  • apps/web/node_modules/.bin/vitest.cmd run apps/web/lib/coinpay-blockchains.test.ts (5 tests passed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant