File tree Expand file tree Collapse file tree 9 files changed +42
-13
lines changed
main/java/network/minter/blockchain
test/java/network/minter/blockchain/repos Expand file tree Collapse file tree 9 files changed +42
-13
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ project build.gradle
2424``` groovy
2525
2626ext {
27- minterBlockchainSDK = "0.5.4 "
27+ minterBlockchainSDK = "0.5.6 "
2828}
2929
3030dependencies {
Original file line number Diff line number Diff line change 11# Release notes
22
3+ ## 0.5.6
4+ - Changed ` stake ` to ` value ` in delegate/unbound transactions
5+
6+ ## 0.5.5
7+ - Fixed sending transaction: now blockchain requires 0x before transaction sign
8+
39## 0.5.4
410 - Removed ` transactionCount ` method and moved this info to balance model ` Balance.txCount `
511
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ apply plugin: 'com.jfrog.bintray'
5858
5959
6060group = ' network.minter.android'
61- version = ' 0.5.4 '
61+ version = ' 0.5.6 '
6262
6363ext {
6464 minterMinSdk = 16
Original file line number Diff line number Diff line change @@ -128,6 +128,9 @@ public static void initialize(String baseNodeApiUrl) {
128128 }
129129
130130 public static MinterBlockChainApi getInstance () {
131+ if (INSTANCE == null ) {
132+ throw new IllegalStateException ("You forget to call MinterBlockchainApi.initialize" );
133+ }
131134 return INSTANCE ;
132135 }
133136
Original file line number Diff line number Diff line change 11/*
2- * Copyright (C) by MinterTeam. 2018
2+ * Copyright (C) by MinterTeam. 2019
33 * @link <a href="https://github.com/MinterTeam">Org Github</a>
44 * @link <a href="https://github.com/edwardstock">Maintainer Github</a>
55 *
@@ -301,18 +301,27 @@ public static class TxDelegateUnbondResult extends TxBaseResult {
301301 @ SerializedName ("pub_key" )
302302 public MinterPublicKey publicKey ;
303303 public String coin ;
304- public String stake ;
304+ public String value ;
305305
306306 public MinterPublicKey getPublicKey () {
307307 return publicKey ;
308308 }
309309
310- public BigDecimal getStake () {
311- if (stake == null || stake .isEmpty ()) {
312- stake = "0" ;
310+ public BigDecimal getValue () {
311+ if (value == null || value .isEmpty ()) {
312+ value = "0" ;
313313 }
314314
315- return new BigDecimal (stake );
315+ return new BigDecimal (value );
316+ }
317+
318+ /**
319+ * @return
320+ * @deprecated use {@link #getValue()}
321+ */
322+ @ Deprecated
323+ public BigDecimal getStake () {
324+ return getValue ();
316325 }
317326
318327 public String getCoin () {
Original file line number Diff line number Diff line change 11/*
2- * Copyright (C) by MinterTeam. 2018
2+ * Copyright (C) by MinterTeam. 2019
33 * @link <a href="https://github.com/MinterTeam">Org Github</a>
44 * @link <a href="https://github.com/edwardstock">Maintainer Github</a>
55 *
3535 */
3636@ Parcel
3737public final class TransactionSign {
38- private String mSign ;
38+ String mSign ;
3939
4040 public TransactionSign (String sign ) {
4141 mSign = sign ;
@@ -48,5 +48,9 @@ public String getTxSign() {
4848 return mSign ;
4949 }
5050
51+ public final void clear () {
52+ mSign = null ;
53+ }
54+
5155
5256}
Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ public TxDeclareCandidacy setCoin(String coinName) {
156156 }
157157
158158 /**
159- * Get normalized stake
159+ * Get normalized value
160160 *
161161 * @return big decimal value
162162 */
@@ -170,7 +170,7 @@ public TxDeclareCandidacy setStake(String stakeBigInteger) {
170170 }
171171
172172 /**
173- * Get normalized stake in double value
173+ * Get normalized value in double value
174174 * Be carefully! Value can be overflowed
175175 *
176176 * @return normalized double value
Original file line number Diff line number Diff line change @@ -82,7 +82,13 @@ public Call<BCResult<Balance>> getBalance(@Nonnull String address) {
8282 * @see TransactionSendResult
8383 */
8484 public Call <BCResult <TransactionSendResult >> sendTransaction (@ Nonnull TransactionSign transactionSign ) {
85- return getInstantService ().sendTransaction (transactionSign .getTxSign ());
85+ //TODO: move it to sign
86+ String sig = transactionSign .getTxSign ();
87+ if (!sig .startsWith ("0x" )) {
88+ sig = "0x" + sig ;
89+ }
90+ transactionSign .clear ();
91+ return getInstantService ().sendTransaction (sig );
8692 }
8793
8894 @ Nonnull
Original file line number Diff line number Diff line change 4444
4545/**
4646 * minter-android-blockchain. 2019
47+ *
4748 * @author Eduard Maximovich [edward.vstock@gmail.com]
4849 */
4950public class TransactionsRepositoryTest {
You can’t perform that action at this time.
0 commit comments