mirror of
https://github.com/Instadapp/assembly.git
synced 2024-07-29 22:37:06 +00:00
Fix Aave v2 Reward Token
This commit is contained in:
parent
a2b22db828
commit
df850e352d
|
@ -168,8 +168,8 @@
|
||||||
:type="item.type"
|
:type="item.type"
|
||||||
:supply-reward-rate="item.supplyRewardRate"
|
:supply-reward-rate="item.supplyRewardRate"
|
||||||
:borrow-reward-rate="item.borrowRewardRate"
|
:borrow-reward-rate="item.borrowRewardRate"
|
||||||
reward-token-name="MATIC"
|
:reward-token-name="rewardTokenName"
|
||||||
reward-currency="matic"
|
:reward-currency="rewardCurrency"
|
||||||
:cf="item.cf"
|
:cf="item.cf"
|
||||||
:ll="item.ll"
|
:ll="item.ll"
|
||||||
:borrow-enabled="item.borrowEnabled"
|
:borrow-enabled="item.borrowEnabled"
|
||||||
|
@ -192,15 +192,17 @@ import { useBigNumber } from "~/composables/useBigNumber";
|
||||||
import CardAave from "~/components/protocols/CardAave.vue";
|
import CardAave from "~/components/protocols/CardAave.vue";
|
||||||
import AaveIcon from "~/assets/icons/aave.svg?inline";
|
import AaveIcon from "~/assets/icons/aave.svg?inline";
|
||||||
import ButtonCTAOutlined from "~/components/common/input/ButtonCTAOutlined.vue";
|
import ButtonCTAOutlined from "~/components/common/input/ButtonCTAOutlined.vue";
|
||||||
|
import { Network, useNetwork } from "~/composables/useNetwork";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
BackIcon,
|
BackIcon,
|
||||||
CardAave,
|
CardAave,
|
||||||
AaveIcon,
|
AaveIcon,
|
||||||
ButtonCTAOutlined,
|
ButtonCTAOutlined
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
|
const { activeNetworkId } = useNetwork();
|
||||||
const {
|
const {
|
||||||
position,
|
position,
|
||||||
displayPositions,
|
displayPositions,
|
||||||
|
@ -208,7 +210,7 @@ export default defineComponent({
|
||||||
totalBorrow,
|
totalBorrow,
|
||||||
status,
|
status,
|
||||||
liquidation,
|
liquidation,
|
||||||
maxLiquidation,
|
maxLiquidation
|
||||||
} = useAaveV2Position();
|
} = useAaveV2Position();
|
||||||
|
|
||||||
const { div } = useBigNumber();
|
const { div } = useBigNumber();
|
||||||
|
@ -227,6 +229,30 @@ export default defineComponent({
|
||||||
"type"
|
"type"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const rewardTokenName = computed(() => {
|
||||||
|
if (activeNetworkId.value === Network.Avalanche) {
|
||||||
|
return "AVAX";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (activeNetworkId.value === Network.Mainnet) {
|
||||||
|
return "stkAAVE";
|
||||||
|
}
|
||||||
|
|
||||||
|
return "MATIC";
|
||||||
|
});
|
||||||
|
|
||||||
|
const rewardCurrency = computed(() => {
|
||||||
|
if (activeNetworkId.value === Network.Avalanche) {
|
||||||
|
return "avax";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (activeNetworkId.value === Network.Mainnet) {
|
||||||
|
return "stkaave";
|
||||||
|
}
|
||||||
|
|
||||||
|
return "matic";
|
||||||
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
position,
|
position,
|
||||||
filteredPositions,
|
filteredPositions,
|
||||||
|
@ -239,6 +265,8 @@ export default defineComponent({
|
||||||
color,
|
color,
|
||||||
text,
|
text,
|
||||||
maxLiquidation,
|
maxLiquidation,
|
||||||
|
rewardTokenName,
|
||||||
|
rewardCurrency
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user