Fixing small issue with the OrderBook#calculateObtainedQuote() method

develop
Nelson R. Perez 2017-11-29 00:24:13 -05:00
parent 50bd0aa05c
commit ff856e7e2c
5 changed files with 27 additions and 5 deletions

View File

@ -17,7 +17,7 @@
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true # org.gradle.parallel=true
VERSION_NAME=0.4.6-alpha5 VERSION_NAME=0.4.6-alpha6
VERSION_CODE=8 VERSION_CODE=8
GROUP=com.github.bilthon GROUP=com.github.bilthon

View File

@ -22,7 +22,7 @@ android {
minSdkVersion 9 minSdkVersion 9
targetSdkVersion 24 targetSdkVersion 24
versionCode 8 versionCode 8
versionName "0.4.6-alpha5" versionName "0.4.6-alpha6"
vectorDrawables.useSupportLibrary = true vectorDrawables.useSupportLibrary = true
} }

View File

@ -2,8 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="cy.agorise.graphenej" package="cy.agorise.graphenej"
android:versionCode="8" android:versionCode="8"
android:versionName="0.4.6-alpha5" > android:versionName="0.4.6-alpha6" >
<uses-sdk android:minSdkVersion="1" /> <uses-sdk android:minSdkVersion="1" />
<application/> <application/>
</manifest> </manifest>

View File

@ -93,7 +93,7 @@ public class OrderBook {
}else{ }else{
// This order consumes all our base asset // This order consumes all our base asset
// obtained_quote = obtained_quote + (my base * order_base / order_quote) // obtained_quote = obtained_quote + (my base * order_base / order_quote)
obtainedQuote = obtainedQuote.plus(myBase.times(orderBase.dividedBy(orderQuote))); obtainedQuote = obtainedQuote.plus(myBase.times(orderBase).dividedBy(orderQuote));
myBase = UnsignedLong.ZERO; myBase = UnsignedLong.ZERO;
} }
} }

File diff suppressed because one or more lines are too long