Commit 9016a99b authored by brent's avatar brent

modify balance

parent 484da319
......@@ -64,6 +64,7 @@ const balance = async () => {
balanceValue.value = temp / 1000000000000000000n
}
console.log("Header balanceValue.value ", balanceValue.value)
localStorage.setItem("aon_balance",balanceValue.value)
} catch (error) {
console.log(error, "balance error")
}
......@@ -82,8 +83,10 @@ const checkIfUserPage = () => {
onMounted(() => {
checkIfUserPage();
let balance = localStorage.getItem("aon_balance")
balanceValue.value = balance
balance()
// balance()
});
</script>
......
......@@ -245,7 +245,7 @@ async function login() {
})
return
}
// bus.emit('get_balance',"login");
bus.emit('get_balance',"login");
console.log('index islogin sssss',temp)
}
......
......@@ -88,7 +88,7 @@ async function getAccount() {
let get_account = await ethereum.request({ method: 'eth_requestAccounts' })
get_account = get_account[0]
account.value = get_account
// bus.emit('get_balance', "login");
bus.emit('get_balance', "login");
}
} catch (error) {
console.log(error, "getAccount error")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment