diff --git a/cypress/fixtures/proof-of-backing/backingAddresses.ts b/cypress/fixtures/proof-of-backing/backingAddresses.ts index c038c0842..3c7f9c53a 100644 --- a/cypress/fixtures/proof-of-backing/backingAddresses.ts +++ b/cypress/fixtures/proof-of-backing/backingAddresses.ts @@ -41,11 +41,11 @@ export const cakeBackingAddresses = [ }, { token: "dDOT", - link: "https://polkadot.subscan.io/account/12YfgqECReN4fQppa9BDoyGce43F54ZHYotE77mb5SmCBsUks", + link: "https://polkadot.subscan.io/account/12YfgqECReN4fQppa9BDoyGce43F54ZHYotE77mb5SmCBsUk", }, { token: "dSUI", - link: "https://suiexplorer.com/address/0xe319ee27de5d3cb4a2345c8b714a69d6710ca05395e3709983d886061b1b818d", + link: "https://suiscan.xyz/mainnet/account/0xe319ee27de5d3cb4a2345c8b714a69d6710ca05395e3709983d886061b1b818d", }, ]; diff --git a/src/components/commons/link/AddressLink.tsx b/src/components/commons/link/AddressLink.tsx index dde1b312d..0fd2f9724 100644 --- a/src/components/commons/link/AddressLink.tsx +++ b/src/components/commons/link/AddressLink.tsx @@ -10,9 +10,9 @@ interface AddressLinkProps { } export function AddressLink( - props: PropsWithChildren + props: PropsWithChildren, ): JSX.Element { - if (props.address === undefined || props.address.length === 0) { + if (!props.address || props.address.length === 0) { return <>; } @@ -21,7 +21,7 @@ export function AddressLink( data-testid={props.testId} className={classnames( "hover:underline text-blue-500 cursor-pointer", - props.className + props.className, )} > diff --git a/src/constants/TokenBackedAddress.ts b/src/constants/TokenBackedAddress.ts index 986677621..f52a8286b 100644 --- a/src/constants/TokenBackedAddress.ts +++ b/src/constants/TokenBackedAddress.ts @@ -98,13 +98,13 @@ export const TOKEN_BACKED_ADDRESS: BackedAddress = { }, DOT: { cake: { - link: "https://polkadot.subscan.io/account/12YfgqECReN4fQppa9BDoyGce43F54ZHYotE77mb5SmCBsUks", + link: "https://polkadot.subscan.io/account/12YfgqECReN4fQppa9BDoyGce43F54ZHYotE77mb5SmCBsUk", address: "12YfgqECReN4fQppa9BDoyGce43F54ZHYotE77mb5SmCBsUk", }, }, SUI: { cake: { - link: "https://suiexplorer.com/address/0xe319ee27de5d3cb4a2345c8b714a69d6710ca05395e3709983d886061b1b818d", + link: "https://suiscan.xyz/mainnet/account/0xe319ee27de5d3cb4a2345c8b714a69d6710ca05395e3709983d886061b1b818d", address: "0xe319ee27de5d3cb4a2345c8b714a69d6710ca05395e3709983d886061b1b818d", }, diff --git a/src/layouts/contexts/WhaleContext.tsx b/src/layouts/contexts/WhaleContext.tsx index d461b4c65..12f2cac72 100644 --- a/src/layouts/contexts/WhaleContext.tsx +++ b/src/layouts/contexts/WhaleContext.tsx @@ -33,7 +33,12 @@ export function getWhaleApiClient( ): WhaleApiClient { const network = context.query.network?.toString() ?? getEnvironment().networks[0]; - return newWhaleClient(newOceanOptions(network as EnvironmentNetwork)); + return newWhaleClient( + newOceanOptions( + network as EnvironmentNetwork, + process.env.NEXT_PUBLIC_API_CLIENT_ENDPOINT, + ), + ); } export function getWhaleRpcClient( @@ -41,7 +46,12 @@ export function getWhaleRpcClient( ): WhaleRpcClient { const network = context.query.network?.toString() ?? getEnvironment().networks[0]; - return newRpcClient(newOceanOptions(network as EnvironmentNetwork)); + return newRpcClient( + newOceanOptions( + network as EnvironmentNetwork, + process.env.NEXT_PUBLIC_RPC_CLIENT_ENDPOINT, + ), + ); } export function newPlaygroundRpcClient( @@ -66,10 +76,18 @@ export function WhaleProvider( const connection = useNetwork().connection; const memo = useMemo(() => { - const options = newOceanOptions(connection); + const apiClientOptions = newOceanOptions( + connection, + process.env.NEXT_PUBLIC_API_CLIENT_ENDPOINT, + ); + const rpcClientOptions = newOceanOptions( + connection, + process.env.NEXT_PUBLIC_RPC_CLIENT_ENDPOINT, + ); + return { - api: newWhaleClient(options), - rpc: newRpcClient(options), + api: newWhaleClient(apiClientOptions), + rpc: newRpcClient(rpcClientOptions), }; }, [connection]);