diff options
Diffstat (limited to 'packages/pipeline/src/parsers/relayer_registry/index.ts')
-rw-r--r-- | packages/pipeline/src/parsers/relayer_registry/index.ts | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/packages/pipeline/src/parsers/relayer_registry/index.ts b/packages/pipeline/src/parsers/relayer_registry/index.ts index 7b1235005..9723880a4 100644 --- a/packages/pipeline/src/parsers/relayer_registry/index.ts +++ b/packages/pipeline/src/parsers/relayer_registry/index.ts @@ -18,12 +18,13 @@ function parseRelayer(relayerResp: RelayerResponse, uuid: string): Relayer { relayer.name = relayerResp.name; relayer.homepageUrl = relayerResp.homepage_url; relayer.appUrl = relayerResp.app_url; - const mainnet = getMainNetwork(relayerResp); - if (mainnet !== undefined) { - relayer.sraHttpEndpoint = mainnet.sra_http_endpoint || null; - relayer.sraWsEndpoint = mainnet.sra_ws_endpoint || null; - relayer.feeRecipientAddresses = R.path(['static_order_fields', 'fee_recipient_addresses'], mainnet) || []; - relayer.takerAddresses = R.path(['static_order_fields', 'taker_addresses'], mainnet) || []; + const mainNetworkRelayerInfo = getMainNetwork(relayerResp); + if (mainNetworkRelayerInfo !== undefined) { + relayer.sraHttpEndpoint = mainNetworkRelayerInfo.sra_http_endpoint || null; + relayer.sraWsEndpoint = mainNetworkRelayerInfo.sra_ws_endpoint || null; + relayer.feeRecipientAddresses = + R.path(['static_order_fields', 'fee_recipient_addresses'], mainNetworkRelayerInfo) || []; + relayer.takerAddresses = R.path(['static_order_fields', 'taker_addresses'], mainNetworkRelayerInfo) || []; } else { relayer.feeRecipientAddresses = []; relayer.takerAddresses = []; |