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

dividing by a decimal #285

Open
JeffWScott opened this issue Sep 22, 2020 · 0 comments
Open

dividing by a decimal #285

JeffWScott opened this issue Sep 22, 2020 · 0 comments

Comments

@JeffWScott
Copy link
Contributor

Describe the bug
A clear and concise description of what the bug is.

math on a decimal object does not work.
Produces this error:
TypeError("unsupported operand type(s) for -=: 'float' and 'decimal.Decimal'",)

To Reproduce
In smart contract:

@construct
def seed():
    balances['fees'] = 0.03

@export
def something_else(amount: float):
    total_balance = total_balance - (amount * balances['fees'])

Expected behavior
Math

Screenshots
None

Additional context
error is produced here
https://testnet.lamden.io/transactions/6d3c9787b0283a91d4b3353a78b7e4100a5ba9095b882fb80ebf65dff26f6722

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

1 participant