Commit 9016a99b authored by brent's avatar brent

modify balance

parent 484da319
...@@ -64,6 +64,7 @@ const balance = async () => { ...@@ -64,6 +64,7 @@ const balance = async () => {
balanceValue.value = temp / 1000000000000000000n balanceValue.value = temp / 1000000000000000000n
} }
console.log("Header balanceValue.value ", balanceValue.value) console.log("Header balanceValue.value ", balanceValue.value)
localStorage.setItem("aon_balance",balanceValue.value)
} catch (error) { } catch (error) {
console.log(error, "balance error") console.log(error, "balance error")
} }
...@@ -82,8 +83,10 @@ const checkIfUserPage = () => { ...@@ -82,8 +83,10 @@ const checkIfUserPage = () => {
onMounted(() => { onMounted(() => {
checkIfUserPage(); checkIfUserPage();
let balance = localStorage.getItem("aon_balance")
balanceValue.value = balance
balance() // balance()
}); });
</script> </script>
......
...@@ -245,7 +245,7 @@ async function login() { ...@@ -245,7 +245,7 @@ async function login() {
}) })
return return
} }
// bus.emit('get_balance',"login"); bus.emit('get_balance',"login");
console.log('index islogin sssss',temp) console.log('index islogin sssss',temp)
} }
......
...@@ -88,7 +88,7 @@ async function getAccount() { ...@@ -88,7 +88,7 @@ async function getAccount() {
let get_account = await ethereum.request({ method: 'eth_requestAccounts' }) let get_account = await ethereum.request({ method: 'eth_requestAccounts' })
get_account = get_account[0] get_account = get_account[0]
account.value = get_account account.value = get_account
// bus.emit('get_balance', "login"); bus.emit('get_balance', "login");
} }
} catch (error) { } catch (error) {
console.log(error, "getAccount 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