Skip to content

Commit

Permalink
resolve resolve import
Browse files Browse the repository at this point in the history
  • Loading branch information
fishonamos committed Sep 9, 2024
1 parent 205892b commit 0775098
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 4 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"@chakra-ui/react": "2.8.2",
"@emotion/react": "11.11.3",
"@emotion/styled": "11.11.0",
"@ethersproject/bignumber": "^5.7.0",
"@next/third-parties": "14.1.3",
"@nikolovlazar/chakra-ui-prose": "1.2.1",
"@prisma/client": "^5.18.0",
Expand Down
9 changes: 5 additions & 4 deletions src/components/Deposit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ import { useAtomValue } from 'jotai';
import mixpanel from 'mixpanel-browser';
import { useMemo, useState } from 'react';
import { ProviderInterface } from 'starknet';
import { BigNumber } from 'ethers';
import { uint256 } from 'starknet';
import LoadingWrap from './LoadingWrap';
import TxButton from './TxButton';
import { constants } from 'starknet';

Check failure on line 38 in src/components/Deposit.tsx

View workflow job for this annotation

GitHub Actions / Performs linting, formatting on the application

'constants' is defined but never used

interface DepositProps {
strategy: StrategyInfo;
Expand Down Expand Up @@ -98,10 +99,10 @@ export default function Deposit(props: DepositProps) {
const maxAmount: MyNumber = useMemo(() => {
if (props.buttonText === 'Redeem') {
// For withdrawals, use the maximum possible value
return MyNumber.fromEther(
BigNumber.from(2).pow(256).sub(1).toString(),
selectedMarket.decimals
const maxUint256 = uint256.bnToUint256(
'115792089237316195423570985008687907853269984665640564039457584007913129639935'
);
return MyNumber.from(maxUint256, selectedMarket.decimals);
}

const currentTVl = tvlInfo.data?.amount || MyNumber.fromZero();
Expand Down
26 changes: 26 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1108,6 +1108,27 @@
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f"
integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==

"@ethersproject/bignumber@^5.7.0":
version "5.7.0"
resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.7.0.tgz#e2f03837f268ba655ffba03a57853e18a18dc9c2"
integrity sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==
dependencies:
"@ethersproject/bytes" "^5.7.0"
"@ethersproject/logger" "^5.7.0"
bn.js "^5.2.1"

"@ethersproject/bytes@^5.7.0":
version "5.7.0"
resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d"
integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==
dependencies:
"@ethersproject/logger" "^5.7.0"

"@ethersproject/logger@^5.7.0":
version "5.7.0"
resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892"
integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==

"@floating-ui/core@^1.6.0":
version "1.6.7"
resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.6.7.tgz#7602367795a390ff0662efd1c7ae8ca74e75fb12"
Expand Down Expand Up @@ -2582,6 +2603,11 @@ bn.js@^4.11.9:
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88"
integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==

bn.js@^5.2.1:
version "5.2.1"
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70"
integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==

bowser@^2.11.0:
version "2.11.0"
resolved "https://registry.yarnpkg.com/bowser/-/bowser-2.11.0.tgz#5ca3c35757a7aa5771500c70a73a9f91ef420a8f"
Expand Down

0 comments on commit 0775098

Please sign in to comment.