mirror of
https://github.com/minibits-cash/minibits_wallet.git
synced 2026-08-11 17:07:44 +00:00
The CDK fakewallet backend settles onchain melts against a regtest chain, so refusing bcrt1... addresses everywhere made the payout rail impossible to exercise end to end. Debug builds now pay them; release builds still refuse, and there is no setting that changes that — the only way to pay a testnet address is to be running a debug bundle you built yourself. The flag is an explicit `allowNonMainnet` parameter defaulting to ALLOW_NON_MAINNET_PAY (= __DEV__), not a global read inside the check: it keeps the decision testable, and passing `true` from production code would be a visible thing to review. It relaxes the NETWORK only — a debug build is still not a build that pays typos, and the checksum is still verified. Both enforcement points keep the guard (parser and TransferOperationApi.prepare), and a non-mainnet payout is logged as a warning when it happens. Tests pin both sides of the rule explicitly rather than depending on whatever __DEV__ is under jest. 320/320, 87 tsc (unchanged baseline).