fix: update swap-endpoint to blockchain-rpc-endpoint (#628)
This commit is contained in:
@@ -30,7 +30,7 @@ export default function SettingsPage(): ReactElement {
|
||||
try {
|
||||
setAndPersistJsonRpcProvider(value)
|
||||
|
||||
const shouldUpdateDesktop = isDesktop && (await getDesktopConfiguration(desktopUrl))['swap-endpoint']
|
||||
const shouldUpdateDesktop = isDesktop && (await getDesktopConfiguration(desktopUrl))['blockchain-rpc-endpoint']
|
||||
|
||||
if (shouldUpdateDesktop) {
|
||||
await setJsonRpcInDesktop(desktopUrl, value)
|
||||
|
||||
@@ -34,7 +34,7 @@ export default function EthereumConnectionCheck(): ReactElement | null {
|
||||
Getblock
|
||||
</a>
|
||||
. By default, Bee expects a local node at http://localhost:8545. To use a provider instead, simply change
|
||||
the <strong>swap-endpoint</strong> in your configuration file.
|
||||
the <strong>blockchain-rpc-endpoint</strong> in your configuration file.
|
||||
</>
|
||||
)}
|
||||
</ExpandableListItemNote>
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user