Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const config: ChainConfig = {
shielderConfig: {
shielderContractAddress: '0x5A0dea46A96a5b578c9cf1730f461eD0bC9C32c6',
relayerUrl: 'https://shielder-relayer-v2.azero.dev/azero',
shieldingFeeEstimatorUrl: 'https://fee-estimator.azero.dev/azero/get_fees',
},
nativeCurrency: {
decimals: 18,
Expand Down Expand Up @@ -57,6 +58,7 @@ const config: ChainConfig = {
shielderConfig: {
shielderContractAddress: '0x5B496EB83172B52885f80207426042eA21597077',
relayerUrl: 'https://shielder-relayer-v2.test.azero.dev/azero-testnet',
shieldingFeeEstimatorUrl: 'https://fee-estimator.test.azero.dev/azero-testnet/get_fees',
},
nativeCurrency: {
decimals: 18,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const config: ChainConfig = {
shielderConfig: {
shielderContractAddress: '0x5A0dea46A96a5b578c9cf1730f461eD0bC9C32c6',
relayerUrl: 'https://shielder-relayer-v2.azero.dev/arbitrum',
shieldingFeeEstimatorUrl: 'https://fee-estimator.azero.dev/arbitrum/get_fees',
},
ChainIcon,
NativeTokenIcon,
Expand All @@ -30,6 +31,7 @@ const config: ChainConfig = {
shielderConfig: {
shielderContractAddress: '0xca2Ca45089Fa4E2BBef2BF26E632a8CA9CD1aFd0',
relayerUrl: 'https://shielder-relayer-v2.test.azero.dev/arbitrum-testnet',
shieldingFeeEstimatorUrl: 'https://fee-estimator.test.azero.dev/arbitrum-testnet/get_fees',
},
ChainIcon,
NativeTokenIcon,
Expand Down
1 change: 1 addition & 0 deletions src/domains/chains/utils/definitions/chains/base/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const config: ChainConfig = {
shielderConfig: {
shielderContractAddress: '0x2098a5f59DAB63F1a2aB7C0715DA437D1efB012B',
relayerUrl: 'https://shielder-relayer-v2.test.azero.dev/base-testnet',
shieldingFeeEstimatorUrl: 'https://fee-estimator.test.azero.dev/base-testnet/get_fees',
},
ChainIcon,
NativeTokenIcon,
Expand Down
1 change: 1 addition & 0 deletions src/domains/chains/utils/definitions/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export type Definition = {
shielderConfig?: {
shielderContractAddress: Address,
relayerUrl: string,
shieldingFeeEstimatorUrl?: string,
},
urlPathSegment: string,
} & Pick<Chain, 'id' | 'nativeCurrency' | 'rpcUrls' | 'blockExplorers'>;
Expand Down
36 changes: 29 additions & 7 deletions src/domains/misc/utils/getQueryKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@ import type { Address } from 'viem';
import { NetworkEnvironment } from 'src/domains/chains/types/misc';

export const QUERY_KEYS = {
shielderFees: 'shielderFees',
wasmCryptoClient: 'wasm-crypto-client',
shielderClient: 'shielder-client',
shielderTransactions: 'shielder-transactions',
tokenDecimals: 'token-decimals',
shielderPrivateKey: 'shielderPrivateKey',
tokenName: 'token-name',
tokenSymbol: 'token-symbol',
tokenDecimals: 'token-decimals',
tokenPublicBalance: 'token-public-balance',
tokenShieldedBalance: 'token-shielded-balance',
shielderPrivateKey: 'shielderPrivateKey',
wasmCryptoClient: 'wasm-crypto-client',
allowanceCheck: 'allowance-check',
allowanceFeeEstimate: 'allowance-fee-estimate',
shieldingFeesEstimate: 'shielding-fees-estimate',
sendingFeesEstimate: 'sending-fees-estimate',
shielderTransactions: 'shielder-transactions',
} as const;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have sorted them alphabetically

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that's a good idea - they should be grouped semantically (I think that this won't always be the same as the alphabetical order).

Also this comment applies here.


export const MUTATION_KEYS = {
Expand All @@ -21,10 +24,29 @@ export const MUTATION_KEYS = {
} as const;

const getQueryKey = {
shielderFees: (walletAddress: Address, chainId: string) => [
QUERY_KEYS.shielderFees,
sendingFees: (walletAddress: Address, chainId: string) => [
QUERY_KEYS.sendingFeesEstimate,
walletAddress,
chainId,
],
shieldingFees: (chainId: string, tokenType: 'native' | 'erc20') => [
QUERY_KEYS.shieldingFeesEstimate,
chainId,
tokenType,
],
allowanceCheck: (tokenAddress: Address, chainId: string, walletAddress: Address, amount: string) => [
QUERY_KEYS.allowanceCheck,
tokenAddress,
chainId,
walletAddress,
amount,
],
allowanceFeeEstimate: (tokenAddress: Address, chainId: string, walletAddress: Address, amount: string) => [
QUERY_KEYS.allowanceFeeEstimate,
tokenAddress,
chainId,
walletAddress,
amount,
],
shielderClient: (chainId: number, shielderPrivateKey: Address) => [
QUERY_KEYS.shielderClient,
Expand Down
167 changes: 0 additions & 167 deletions src/domains/shielder/components/FeeRows.tsx

This file was deleted.

Loading