mirror of
https://github.com/Instadapp/assembly.git
synced 2024-07-29 22:37:06 +00:00
fixes
This commit is contained in:
parent
0c374ee4cb
commit
c6c82ec0dc
|
@ -1,5 +1,5 @@
|
|||
<svg viewBox="0 0 600 600" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0)">
|
||||
<g clip-path="url(#clip0123)">
|
||||
<path d="M28.6212 428.148L21.8137 413.517C19.2469 406.633 16.6833 399.75 14.1227 392.866C11.8043 383.976 9.48508 375.088 7.16513 366.201C5.90907 358.137 3.15326 350.343 2.84393 342.108C2.01281 336.083 1.18402 330.057 0.357582 324.03C0.340397 321.163 0.322479 318.297 0.303732 315.431C0.512293 302.816 -0.507069 290.196 0.345925 277.581C1.81054 273.096 1.30196 268.373 2.0331 263.792C2.99857 257.79 3.77195 251.758 4.62729 245.733C7.15815 234.819 9.10083 223.769 12.3863 213.036L21.0006 188.098C24.2813 182.272 26.4771 175.952 29.2844 169.915C31.5599 165.017 34.0766 160.232 36.4903 155.385C42.1145 146.381 47.6144 137.284 53.4542 128.416C56.7813 122.993 60.6083 117.893 64.8852 113.183C72.3723 104.364 80.3516 95.9933 88.1809 87.5027C97.5193 77.3787 108.411 69.1249 118.614 60.0461C121.206 58.0608 123.949 56.2799 126.816 54.7192C141.424 44.4141 156.955 35.4831 173.208 28.0406C173.563 27.806 173.88 27.5174 174.146 27.1852C195.727 17.2495 218.449 10.0083 241.799 5.62482C245.993 5.22173 250.131 4.37247 254.144 3.09147C260.237 3.19224 266.096 0.958864 272.221 1.34789C273.52 0.372984 275.24 1.55412 276.529 0.520624L284.262 0.497193C294.858 -0.165731 305.486 -0.165731 316.083 0.497193C325.018 0.807342 333.926 1.66826 342.755 3.07506L367.696 7.43167L400.384 16.9112L430.503 29.7584C441.241 34.7618 451.125 41.3119 461.464 47.0114L485.561 64.2011L502.759 78.8528C509.357 86.0396 516.236 92.9335 523.398 99.5344C527.641 105.27 532.233 110.739 537.149 115.911C539.82 120.513 542.974 124.818 546.557 128.753C549.887 134.772 553.636 140.549 557.775 146.042C560.149 151.429 563.013 156.587 566.331 161.45L574.926 179.509L584.483 204.494L592.242 231.997C593.71 240.023 595.177 248.049 596.643 256.075C598.414 268.839 599.334 281.706 599.396 294.593C599.396 294.956 599.785 295.321 599.991 295.687C600.123 302.856 598.719 309.983 599.288 317.151C599.19 322.04 597.882 326.849 598.309 331.773L594.962 354.139L589.662 378.226L583.754 397.162C580.786 404.886 577.817 412.608 574.849 420.33L559.526 450.498L546.452 471.093C534.32 487.64 520.905 503.207 506.331 517.649C496.599 526.292 486.796 534.827 476.26 542.49C453.347 559.217 428.161 572.583 401.466 582.182C400.803 582.436 400.168 582.778 399.524 583.078C384.306 588.103 368.79 592.173 353.066 595.264C341.626 597.008 330.185 598.599 318.651 599.482C306.318 599.208 293.991 600.774 281.654 599.482L260.19 597.608L239.505 594.106L221.492 589.855L199.183 582.937L177.574 574.243L160.287 565.806C154.093 562.277 147.893 558.764 141.732 555.202C139.89 554.145 138.111 552.971 136.3 551.85L111.46 533.871L92.3263 516.763L74.2307 497.842L58.7174 478.899L46.7896 461.676C43.9046 456.352 40.7413 451.184 37.3129 446.193C35.3351 439.76 30.6764 434.583 28.6212 428.148Z" fill="url(#paint0_radial)"/>
|
||||
<path d="M230.095 371.643C227.687 373.331 224.841 374.286 221.902 374.392C218.963 374.499 216.056 373.753 213.531 372.243C209.692 359.623 206.833 346.748 203.355 334.039C194.537 301.73 186.052 269.331 177.373 236.984C176.773 235.249 176.612 233.394 176.904 231.582C177.001 230.534 177.768 229.998 178.516 229.421C186.743 225.418 195.902 224.791 204.532 222.272C206.291 221.762 208.082 221.371 209.893 221.101C211.618 222.021 213.017 223.45 213.902 225.193C214.786 226.936 215.113 228.91 214.836 230.845C217.598 225.636 218.118 218.89 225.305 217.389C227.518 217.106 229.711 216.687 231.873 216.135C232.521 216.089 233.166 216.26 233.705 216.621C234.725 217.675 235.369 219.035 235.538 220.491C243.039 252.393 250.618 284.278 258.274 316.146C258.578 317.159 258.755 318.205 258.802 319.262C258.423 323.523 255.673 326.725 253.737 330.26C246.924 342.716 240.205 355.224 233.17 367.559C232.329 369.05 231.295 370.423 230.095 371.643Z" fill="#1FC8A7"/>
|
||||
<path d="M423.55 368.329C422.922 369.682 421.856 370.785 420.525 371.46C414.229 374.394 407.356 375.264 400.701 376.837C373.196 383.33 345.71 389.914 318.194 396.361C304.692 399.522 291.225 402.817 277.701 405.89C276.328 406.383 274.84 406.458 273.425 406.106C271.48 404.688 272.874 403.275 273.537 401.981C278.708 391.882 284.412 382.071 289.881 372.134C299.474 354.684 308.974 337.178 318.713 319.817C320.53 316.576 321.439 312.594 325.16 310.652C328.868 311.581 332.384 313.155 335.546 315.304C352.778 324.711 370.041 334.056 387.264 343.488C398.698 349.753 410.349 355.622 421.48 362.428C422.446 364.287 423.143 366.274 423.55 368.329Z" fill="#1FC8A7"/>
|
||||
|
@ -28,7 +28,7 @@
|
|||
<stop stop-color="#3F5D65"/>
|
||||
<stop offset="1" stop-color="#192123"/>
|
||||
</radialGradient>
|
||||
<clipPath id="clip0">
|
||||
<clipPath id="clip0123">
|
||||
<rect width="600" height="600" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
|
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
@ -1,5 +1,5 @@
|
|||
<svg viewBox="0 0 600 600" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0)">
|
||||
<g clip-path="url(#clip0123)">
|
||||
<path d="M28.6212 428.148L21.8137 413.517C19.2469 406.633 16.6833 399.75 14.1227 392.866C11.8043 383.976 9.48508 375.088 7.16513 366.201C5.90907 358.137 3.15326 350.343 2.84393 342.108C2.01281 336.083 1.18402 330.057 0.357582 324.03C0.340397 321.163 0.322479 318.297 0.303732 315.431C0.512293 302.816 -0.507069 290.196 0.345925 277.581C1.81054 273.096 1.30196 268.373 2.0331 263.792C2.99857 257.79 3.77195 251.758 4.62729 245.733C7.15815 234.819 9.10083 223.769 12.3863 213.036L21.0006 188.098C24.2813 182.272 26.4771 175.952 29.2844 169.915C31.5599 165.017 34.0766 160.232 36.4903 155.385C42.1145 146.381 47.6144 137.284 53.4542 128.416C56.7813 122.993 60.6083 117.893 64.8852 113.183C72.3723 104.364 80.3516 95.9933 88.1809 87.5027C97.5193 77.3787 108.411 69.1249 118.614 60.0461C121.206 58.0608 123.949 56.2799 126.816 54.7192C141.424 44.4141 156.955 35.4831 173.208 28.0406C173.563 27.806 173.88 27.5174 174.146 27.1852C195.727 17.2495 218.449 10.0083 241.799 5.62482C245.993 5.22173 250.131 4.37247 254.144 3.09147C260.237 3.19224 266.096 0.958864 272.221 1.34789C273.52 0.372984 275.24 1.55412 276.529 0.520624L284.262 0.497193C294.858 -0.165731 305.486 -0.165731 316.083 0.497193C325.018 0.807342 333.926 1.66826 342.755 3.07506L367.696 7.43167L400.384 16.9112L430.503 29.7584C441.241 34.7618 451.125 41.3119 461.464 47.0114L485.561 64.2011L502.759 78.8528C509.357 86.0396 516.236 92.9335 523.398 99.5344C527.641 105.27 532.233 110.739 537.149 115.911C539.82 120.513 542.974 124.818 546.557 128.753C549.887 134.772 553.636 140.549 557.775 146.042C560.149 151.429 563.013 156.587 566.331 161.45L574.926 179.509L584.483 204.494L592.242 231.997C593.71 240.023 595.177 248.049 596.643 256.075C598.414 268.839 599.334 281.706 599.396 294.593C599.396 294.956 599.785 295.321 599.991 295.687C600.123 302.856 598.719 309.983 599.288 317.151C599.19 322.04 597.882 326.849 598.309 331.773L594.962 354.139L589.662 378.226L583.754 397.162C580.786 404.886 577.817 412.608 574.849 420.33L559.526 450.498L546.452 471.093C534.32 487.64 520.905 503.207 506.331 517.649C496.599 526.292 486.796 534.827 476.26 542.49C453.347 559.217 428.161 572.583 401.466 582.182C400.803 582.436 400.168 582.778 399.524 583.078C384.306 588.103 368.79 592.173 353.066 595.264C341.626 597.008 330.185 598.599 318.651 599.482C306.318 599.208 293.991 600.774 281.654 599.482L260.19 597.608L239.505 594.106L221.492 589.855L199.183 582.937L177.574 574.243L160.287 565.806C154.093 562.277 147.893 558.764 141.732 555.202C139.89 554.145 138.111 552.971 136.3 551.85L111.46 533.871L92.3263 516.763L74.2307 497.842L58.7174 478.899L46.7896 461.676C43.9046 456.352 40.7413 451.184 37.3129 446.193C35.3351 439.76 30.6764 434.583 28.6212 428.148Z" fill="url(#paint0_radial)"/>
|
||||
<path d="M230.095 371.643C227.687 373.331 224.841 374.286 221.902 374.392C218.963 374.499 216.056 373.753 213.531 372.243C209.692 359.623 206.833 346.748 203.355 334.039C194.537 301.73 186.052 269.331 177.373 236.984C176.773 235.249 176.612 233.394 176.904 231.582C177.001 230.534 177.768 229.998 178.516 229.421C186.743 225.418 195.902 224.791 204.532 222.272C206.291 221.762 208.082 221.371 209.893 221.101C211.618 222.021 213.017 223.45 213.902 225.193C214.786 226.936 215.113 228.91 214.836 230.845C217.598 225.636 218.118 218.89 225.305 217.389C227.518 217.106 229.711 216.687 231.873 216.135C232.521 216.089 233.166 216.26 233.705 216.621C234.725 217.675 235.369 219.035 235.538 220.491C243.039 252.393 250.618 284.278 258.274 316.146C258.578 317.159 258.755 318.205 258.802 319.262C258.423 323.523 255.673 326.725 253.737 330.26C246.924 342.716 240.205 355.224 233.17 367.559C232.329 369.05 231.295 370.423 230.095 371.643Z" fill="#1FC8A7"/>
|
||||
<path d="M423.55 368.329C422.922 369.682 421.856 370.785 420.525 371.46C414.229 374.394 407.356 375.264 400.701 376.837C373.196 383.33 345.71 389.914 318.194 396.361C304.692 399.522 291.225 402.817 277.701 405.89C276.328 406.383 274.84 406.458 273.425 406.106C271.48 404.688 272.874 403.275 273.537 401.981C278.708 391.882 284.412 382.071 289.881 372.134C299.474 354.684 308.974 337.178 318.713 319.817C320.53 316.576 321.439 312.594 325.16 310.652C328.868 311.581 332.384 313.155 335.546 315.304C352.778 324.711 370.041 334.056 387.264 343.488C398.698 349.753 410.349 355.622 421.48 362.428C422.446 364.287 423.143 366.274 423.55 368.329Z" fill="#1FC8A7"/>
|
||||
|
@ -28,7 +28,7 @@
|
|||
<stop stop-color="#3F5D65"/>
|
||||
<stop offset="1" stop-color="#192123"/>
|
||||
</radialGradient>
|
||||
<clipPath id="clip0">
|
||||
<clipPath id="clip0123">
|
||||
<rect width="600" height="600" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
|
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
@ -4,7 +4,7 @@
|
|||
|
||||
<SidebarSectionValueWithIcon class="mt-6" label="Borrowed" center>
|
||||
<template #icon
|
||||
><IconCurrency :currency="daiTokenKey" class="w-20 h-20" noHeight
|
||||
><IconCurrency :currency="raiTokenKey" class="w-20 h-20" noHeight
|
||||
/></template>
|
||||
<template #value>{{ formatNumber(debt) }} {{ symbol }}</template>
|
||||
</SidebarSectionValueWithIcon>
|
||||
|
@ -109,10 +109,10 @@ export default defineComponent({
|
|||
const changedDebt = computed(() => plus(debt.value, amountParsed.value).toFixed())
|
||||
const { liquidationPrice, status } = useReflexerPosition(collateral, changedDebt)
|
||||
|
||||
const daiTokenKey = ref('dai')
|
||||
const daiToken = computed(() => getTokenByKey(daiTokenKey.value))
|
||||
const symbol = computed(() => daiToken.value?.symbol)
|
||||
const decimals = computed(() => daiToken.value?.decimals)
|
||||
const raiTokenKey = ref('rai')
|
||||
const raiToken = computed(() => getTokenByKey(raiTokenKey.value))
|
||||
const symbol = computed(() => raiToken.value?.symbol)
|
||||
const decimals = computed(() => raiToken.value?.decimals)
|
||||
|
||||
const {
|
||||
validateAmount,
|
||||
|
@ -173,7 +173,7 @@ export default defineComponent({
|
|||
}
|
||||
|
||||
return {
|
||||
daiTokenKey,
|
||||
raiTokenKey,
|
||||
symbol,
|
||||
debt,
|
||||
amount,
|
||||
|
|
|
@ -54,11 +54,11 @@ export default defineComponent({
|
|||
const { store, app, route } = useContext()
|
||||
const { formatPercent } = useFormatting()
|
||||
const { back } = useSidebar()
|
||||
const { safeTypes: makerSafeTypes, safeType, isNewSafe } = useReflexerPosition()
|
||||
const { safeTypes: reflexerSafeTypes, safeType, isNewSafe } = useReflexerPosition()
|
||||
|
||||
const safeTypes = computed(() => {
|
||||
const shouldFilter = !!props.safeType && (props.safeType === 'token' || props.safeType === 'uniLPT')
|
||||
const filtered = makerSafeTypes.value.filter((safe) => !safe.disabled)
|
||||
const filtered = reflexerSafeTypes.value.filter((safe) => !safe.disabled)
|
||||
const final = shouldFilter ? filtered.filter((safe) => safe.safeTokenType === props.safeType) : filtered
|
||||
if (route.value.hash.startsWith('#collateral')) return final
|
||||
return filtered.filter((safe) => safe.safeTokenType === 'token')
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
<div class="mt-6 flex justify-around items-center w-full">
|
||||
<SidebarSectionValueWithIcon class="" label="Borrowed" center>
|
||||
<template #icon
|
||||
><IconCurrency :currency="daiTokenKey" class="w-20 h-20" noHeight
|
||||
><IconCurrency :currency="raiTokenKey" class="w-20 h-20" noHeight
|
||||
/></template>
|
||||
<template #value>{{ formatNumber(debt) }} {{ symbol }}</template>
|
||||
</SidebarSectionValueWithIcon>
|
||||
|
||||
<SidebarSectionValueWithIcon class="" label="Token Balance" center>
|
||||
<template #icon
|
||||
><IconCurrency :currency="daiTokenKey" class="w-20 h-20" noHeight
|
||||
><IconCurrency :currency="raiTokenKey" class="w-20 h-20" noHeight
|
||||
/></template>
|
||||
|
||||
<template #value>{{ formatNumber(balance) }} {{ symbol }}</template>
|
||||
|
@ -121,7 +121,7 @@ export default defineComponent({
|
|||
const amount = ref('')
|
||||
const amountParsed = computed(() => parseSafeFloat(amount.value))
|
||||
|
||||
const daiTokenKey = ref('dai')
|
||||
const raiTokenKey = ref('rai')
|
||||
const tokenKey = computed(() => props.tokenKey)
|
||||
const token = computed(() => getTokenByKey(tokenKey.value))
|
||||
const symbol = computed(() => token.value?.symbol)
|
||||
|
@ -136,7 +136,7 @@ export default defineComponent({
|
|||
const maxBalance = computed(() => min(balance.value, debt.value).toFixed())
|
||||
const { toggle, isMaxAmount } = useMaxAmountActive(amount, maxBalance)
|
||||
|
||||
const { validateAmount, validateLiquidation, validateIsLoggedIn, validateMakerDebt } = useValidators()
|
||||
const { validateAmount, validateLiquidation, validateIsLoggedIn, validateReflexerDebt } = useValidators()
|
||||
const errors = computed(() => {
|
||||
const hasAmountValue = !isZero(amount.value)
|
||||
|
||||
|
@ -145,7 +145,7 @@ export default defineComponent({
|
|||
amount: { message: validateAmount(amountParsed.value, maxBalance.value), show: hasAmountValue },
|
||||
liquidation: { message: validateLiquidation(status.value, liquidation.value), show: hasAmountValue },
|
||||
auth: { message: validateIsLoggedIn(!!account.value), show: true },
|
||||
minDebt: { message: validateMakerDebt(changedDebt.value), show: hasAmountValue },
|
||||
minDebt: { message: validateReflexerDebt(changedDebt.value), show: hasAmountValue },
|
||||
}
|
||||
})
|
||||
const { errorMessages, isValid } = useValidation(errors)
|
||||
|
@ -193,7 +193,7 @@ export default defineComponent({
|
|||
}
|
||||
|
||||
return {
|
||||
daiTokenKey,
|
||||
raiTokenKey,
|
||||
symbol,
|
||||
debt,
|
||||
balance,
|
||||
|
|
|
@ -137,7 +137,7 @@
|
|||
:amount="debt"
|
||||
:amount-usd="debt"
|
||||
position-type="borrow"
|
||||
token-key="dai"
|
||||
token-key="rai"
|
||||
:safe-token-type="safeTokenType"
|
||||
:supply-or-borrow="showBorrow"
|
||||
:withdraw-or-payback="showPayback"
|
||||
|
@ -239,7 +239,7 @@ export default defineComponent({
|
|||
if (isZero(collateral.value)) {
|
||||
showWarning("ReflexerDAO", "No collateral supplied!!");
|
||||
} else {
|
||||
router.push({ hash: "payback?tokenKey=dai" });
|
||||
router.push({ hash: "payback?tokenKey=rai" });
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -247,7 +247,7 @@ export default defineComponent({
|
|||
if (isZero(collateral.value)) {
|
||||
showWarning("ReflexerDAO", "Deposit collateral before borrowing!!");
|
||||
} else {
|
||||
router.push({ hash: "borrow?tokenKey=dai" });
|
||||
router.push({ hash: "borrow?tokenKey=rai" });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user