From 0bef6d31e76a827d348990c2277d129c86642821 Mon Sep 17 00:00:00 2001 From: Jan Xie Date: Sun, 17 Jan 2016 09:12:33 +0800 Subject: [PATCH] fix ETH/USD conversion in SchellingDollar example --- examples/schellingdollar.se | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/schellingdollar.se b/examples/schellingdollar.se index b73c33a..179afcb 100644 --- a/examples/schellingdollar.se +++ b/examples/schellingdollar.se @@ -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