Add is_enabled
field to Networks and Restrict Orders to Enabled Networks
#422
Labels
is_enabled
field to Networks and Restrict Orders to Enabled Networks
#422
User Story
As a developer, I want to ensure that payments can only be initiated for networks that are enabled, so that we can control which networks are actively supported and prevent payments on unsupported networks.
Acceptance Criteria
GIVEN a network has
is_enabled
set tofalse
WHEN a payment is initiated via
POST: /sender/orders
THEN the request should fail with an appropriate error message
GIVEN the
setRPCClients
function is calledWHEN it fetches networks
THEN only networks with
is_enabled
set totrue
should be fetched and used for indexingGIVEN a new network is added
WHEN the
is_enabled
field is not explicitly setTHEN it should default to
false
GIVEN a database migration is generated
WHEN the migration is applied
THEN the
network
table should have a newis_enabled
column, defaulting tofalse
Tech Details
is_enabled
field to thenetwork
table, defaulting tofalse
.is_enabled
field to theNetwork
entity in the database schema.setRPCClients
function to only fetch and connect to enabled networks.POST: /sender/orders
to ensure payments can only be initiated for enabled networks. See heresetRPCClients
.is_enabled
field defaults tofalse
for new networks.Notes/Assumptions
is_enabled
totrue
if they are actively supported.POST: /sender/orders
endpoint should return a clear error message (e.g., "Provided token is not supported for the specified network") when a payment is attempted on a disabled network.The text was updated successfully, but these errors were encountered: