Update index.html
This commit is contained in:
parent
4c88b46f89
commit
c5e6c182a0
@ -132,9 +132,13 @@
|
|||||||
</sm-form>
|
</sm-form>
|
||||||
<div id="eth_balance_wrapper" class="grid gap-2 hidden">
|
<div id="eth_balance_wrapper" class="grid gap-2 hidden">
|
||||||
<div class="grid">
|
<div class="grid">
|
||||||
<div class="label">Eth address</div>
|
<div class="label">ETH address</div>
|
||||||
<sm-copy id="eth_address"></sm-copy>
|
<sm-copy id="eth_address"></sm-copy>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="grid">
|
||||||
|
<div class="label">FLO address</div>
|
||||||
|
<sm-copy id="flo_address"></sm-copy>
|
||||||
|
</div>
|
||||||
<div class="grid gap-1">
|
<div class="grid gap-1">
|
||||||
<h4>Balance</h4>
|
<h4>Balance</h4>
|
||||||
<ul id="eth_address_balance" class="flex flex-direction-column gap-0-5">
|
<ul id="eth_address_balance" class="flex flex-direction-column gap-0-5">
|
||||||
@ -334,10 +338,12 @@
|
|||||||
}
|
}
|
||||||
const ethPrivateKey = coinjs.wif2privkey(keyToConvert).privkey;
|
const ethPrivateKey = coinjs.wif2privkey(keyToConvert).privkey;
|
||||||
const ethAddress = floEthereum.ethAddressFromPrivateKey(ethPrivateKey)
|
const ethAddress = floEthereum.ethAddressFromPrivateKey(ethPrivateKey)
|
||||||
|
const floAddress = floCrypto.getFloID(keyToConvert)
|
||||||
if (!ethAddress) return
|
if (!ethAddress) return
|
||||||
buttonLoader('check_balance_button', true)
|
buttonLoader('check_balance_button', true)
|
||||||
Promise.all([checkUSDCBalance(ethAddress), checkUSDTBalance(ethAddress)]).then(([usdcBalance, usdtBalance]) => {
|
Promise.all([checkUSDCBalance(ethAddress), checkUSDTBalance(ethAddress)]).then(([usdcBalance, usdtBalance]) => {
|
||||||
getRef('eth_address').value = ethAddress
|
getRef('eth_address').value = ethAddress
|
||||||
|
getRef('flo_address').value = floAddress
|
||||||
getRef('usdc_balance').textContent = `${ethers.utils.formatUnits(usdcBalance, 6)} USDC`
|
getRef('usdc_balance').textContent = `${ethers.utils.formatUnits(usdcBalance, 6)} USDC`
|
||||||
getRef('usdt_balance').textContent = `${ethers.utils.formatUnits(usdtBalance, 6)} USDT`
|
getRef('usdt_balance').textContent = `${ethers.utils.formatUnits(usdtBalance, 6)} USDT`
|
||||||
getRef('eth_balance_wrapper').classList.remove('hidden')
|
getRef('eth_balance_wrapper').classList.remove('hidden')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user