fix: update swap-endpoint to blockchain-rpc-endpoint (#628)

This commit is contained in:
rampall
2023-10-18 16:42:06 +03:00
committed by GitHub
parent 8367f2b76a
commit bce93ce3cd
4 changed files with 9 additions and 9 deletions
+4 -4
View File
@@ -162,12 +162,12 @@ export function Swap({ header }: Props): ReactElement {
)
}
if (!desktopConfiguration['swap-endpoint']) {
throw new SwapError('Swap endpoint is not configured in Swarm Desktop')
if (!desktopConfiguration['blockchain-rpc-endpoint']) {
throw new SwapError('Blockchain RPC endpoint is not configured in Swarm Desktop')
}
await wrapWithSwapError(
Rpc.getNetworkChainId(desktopConfiguration['swap-endpoint']),
`Swap endpoint not reachable at ${desktopConfiguration['swap-endpoint']}`,
Rpc.getNetworkChainId(desktopConfiguration['blockchain-rpc-endpoint']),
`Blockchain RPC endpoint not reachable at ${desktopConfiguration['blockchain-rpc-endpoint']}`,
)
await wrapWithSwapError(sendSwapRequest(daiToSwap), GENERIC_SWAP_FAILED_ERROR_MESSAGE)
}