mirror of
https://github.com/Instadapp/assembly.git
synced 2024-07-29 22:37:06 +00:00
wip
This commit is contained in:
parent
ac16d2c8b7
commit
52a085ae64
|
@ -101,11 +101,16 @@ export function useAaveV2Position(
|
|||
return newPos;
|
||||
};
|
||||
|
||||
const refreshPosition = async () => {
|
||||
position.value = await fetchPosition();
|
||||
};
|
||||
|
||||
|
||||
watch(
|
||||
web3,
|
||||
async val => {
|
||||
if (val) {
|
||||
position.value = await fetchPosition();
|
||||
refreshPosition();
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
|
@ -115,7 +120,7 @@ export function useAaveV2Position(
|
|||
activeAccount,
|
||||
async val => {
|
||||
if (val) {
|
||||
position.value = await fetchPosition();
|
||||
refreshPosition();
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
|
@ -325,6 +330,7 @@ export function useAaveV2Position(
|
|||
displayPositions,
|
||||
position,
|
||||
fetchPosition,
|
||||
refreshPosition,
|
||||
totalSupply,
|
||||
totalBorrow,
|
||||
status,
|
||||
|
|
|
@ -23,8 +23,6 @@ export function useBalances() {
|
|||
const { getTokenByKey } = useToken();
|
||||
|
||||
const fetchBalances = async (refresh = false) => {
|
||||
await nextTick();
|
||||
|
||||
if (!balances.user || refresh) {
|
||||
balances.user = {
|
||||
mainnet: await getBalances(account.value, Network.Mainnet, mainnetWeb3),
|
||||
|
|
Loading…
Reference in New Issue
Block a user