You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello @hunterlong good evening
i have a question and issue, i need your support please.
1- I forked your repo and tried to make wallet for different erc20 token. So I changed the contract address at https://github.com/hunterlong/storj-wallet/blob/master/js/main.js#L22. Only changing the contract address is enough for backend part? Do i need to do extra thing except for fronted parts?
2- I changed the contract address, and compiled the app. I didnot tested the functionality but after started the app (windows) the balance of erc20 token changes suddenly from 0.0000 to 0,0000.undefined. How can fix this?
3- not big deal but close button not works. i changed as
function QuitAppButton()
{
window.close()
}
it works now
Thank you foryour help,
Best regards
The text was updated successfully, but these errors were encountered:
function updateBalance() {
var address = myWallet.address;
$(".myaddress").html(address);
provider.getBalance(address).then(function(balance) {
var etherString = ethers.utils.formatEther(balance);
console.log("ETH Balance: " + etherString);
// provider.getBalance(address).then((balance) => {
// // balance is a BigNumber (in wei); format is as a sting (in ether)
// let etherString = ethers.utils.formatEther(balance);
// console.log("Balance: " + etherString);
// });
var n = parseFloat(etherString);
var ethValue = n.toLocaleString(
undefined, // use a string like 'en-US' to override browser locale
{
minimumFractionDigits: 4
}
);
var messageEl = $('#ethbal');
// var split = ethValue.split(".");
// ethBalance = parseFloat(ethValue);
//console.log();
var getNumber = ethValue.replace(',', '.');
messageEl.html(getNumber);
});
var callPromise = tokenContract.functions.balanceOf(address);
getNumber = null;
callPromise.then(function(result) {
var trueBal = result[0].toString(10);
var messageEl = $('#storjbal');
var n = trueBal * 0.00000001;
console.log("WILC Balance: " + n);
var atyxValue = n.toLocaleString(
undefined, // use a string like 'en-US' to override browser locale
{
minimumFractionDigits: 4
}
);
var getNumber = atyxValue.replace(',', '.');
// var split = atyxValue.split(".");
// tokenBalance = parseFloat(atyxValue);
// $(".storjspend").html(atyxValue)
// messageEl.html(split[0] + ".<small>" + split[1] + "</small>");
messageEl.html(getNumber);
});
Hello @hunterlong good evening
i have a question and issue, i need your support please.
1- I forked your repo and tried to make wallet for different erc20 token. So I changed the contract address at https://github.com/hunterlong/storj-wallet/blob/master/js/main.js#L22. Only changing the contract address is enough for backend part? Do i need to do extra thing except for fronted parts?
2- I changed the contract address, and compiled the app. I didnot tested the functionality but after started the app (windows) the balance of erc20 token changes suddenly from 0.0000 to 0,0000.undefined. How can fix this?
3- not big deal but close button not works. i changed as
function QuitAppButton()
{
window.close()
}
it works now
Thank you foryour help,
Best regards
The text was updated successfully, but these errors were encountered: