diff --git a/package.json b/package.json index 7c1ee1f09..83aa04068 100644 --- a/package.json +++ b/package.json @@ -59,9 +59,8 @@ "@dydxprotocol/v4-client-js": "1.12.2", "@dydxprotocol/v4-localization": "^1.1.257", "@dydxprotocol/v4-proto": "^7.0.0-dev.0", - "@funkit/connect": "^4.0.2", "@emotion/is-prop-valid": "^1.3.0", - "@ethersproject/providers": "^5.7.2", + "@funkit/connect": "^4.0.2", "@hugocxl/react-to-image": "^0.0.9", "@js-joda/core": "^5.5.3", "@keplr-wallet/types": "^0.12.121", @@ -122,7 +121,6 @@ "color": "^4.2.3", "cosmjs-types": "^0.9.0", "crypto-js": "^4.1.1", - "ethers": "^6.6.1", "export-to-csv": "^1.2.3", "fast-json-stable-stringify": "^2.1.0", "graz": "^0.1.19", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index decb8d7dc..f33cf8843 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -44,9 +44,6 @@ dependencies: '@emotion/is-prop-valid': specifier: ^1.3.0 version: 1.3.0 - '@ethersproject/providers': - specifier: ^5.7.2 - version: 5.7.2 '@funkit/connect': specifier: ^4.0.2 version: 4.0.2(@ethersproject/address@5.7.0)(@ethersproject/networks@5.7.1)(@ethersproject/solidity@5.7.0)(@tanstack/react-query@5.37.1)(@types/react@18.3.3)(babel-plugin-macros@3.1.0)(hardhat@2.22.13)(react-dom@18.2.0)(react@18.2.0)(typescript@5.6.3)(viem@2.16.2)(wagmi@2.10.9) @@ -230,9 +227,6 @@ dependencies: crypto-js: specifier: ^4.1.1 version: 4.1.1 - ethers: - specifier: ^6.6.1 - version: 6.6.1 export-to-csv: specifier: ^1.2.3 version: 1.2.3 @@ -2637,8 +2631,8 @@ packages: - fp-ts dev: false - /@chain-registry/types@0.50.33: - resolution: {integrity: sha512-1zArCjYizFdfbP3L1WCUm3iL7Kf7VBS8N87SEqaTg6rC+fePYsq90LGpFuq2wzNPfQWPT7tsMT22ISeDIYflLA==} + /@chain-registry/types@0.50.35: + resolution: {integrity: sha512-U01vuZ5CDdpmKhDkc+xRVQZyEqdYbqzdL2SQXq+AiVLEmWwkDSjASQK3V4Lyn5h91jTJqCIYbwLbPuOtOF6JjA==} dev: false /@coinbase/wallet-sdk@3.9.3: @@ -9543,7 +9537,7 @@ packages: '@solana/wallet-adapter-base': 0.9.23(@solana/web3.js@1.93.2) '@solana/web3.js': 1.93.2 axios: 1.6.7 - chain-registry: 1.69.59 + chain-registry: 1.69.61 cosmjs-types: 0.8.0 keccak256: 1.0.6 kujira.js: 0.9.162 @@ -14188,10 +14182,10 @@ packages: type-detect: 4.1.0 dev: true - /chain-registry@1.69.59: - resolution: {integrity: sha512-8NUDiFtgXJAOpFTGwAnBzps3Kfn/tlvLNVZ8W6J/5JbGf7R8ZSSeuMM+g8xm1toI7nbjgzN1HDGh/VjazVbbQw==} + /chain-registry@1.69.61: + resolution: {integrity: sha512-6OBR/nCn3UPGrqnmQk1Pw73c6oGia6FIlLVoPM++LSO4Tv8gM8mW0ahl2VBH0URoq9yCB1h/+CD7+DNaounagA==} dependencies: - '@chain-registry/types': 0.50.33 + '@chain-registry/types': 0.50.35 dev: false /chalk@2.4.2: @@ -19604,7 +19598,7 @@ packages: '@ethersproject/bignumber': 5.7.0 '@keplr-wallet/types': 0.11.64 '@types/google-protobuf': 3.15.12 - chain-registry: 1.69.59 + chain-registry: 1.69.61 cosmjs-types: 0.8.0 long: 4.0.0 text-encoding: 0.7.0 diff --git a/src/views/forms/AccountManagementFormsNew/WithdrawForm/WithdrawForm.tsx b/src/views/forms/AccountManagementFormsNew/WithdrawForm/WithdrawForm.tsx index 25710ca4f..4fcefc9e5 100644 --- a/src/views/forms/AccountManagementFormsNew/WithdrawForm/WithdrawForm.tsx +++ b/src/views/forms/AccountManagementFormsNew/WithdrawForm/WithdrawForm.tsx @@ -2,10 +2,10 @@ import type { ChangeEvent, FormEvent } from 'react'; import { useCallback, useEffect, useMemo, useState } from 'react'; import { TYPE_URL_MSG_WITHDRAW_FROM_SUBACCOUNT } from '@dydxprotocol/v4-client-js'; -import { parseUnits } from 'ethers'; import type { NumberFormatValues } from 'react-number-format'; import { shallowEqual } from 'react-redux'; import styled from 'styled-components'; +import { parseUnits } from 'viem'; import { AutoSweepConfig } from '@/constants/abacus'; import { AlertType } from '@/constants/alerts'; @@ -180,7 +180,7 @@ export const WithdrawForm = () => { }, recipient: dydxAddress, assetId: 0, - quantums: parseUnits(debouncedAmount, usdcDecimals), + quantums: parseUnits(debouncedAmount, usdcDecimals).toString(), }), msgTypeURL: TYPE_URL_MSG_WITHDRAW_FROM_SUBACCOUNT, },