Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not enough balance #33

Closed
FedericoGentile opened this issue Dec 30, 2020 · 2 comments
Closed

Not enough balance #33

FedericoGentile opened this issue Dec 30, 2020 · 2 comments

Comments

@FedericoGentile
Copy link

After downloading the repository and running it I get the following error:

throw new Error('Not enough balance');

which comes from the following method:

 // Making sure that the amount sent is not greater than existing balance
 if (this.getBalanceOfAddress(transaction.fromAddress) < transaction.amount) {
    throw new Error('Not enough balance');
 }

The only way I was able to make the code work is by removing such method. Is there any solution to make it function correctly please?

@Savjee
Copy link
Owner

Savjee commented Dec 31, 2020

Yes, mine a block first. This will give you a mining reward (50), which you can then spend ;)

Closed for now. But feel free to comment.

@Savjee Savjee closed this as completed Dec 31, 2020
@FedericoGentile
Copy link
Author

Thanks for the reply :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants