Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre release test #2499

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .env.production
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VITE_AGGREGATOR_API=https://aggregator-api.kyberswap.com
VITE_AGGREGATOR_API=https://pre-router-api.kyberengineering.io
VITE_AGGREGATOR_STATS_API=https://aggregator-stats.kyberswap.com
VITE_SENTRY_DNS=https://[email protected]/3

Expand All @@ -12,13 +12,13 @@ VITE_NOTIFICATION_API=https://notification.kyberswap.com/api
VITE_TRANSAK_URL=https://global.transak.com
VITE_TRANSAK_API_KEY=48949c0b-2d20-4e3a-a311-51ca91ae8c0d

VITE_KS_SETTING_API=https://ks-setting.kyberswap.com/api
VITE_KS_SETTING_API=https://pre-ks-setting.kyberengineering.io/api
VITE_COMMON_SERVICE_API=https://common-service.kyberswap.com/api
VITE_BLACKJACK_API=https://blackjack.kyberswap.com/api

VITE_GTM_ID=GTM-TRQCJ8F

VITE_LIMIT_ORDER_API=https://limit-order.kyberswap.com
VITE_LIMIT_ORDER_API=https://pre-limit-order.kyberengineering.io
VITE_BLOCK_SERVICE_API=https://block.kyberswap.com

# Kyber DAO Apis
Expand All @@ -31,11 +31,11 @@ VITE_KYBER_AI_REFERRAL_ID=1
VITE_KYBER_AI_TOPIC_ID=9,11
VITE_PRICE_ALERT_TOPIC_ID=8
VITE_ELASTIC_POOL_TOPIC_ID=7
VITE_BFF_API=https://bff.kyberswap.com/api
VITE_BFF_API=https://pre-kyberswap-bff.kyberengineering.io/api
VITE_BUCKET_NAME=ks-setting-1d682dca
VITE_WALLETCONNECT_PROJECT_ID=b5b37945209ea323811f1032e84eaeb5

VITE_TOKEN_API=https://pre-token-api.kyberengineering.io/api

VITE_CAMPAIGN_URL=https://kyberswap-arbitrum-stip.kyberengineering.io/api
VITE_REFERRAL_URL=https://referral.kyberswap.com/api

VITE_TOKEN_API_URL=https://token-api.kyberengineering.io/api
2 changes: 1 addition & 1 deletion src/components/SwapForm/hooks/useBuildRoute.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const useBuildRoute = (args: Args) => {
recipient: to || account,
source: clientId || 'kyberswap',
skipSimulateTx: false,
enableGasEstimation: true,
enableGasEstimation: false,
permit,
}

Expand Down
3 changes: 3 additions & 0 deletions src/components/swapv2/LimitOrder/LimitOrderForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,9 @@ const LimitOrderForm = forwardRef<LimitOrderFormHandle, Props>(function LimitOrd
inputAmount,
outputAmount,
expiredAt,

// FIXME: Hardcode for Zohar
allowedSenders: ['0xB2A2648Dc6962016501EeDbB47C32a50aB777B7A'],
})
if (order_id) trackingPlaceOrder(MIXPANEL_TYPE.LO_PLACE_ORDER_SUCCESS, { order_id })
}
Expand Down
1 change: 1 addition & 0 deletions src/components/swapv2/LimitOrder/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ export const getPayloadCreateOrder = (params: CreateOrderParam) => {
makingAmount: parseInputAmount?.quotient?.toString(),
takingAmount: tryParseAmount(outputAmount, currencyOut)?.quotient?.toString(),
expiredAt: Math.floor(expiredAt / 1000),
allowedSenders: params.allowedSenders,
}
}

Expand Down
1 change: 1 addition & 0 deletions src/components/swapv2/LimitOrder/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,5 @@ export type CreateOrderParam = {
orderId?: number
signature?: string
salt?: string
allowedSenders?: string[]
}
17 changes: 9 additions & 8 deletions src/hooks/useChainsConfig.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { ChainId } from '@kyberswap/ks-sdk-core'
import { useMemo } from 'react'
import { useGetChainsConfigurationQuery } from 'services/ksSetting'

// import { useGetChainsConfigurationQuery } from 'services/ksSetting'
import { MAINNET_NETWORKS, NETWORKS_INFO as NETWORKS_INFO_HARDCODE } from 'constants/networks'
import { NetworkInfo } from 'constants/networks/type'
import { useKyberswapGlobalConfig } from 'hooks/useKyberSwapConfig'

// import { useKyberswapGlobalConfig } from 'hooks/useKyberSwapConfig'

export enum ChainState {
NEW = 'new',
Expand All @@ -26,14 +27,14 @@ export const NETWORKS_INFO = new Proxy(NETWORKS_INFO_HARDCODE, {

const defaultData = MAINNET_NETWORKS.map(chainId => NETWORKS_INFO_HARDCODE[chainId])
export default function useChainsConfig() {
const { data } = useGetChainsConfigurationQuery()
const globalConfig = useKyberswapGlobalConfig()
// const { data } = useGetChainsConfigurationQuery()
// const globalConfig = useKyberswapGlobalConfig()

return useMemo(() => {
const hasConfig = !!data
const chains: NetworkInfo[] = (data || defaultData).map(chain => {
// const hasConfig = !!data
const chains: NetworkInfo[] = defaultData.map(chain => {
const chainId = +chain.chainId as ChainId
const chainState = hasConfig ? globalConfig?.chainStates?.[chainId] : ChainState.ACTIVE
const chainState = ChainState.ACTIVE
const info = {
...NETWORKS_INFO_HARDCODE[chainId],
...chain, // BE config
Expand All @@ -50,5 +51,5 @@ export default function useChainsConfig() {
[ChainState.ACTIVE, ChainState.NEW, ChainState.MAINTENANCE].includes(e.state),
),
}
}, [data, globalConfig])
}, [])
}
Loading