Skip to content

dividing by a decimal #285

Description

@JeffWScott

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions