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"
|
||||
:supply-reward-rate="item.supplyRewardRate"
|
||||
:borrow-reward-rate="item.borrowRewardRate"
|
||||
reward-token-name="MATIC"
|
||||
reward-currency="matic"
|
||||
:reward-token-name="rewardTokenName"
|
||||
:reward-currency="rewardCurrency"
|
||||
:cf="item.cf"
|
||||
:ll="item.ll"
|
||||
:borrow-enabled="item.borrowEnabled"
|
||||
|
@ -192,15 +192,17 @@ import { useBigNumber } from "~/composables/useBigNumber";
|
|||
import CardAave from "~/components/protocols/CardAave.vue";
|
||||
import AaveIcon from "~/assets/icons/aave.svg?inline";
|
||||
import ButtonCTAOutlined from "~/components/common/input/ButtonCTAOutlined.vue";
|
||||
import { Network, useNetwork } from "~/composables/useNetwork";
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
BackIcon,
|
||||
CardAave,
|
||||
AaveIcon,
|
||||
ButtonCTAOutlined,
|
||||
ButtonCTAOutlined
|
||||
},
|
||||
setup() {
|
||||
const { activeNetworkId } = useNetwork();
|
||||
const {
|
||||
position,
|
||||
displayPositions,
|
||||
|
@ -208,7 +210,7 @@ export default defineComponent({
|
|||
totalBorrow,
|
||||
status,
|
||||
liquidation,
|
||||
maxLiquidation,
|
||||
maxLiquidation
|
||||
} = useAaveV2Position();
|
||||
|
||||
const { div } = useBigNumber();
|
||||
|
@ -227,6 +229,30 @@ export default defineComponent({
|
|||
"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 {
|
||||
position,
|
||||
filteredPositions,
|
||||
|
@ -239,6 +265,8 @@ export default defineComponent({
|
|||
color,
|
||||
text,
|
||||
maxLiquidation,
|
||||
rewardTokenName,
|
||||
rewardCurrency
|
||||
};
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user