Skip to content

Commit

Permalink
Merge pull request #26 from dhedge/fix/deposit-quote
Browse files Browse the repository at this point in the history
Fix/deposit quote
  • Loading branch information
dimlbc authored Feb 24, 2024
2 parents 51b8bfc + cf78746 commit 7789065
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/core-ui-kit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dhedge/core-ui-kit",
"version": "2.0.7",
"version": "2.0.8",
"description": "Core UI Kit",
"type": "module",
"main": "dist/index.js",
Expand Down
1 change: 0 additions & 1 deletion packages/core-ui-kit/src/const/default-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ export const GAS_LIMIT_BUFFER_COEFF = 1.25

export const DEPOSIT_QUOTE_MULTIPLIER_DEFAULT = 0.9997
export const DEPOSIT_QUOTE_MULTIPLIER_CUSTOM = 0.999
export const DEPOSIT_QUOTE_POOL_LOGIC_MULTIPLIER = 0.999

export const MANAGER_FEE_DENOMINATOR = 10000 // GetMaximumFee

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ describe('useDepositQuote', () => {
)
expect(updateReceiveTokenMock).toHaveBeenCalledTimes(1)
expect(updateReceiveTokenMock).toHaveBeenNthCalledWith(1, {
value: '99.900',
value: '100.000',
})
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { DhedgeEasySwapperAbi } from 'abi'
import {
DEPOSIT_QUOTE_MULTIPLIER_CUSTOM,
DEPOSIT_QUOTE_MULTIPLIER_DEFAULT,
DEPOSIT_QUOTE_POOL_LOGIC_MULTIPLIER,
SHORTEN_POLLING_INTERVAL,
} from 'const'
import { usePoolTokenPrice } from 'hooks/pool'
Expand Down Expand Up @@ -135,7 +134,6 @@ export const useDepositQuote = ({
.shiftedBy(-sendToken.decimals)
.multipliedBy(sendTokenPrice)
.dividedBy(vaultTokenPrice)
.multipliedBy(DEPOSIT_QUOTE_POOL_LOGIC_MULTIPLIER)
.toFixed(receiveToken.decimals),
})
}, [
Expand Down

0 comments on commit 7789065

Please sign in to comment.