Skip to content
This repository has been archived by the owner on Dec 31, 2024. It is now read-only.

fix ETH/USD conversion in SchellingDollar example #92

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/schellingdollar.se
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ code:
if msg.data[1] >= 0 and msg.data[1] < ethbal:
usdplus = msg.data[1] / usdval * 999 / 1000
ethminus = msg.data[1]
if (usdbal + usdplus) * 10 + (ethbal - ethminus) * usdval * 9 >= 0:
if (usdbal + usdplus) * usdval * 10 + (ethbal - ethminus) * 9 >= 0:
contract.storage[my_acct] = ethbal - ethminus
contract.storage[my_acct + 1] = usdbal + usdplus
contract.storage[ETH_EXPOSURE] -= ethminus
Expand Down