Skip to content

Commit

Permalink
bridge amount must greater than 0.1DORA
Browse files Browse the repository at this point in the history
  • Loading branch information
VegeBun-csj committed Aug 14, 2024
1 parent 2a8b108 commit 9eab158
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 26 deletions.
25 changes: 2 additions & 23 deletions .env
Original file line number Diff line number Diff line change
@@ -1,28 +1,7 @@
VITE_BASE_URL=
VITE_TRADE_URL=
VITE_DOCS_URL=https://docs.dorafactory.org/docs
VITE_MINTSCAN_URL=
VITE_ETHERSCAN_URL=https://sepolia.etherscan.io
VITE_DORA_EXPLORER_URL=https://vota-testnet-explorer.dorafactory.org/doravotatestnet

VITE_ALCHEMY_API_KEY=bee5140d9d2243d580ef49ade75c2356
VITE_INFURA_API_KEY=
VITE_WALLETCONNECT2_PROJECT_ID=
VITE_PK_ENCRYPTION_KEY=

VITE_STAKING_LEARN_MORE_LINK=
VITE_LAUNCH_BLOG_POST_LINK=

VITE_NETWORK_ENVIRONMENT=
VITE_NETWORK_INDEXER_REST_ENDPOINT=
VITE_NETWORK_INDEXER_WS_ENDPOINT=
VITE_NEWORK_VALIDATOR_REST_ENDPOINT=
VITE_NETWORK_CHAIN_ID=
VITE_NETWORK_USDC_DENOM=
VITE_NETWORK_USDC_DECIMALS=

VITE_INFURA_API_KEY=bee5140d9d2243d580ef49ade75c2356
VITE_ETH_CHAIN_ID=11155111
VITE_ETH_DORA_ADDRESSS=0xe0A1A9e1a0704CE7B6c73988dbb4E2a54B846791
VITE_BRIDGE_CONTRACT_ADDRESS=0x775cB1bB3101A3881D093A2e1e1D0A7135809EDA
VITE_DYDX_DENOM=
VITE_DYDX_DECIMALS=
VITE_BRIDGE_CONTRACT_ADDRESS=0x775cB1bB3101A3881D093A2e1e1D0A7135809EDA
2 changes: 1 addition & 1 deletion src/hooks/useMigrateToken.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const useMigrateTokenContext = () => {

// Validations
const isAmountValid = Boolean(
MustBigNumber(ethDORABalance).gt(0) && amountBN?.gt(0) && amountBN?.lte(ethDORABalance ?? 0)
MustBigNumber(ethDORABalance).gt(0) && amountBN?.gt(0.1) && amountBN?.lte(ethDORABalance ?? 0)
);

const isDestinationAddressValid = useIsDoraAddressValid(destinationAddress);
Expand Down
3 changes: 1 addition & 2 deletions src/lib/wagmi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ const { chains, publicClient, webSocketPublicClient } = configureChains(
WAGMI_SUPPORTED_CHAINS,
[
// use infura api key
// infuraProvider({apiKey: import.meta.env.VITE_INFURA_API_KEY}),
infuraProvider({apiKey: "bee5140d9d2243d580ef49ade75c2356"}),
infuraProvider({apiKey: import.meta.env.VITE_INFURA_API_KEY}),
publicProvider(),
].filter(isTruthy)
);
Expand Down
8 changes: 8 additions & 0 deletions src/views/MigrateForm/EditingStep/MigrateFormEditingStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,14 @@ export const MigrateFormEditingStep = () => {
onClear: () => setAmountBN(undefined),
onClick: () => ethDORABalance && setAmountBN(ethDORABalanceBN),
})}
validationConfig={
amountBN && !amountBN.gt(0.1) &&
{
attached: true,
type: AlertType.Error,
message: 'Please enter a quantity greater than 0.1',
}
}
/>
</WithDetailsReceipt>

Expand Down

0 comments on commit 9eab158

Please sign in to comment.