Skip to content

Commit

Permalink
Merge pull request #313 from reflexer-labs/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
mstfash authored May 11, 2022
2 parents 5926062 + a51eeb1 commit f4d54cf
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
6 changes: 5 additions & 1 deletion src/components/AuctionBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,11 @@ const AuctionBlock = (auction: Props) => {
>
<InfoLabel>{sellSymbol} OFFERED</InfoLabel>
<InfoValue>{`${formatNumber(
sellInititalAmount,
eventType === 'DEBT' &&
Number(sellAmount) !==
Number(sellInititalAmount)
? sellAmount
: sellInititalAmount,
2
)} ${sellSymbol}`}</InfoValue>
</InfoCol>
Expand Down
14 changes: 10 additions & 4 deletions src/components/AuctionsOperations/AuctionsPayment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const AuctionsPayment = () => {

const maxBid = (): string => {
const sellAmountBN = sellAmount
? BigNumber.from(toFixedString(sellAmount, 'RAD'))
? BigNumber.from(toFixedString(sellAmount, 'WAD'))
: BigNumber.from('0')
const buyAmountBN = buyAmount
? auctionType === 'STAKED_TOKEN'
Expand All @@ -111,7 +111,9 @@ const AuctionsPayment = () => {
if (isOngoingAuction) {
// We need to bid 3% less than the current best bid
return gebUtils
.wadToFixed(sellAmountBN.div(bidIncreaseBN))
.wadToFixed(
sellAmountBN.div(bidIncreaseBN).mul(gebUtils.WAD)
)
.toString()
} else {
// Auction restart (no bids and passed the dealine)
Expand All @@ -122,13 +124,17 @@ const AuctionsPayment = () => {
)
)
return gebUtils
.wadToFixed(numerator.div(bidIncreaseBN))
.wadToFixed(
numerator.div(bidIncreaseBN).mul(gebUtils.WAD)
)
.toString()
}
} else {
// We need to bid 3% less than the current best bid
return gebUtils
.wadToFixed(sellAmountBN.div(bidIncreaseBN))
.wadToFixed(
sellAmountBN.div(bidIncreaseBN).mul(gebUtils.WAD)
)
.toString()
}
}
Expand Down
1 change: 0 additions & 1 deletion src/components/ConnectedWalletIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ interface Props {

const ConnectedWalletIcon = ({ size }: Props) => {
const { connector } = useWeb3React()
console.log(connector)

function getStatusIcon() {
if (connector === injected) {
Expand Down

0 comments on commit f4d54cf

Please sign in to comment.