Use Big number for handling max amount paid to deployers
This commit is contained in:
parent
a0cdb486c5
commit
462bb97cb0
@ -46,6 +46,7 @@
|
||||
"axios": "^1.6.7",
|
||||
"clsx": "^2.1.0",
|
||||
"date-fns": "^3.3.1",
|
||||
"ethers": "^5.6.2",
|
||||
"downshift": "^8.3.2",
|
||||
"framer-motion": "^11.0.8",
|
||||
"gql-client": "^1.0.0",
|
||||
|
@ -8,6 +8,7 @@ import {
|
||||
AuctionParams,
|
||||
Deployer,
|
||||
} from 'gql-client';
|
||||
import { BigNumber } from 'ethers';
|
||||
|
||||
import { Select, MenuItem, FormControl, FormHelperText } from '@mui/material';
|
||||
|
||||
@ -94,8 +95,8 @@ const Configure = () => {
|
||||
if (selectedOption === 'LRN') {
|
||||
amount = selectedDeployer?.minimumPayment?.toString() ?? '0';
|
||||
} else {
|
||||
// TODO: Use BigNumber
|
||||
amount = (selectedNumProviders * Number(selectedMaxPrice)).toString();
|
||||
const bigMaxPrice = BigNumber.from(selectedMaxPrice);
|
||||
amount = bigMaxPrice.mul(selectedNumProviders).toString();
|
||||
}
|
||||
|
||||
return amount.replace(/\D/g, '');
|
||||
|
Loading…
Reference in New Issue
Block a user