Merge pull request #22 from mars-protocol/v1.4.3

release v1.4.3
This commit is contained in:
Linkie Link 2023-04-13 11:01:35 +02:00 committed by GitHub
commit 7423fb2afc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 6 deletions

View File

@ -1,7 +1,7 @@
{ {
"name": "mars", "name": "mars",
"homepage": "./", "homepage": "./",
"version": "1.4.2", "version": "1.4.3",
"license": "SEE LICENSE IN LICENSE FILE", "license": "SEE LICENSE IN LICENSE FILE",
"private": false, "private": false,
"scripts": { "scripts": {
@ -26,7 +26,6 @@
"@material-ui/core": "^4.12.4", "@material-ui/core": "^4.12.4",
"@material-ui/icons": "^4.11.3", "@material-ui/icons": "^4.11.3",
"@ramonak/react-progress-bar": "^5.0.3", "@ramonak/react-progress-bar": "^5.0.3",
"@sentry/nextjs": "^7.36.0",
"@tanstack/react-query": "^4.24.4", "@tanstack/react-query": "^4.24.4",
"@tanstack/react-table": "^8.7.9", "@tanstack/react-table": "^8.7.9",
"@testing-library/dom": "^8.20.0", "@testing-library/dom": "^8.20.0",

View File

@ -157,7 +157,7 @@ export const useAvailableVaultsColumns = () => {
<> <>
<DisplayCurrency <DisplayCurrency
coin={{ coin={{
denom: 'uosmo', denom: baseCurrency.denom,
amount: '0', amount: '0',
}} }}
/> />

View File

@ -44,6 +44,7 @@ export const BreakdownTable = (props: Props) => {
const secondaryAsset = useAsset({ denom: props.vault.denoms.secondary }) const secondaryAsset = useAsset({ denom: props.vault.denoms.secondary })
const convertToDisplayCurrency = useStore((s) => s.convertToDisplayCurrency) const convertToDisplayCurrency = useStore((s) => s.convertToDisplayCurrency)
const convertToBaseCurrency = useStore((s) => s.convertToBaseCurrency) const convertToBaseCurrency = useStore((s) => s.convertToBaseCurrency)
const baseCurrency = useStore((s) => s.baseCurrency)
const primaryPrice = usePrice(props.vault.denoms.primary) const primaryPrice = usePrice(props.vault.denoms.primary)
const secondaryPrice = usePrice(props.vault.denoms.secondary) const secondaryPrice = usePrice(props.vault.denoms.secondary)
@ -137,7 +138,7 @@ export const BreakdownTable = (props: Props) => {
isApproximation isApproximation
coin={{ coin={{
amount: props.newPosition.values[type].toString(), amount: props.newPosition.values[type].toString(),
denom: props.vault.denoms.primary, denom: baseCurrency.denom,
}} }}
/> />
) )
@ -195,7 +196,7 @@ export const BreakdownTable = (props: Props) => {
const leftoverCap = vaultCapValue - vaultCapUsedValue const leftoverCap = vaultCapValue - vaultCapUsedValue
const maxPositionValue = convertToDisplayCurrency({ const maxPositionValue = convertToDisplayCurrency({
amount: ((props.isSetUp ? 0 : props.prevPosition.values.total) + leftoverCap).toString(), amount: ((props.isSetUp ? 0 : props.prevPosition.values.total) + leftoverCap).toString(),
denom: 'uosmo', denom: baseCurrency.denom,
}) })
if (maxPositionValue <= 0) { if (maxPositionValue <= 0) {
@ -257,7 +258,9 @@ export const BreakdownTable = (props: Props) => {
)} )}
</div> </div>
<div className={styles.price}> <div className={styles.price}>
<span className='faded'>{formatValue(1, 0, 0, false, false, ' OSMO ≈ ')}</span> <span className='faded'>
{formatValue(1, 0, 0, false, false, ` ${primaryAsset?.symbol}`)}
</span>
<AnimatedNumber <AnimatedNumber
amount={primaryPrice / secondaryPrice} amount={primaryPrice / secondaryPrice}