From a84a3e6cb917e96bbeb18760fada0ec07a7214cf Mon Sep 17 00:00:00 2001 From: Harsh R <53080940+fullstackninja864@users.noreply.github.com> Date: Tue, 27 Aug 2024 11:25:50 +0530 Subject: [PATCH 1/2] fix(ui-ux): fixed POB address for DOT and SUI token (#1941) * fix(ui-ux): fixed POB address for DOT and SUI token * fix testcase --- cypress/fixtures/proof-of-backing/backingAddresses.ts | 4 ++-- src/constants/TokenBackedAddress.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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/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", }, From b618a703dc56de6988e50d14d0af281e5fd402a9 Mon Sep 17 00:00:00 2001 From: Pierre Gee Date: Wed, 11 Sep 2024 12:23:47 +0800 Subject: [PATCH 2/2] chore(ui-ux): make ocean endpoint configurable via env (#1938) * chore(ui-ux): make ocean endpoint configurable via env * change all ocean endpointss * change all ocean endpointss * fix naming * fix naming --- src/layouts/contexts/WhaleContext.tsx | 28 ++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) 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]);