3 Commits

Author SHA1 Message Date
  Eric Foster 93c62c8a3b deleted workspace xml 6 years ago
  Eric Foster f127226666 updated blockservice mined block by id method 6 years ago
  Eric Foster cdbad060db workspace xml and home.ts 6 years ago

+ 2
- 2
ZipCoinRedIonicClient/src/pages/home/home.ts View File

@@ -11,7 +11,7 @@ export class HomePage {
11 11
   
12 12
   constructor(public navCtrl: NavController, public blockService: BlockService) {
13 13
       this.getAllBlocks();
14
-    }
14
+  }
15 15
 
16 16
   getBlock(id) {
17 17
     this.blockService.getBlock(id).subscribe(block => {
@@ -26,7 +26,7 @@ export class HomePage {
26 26
   getMinedBlock(id) {
27 27
     this.blockService.getMinedBlock(id).subscribe(minedBlock => {
28 28
       this.block = minedBlock;
29
-  })
29
+    })
30 30
   }
31 31
 }
32 32
 

+ 1
- 1
ZipCoinRedJavaServer/src/main/java/com/zipcoin/service/BlockService.java View File

@@ -32,7 +32,7 @@ public class BlockService {
32 32
         if (blockToMine.isPresent()) {
33 33
             Miner miner = new Miner();
34 34
             Block minedBlock = miner.mine(blockToMine.get());
35
-            return blockRepository.saveAndFlush(minedBlock);
35
+            return blockRepository.save(minedBlock);
36 36
         } else {
37 37
             return null;
38 38
         }