|
@@ -169,35 +169,26 @@ var HomePage = /** @class */ (function () {
|
169
|
169
|
this.navCtrl = navCtrl;
|
170
|
170
|
this.blockService = blockService;
|
171
|
171
|
this.block = {};
|
172
|
|
- this.getAllBlocks();
|
|
172
|
+ this.id = 3;
|
|
173
|
+ this.getBlock();
|
173
|
174
|
}
|
174
|
|
- HomePage.prototype.getBlock = function (id) {
|
|
175
|
+ HomePage.prototype.getBlock = function () {
|
175
|
176
|
var _this = this;
|
176
|
|
- this.blockService.getBlock(id).subscribe(function (block) {
|
|
177
|
+ this.blockService.getBlock(this.id).subscribe(function (block) {
|
177
|
178
|
_this.block = block;
|
178
|
179
|
});
|
179
|
180
|
};
|
180
|
|
- HomePage.prototype.getAllBlocks = function () {
|
|
181
|
+ HomePage.prototype.btnClicked = function () {
|
181
|
182
|
var _this = this;
|
182
|
|
- this.blockService.getAllBlocks().subscribe(function (blocks) {
|
183
|
|
- _this.blocks = blocks;
|
184
|
|
- });
|
185
|
|
- };
|
186
|
|
- HomePage.prototype.getMinedBlock = function (id) {
|
187
|
|
- var _this = this;
|
188
|
|
- this.blockService.getMinedBlock(id).subscribe(function (minedBlock) {
|
189
|
|
- _this.block = minedBlock;
|
|
183
|
+ this.blockService.getMinedBlock(this.id).subscribe(function (block) {
|
|
184
|
+ _this.block = block;
|
190
|
185
|
});
|
191
|
186
|
};
|
192
|
187
|
HomePage = __decorate([
|
193
|
188
|
Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
|
194
|
|
- selector: 'page-home',template:/*ion-inline-start:"/Users/ericf/ZCWProjects/ZipCoin-RED/ZipCoinRedIonicClient/src/pages/home/home.html"*/'<ion-header>\n <ion-navbar>\n <ion-title>\n ZipCoin BlockChain\n </ion-title>\n </ion-navbar>\n</ion-header>\n\n<ion-content padding>\n\n <ion-list>\n <ion-item-sliding *ngFor="let block of blocks">\n <ion-item>\n <ion-card>\n <ion-card-header>\n Block #: {{block.blockNumber}}\n </ion-card-header>\n <ion-card-content>\n <div>Nonce: {{ block.nonce }}</div>\n <div>Data: {{ block.transactionList }}</div>\n <div>Previous Hash: {{ block.previousHash }}</div>\n <div>Current Hash: {{ block.currentHash }}</div>\n <button ion-button (click)="getMinedBlock(block.id)">Mine</button>\n </ion-card-content>\n </ion-card>\n </ion-item>\n </ion-item-sliding>\n </ion-list>\n\n</ion-content>'/*ion-inline-end:"/Users/ericf/ZCWProjects/ZipCoin-RED/ZipCoinRedIonicClient/src/pages/home/home.html"*/
|
|
189
|
+ selector: 'page-home',template:/*ion-inline-start:"/Users/khalils/ZipCoin-RED/ZipCoinRedIonicClient/src/pages/home/home.html"*/'<ion-header>\n <ion-navbar>\n <ion-title>\n ZipCoin BlockChain\n </ion-title>\n </ion-navbar>\n</ion-header>\n\n<ion-content padding>\n\n <ion-list>\n <ion-item-sliding *ngFor="let block of blocks">\n <ion-item>\n <ion-card>\n <ion-card-header>\n Block #: {{block.blockNumber}}\n </ion-card-header>\n <ion-card-content>\n <div>Nonce: {{ block.nonce }}</div>\n <div>Data: {{ block.transactionList }}</div>\n <div>Previous Hash: {{ block.previousHash }}</div>\n <div>Current Hash: {{ block.currentHash }}</div>\n <button ion-button (click)="getMinedBlock(block.id)">Mine</button>\n </ion-card-content>\n </ion-card>\n </ion-item>\n </ion-item-sliding>\n </ion-list>\n\n</ion-content>'/*ion-inline-end:"/Users/khalils/ZipCoin-RED/ZipCoinRedIonicClient/src/pages/home/home.html"*/
|
195
|
190
|
}),
|
196
|
|
-<<<<<<< HEAD
|
197
|
|
- __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["d" /* NavController */], __WEBPACK_IMPORTED_MODULE_2__providers_block_service__["a" /* BlockService */]])
|
198
|
|
-=======
|
199
|
191
|
__metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */], __WEBPACK_IMPORTED_MODULE_2__providers_block_service__["a" /* BlockService */]])
|
200
|
|
->>>>>>> d5351112dec273d41f50fea3731c9fae9fc95cd9
|
201
|
192
|
], HomePage);
|
202
|
193
|
return HomePage;
|
203
|
194
|
}());
|
|
@@ -242,9 +233,6 @@ var BlockService = /** @class */ (function () {
|
242
|
233
|
BlockService.prototype.getMinedBlock = function (id) {
|
243
|
234
|
return this.http.get(this.BLOCK_API + '/' + id + '/' + 'mine');
|
244
|
235
|
};
|
245
|
|
- BlockService.prototype.getAllBlocks = function () {
|
246
|
|
- return this.http.get(this.BLOCK_API);
|
247
|
|
- };
|
248
|
236
|
BlockService = __decorate([
|
249
|
237
|
Object(__WEBPACK_IMPORTED_MODULE_1__angular_core__["A" /* Injectable */])(),
|
250
|
238
|
__metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_0__angular_common_http__["a" /* HttpClient */]])
|
|
@@ -322,15 +310,6 @@ Object(__WEBPACK_IMPORTED_MODULE_0__angular_platform_browser_dynamic__["a" /* pl
|
322
|
310
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AppModule; });
|
323
|
311
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser__ = __webpack_require__(31);
|
324
|
312
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__(0);
|
325
|
|
-<<<<<<< HEAD
|
326
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_ionic_angular__ = __webpack_require__(54);
|
327
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ionic_native_splash_screen__ = __webpack_require__(192);
|
328
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ionic_native_status_bar__ = __webpack_require__(195);
|
329
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__app_component__ = __webpack_require__(269);
|
330
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__angular_common_http__ = __webpack_require__(198);
|
331
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__providers_block_service__ = __webpack_require__(197);
|
332
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__pages_home_home__ = __webpack_require__(196);
|
333
|
|
-=======
|
334
|
313
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_ionic_angular__ = __webpack_require__(28);
|
335
|
314
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ionic_native_splash_screen__ = __webpack_require__(198);
|
336
|
315
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ionic_native_status_bar__ = __webpack_require__(201);
|
|
@@ -341,8 +320,6 @@ Object(__WEBPACK_IMPORTED_MODULE_0__angular_platform_browser_dynamic__["a" /* pl
|
341
|
320
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__pages_wallet_wallet__ = __webpack_require__(100);
|
342
|
321
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__pages_transaction_transaction__ = __webpack_require__(101);
|
343
|
322
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__pages_tabs_tabs__ = __webpack_require__(99);
|
344
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__pages_tab4_tab4__ = __webpack_require__(202);
|
345
|
|
->>>>>>> d5351112dec273d41f50fea3731c9fae9fc95cd9
|
346
|
323
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
347
|
324
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
348
|
325
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -361,7 +338,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
361
|
338
|
|
362
|
339
|
|
363
|
340
|
|
364
|
|
-
|
365
|
341
|
var AppModule = /** @class */ (function () {
|
366
|
342
|
function AppModule() {
|
367
|
343
|
}
|
|
@@ -369,19 +345,14 @@ var AppModule = /** @class */ (function () {
|
369
|
345
|
Object(__WEBPACK_IMPORTED_MODULE_1__angular_core__["I" /* NgModule */])({
|
370
|
346
|
declarations: [
|
371
|
347
|
__WEBPACK_IMPORTED_MODULE_5__app_component__["a" /* MyApp */],
|
372
|
|
-<<<<<<< HEAD
|
373
|
|
- __WEBPACK_IMPORTED_MODULE_8__pages_home_home__["a" /* HomePage */]
|
374
|
|
-=======
|
375
|
348
|
__WEBPACK_IMPORTED_MODULE_6__pages_home_home__["a" /* HomePage */],
|
376
|
349
|
__WEBPACK_IMPORTED_MODULE_9__pages_wallet_wallet__["a" /* WalletPage */],
|
377
|
350
|
__WEBPACK_IMPORTED_MODULE_10__pages_transaction_transaction__["a" /* TransactionPage */],
|
378
|
|
- __WEBPACK_IMPORTED_MODULE_12__pages_tab4_tab4__["a" /* Tab4Page */],
|
379
|
351
|
__WEBPACK_IMPORTED_MODULE_11__pages_tabs_tabs__["a" /* TabsPage */]
|
380
|
|
->>>>>>> d5351112dec273d41f50fea3731c9fae9fc95cd9
|
381
|
352
|
],
|
382
|
353
|
imports: [
|
383
|
354
|
__WEBPACK_IMPORTED_MODULE_0__angular_platform_browser__["a" /* BrowserModule */],
|
384
|
|
- __WEBPACK_IMPORTED_MODULE_6__angular_common_http__["b" /* HttpClientModule */],
|
|
355
|
+ __WEBPACK_IMPORTED_MODULE_7__angular_common_http__["b" /* HttpClientModule */],
|
385
|
356
|
__WEBPACK_IMPORTED_MODULE_2_ionic_angular__["c" /* IonicModule */].forRoot(__WEBPACK_IMPORTED_MODULE_5__app_component__["a" /* MyApp */], {}, {
|
386
|
357
|
links: [
|
387
|
358
|
{ loadChildren: '../pages/tab4/tab4.module#Tab4PageModule', name: 'Tab4Page', segment: 'tab4', priority: 'low', defaultHistory: [] },
|
|
@@ -394,20 +365,15 @@ var AppModule = /** @class */ (function () {
|
394
|
365
|
bootstrap: [__WEBPACK_IMPORTED_MODULE_2_ionic_angular__["a" /* IonicApp */]],
|
395
|
366
|
entryComponents: [
|
396
|
367
|
__WEBPACK_IMPORTED_MODULE_5__app_component__["a" /* MyApp */],
|
397
|
|
-<<<<<<< HEAD
|
398
|
|
- __WEBPACK_IMPORTED_MODULE_8__pages_home_home__["a" /* HomePage */]
|
399
|
|
-=======
|
400
|
368
|
__WEBPACK_IMPORTED_MODULE_6__pages_home_home__["a" /* HomePage */],
|
401
|
369
|
__WEBPACK_IMPORTED_MODULE_9__pages_wallet_wallet__["a" /* WalletPage */],
|
402
|
370
|
__WEBPACK_IMPORTED_MODULE_10__pages_transaction_transaction__["a" /* TransactionPage */],
|
403
|
|
- __WEBPACK_IMPORTED_MODULE_12__pages_tab4_tab4__["a" /* Tab4Page */],
|
404
|
371
|
__WEBPACK_IMPORTED_MODULE_11__pages_tabs_tabs__["a" /* TabsPage */]
|
405
|
|
->>>>>>> d5351112dec273d41f50fea3731c9fae9fc95cd9
|
406
|
372
|
],
|
407
|
373
|
providers: [
|
408
|
374
|
__WEBPACK_IMPORTED_MODULE_4__ionic_native_status_bar__["a" /* StatusBar */],
|
409
|
375
|
__WEBPACK_IMPORTED_MODULE_3__ionic_native_splash_screen__["a" /* SplashScreen */],
|
410
|
|
- __WEBPACK_IMPORTED_MODULE_7__providers_block_service__["a" /* BlockService */],
|
|
376
|
+ __WEBPACK_IMPORTED_MODULE_8__providers_block_service__["a" /* BlockService */],
|
411
|
377
|
{ provide: __WEBPACK_IMPORTED_MODULE_1__angular_core__["u" /* ErrorHandler */], useClass: __WEBPACK_IMPORTED_MODULE_2_ionic_angular__["b" /* IonicErrorHandler */] }
|
412
|
378
|
]
|
413
|
379
|
})
|
|
@@ -454,7 +420,7 @@ var MyApp = /** @class */ (function () {
|
454
|
420
|
});
|
455
|
421
|
}
|
456
|
422
|
MyApp = __decorate([
|
457
|
|
- Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({template:/*ion-inline-start:"/Users/ericf/ZCWProjects/ZipCoin-RED/ZipCoinRedIonicClient/src/app/app.html"*/'<ion-nav [root]="rootPage"></ion-nav>\n'/*ion-inline-end:"/Users/ericf/ZCWProjects/ZipCoin-RED/ZipCoinRedIonicClient/src/app/app.html"*/
|
|
423
|
+ Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({template:/*ion-inline-start:"/Users/khalils/ZipCoin-RED/ZipCoinRedIonicClient/src/app/app.html"*/'<ion-nav [root]="rootPage"></ion-nav>\n'/*ion-inline-end:"/Users/khalils/ZipCoin-RED/ZipCoinRedIonicClient/src/app/app.html"*/
|
458
|
424
|
}),
|
459
|
425
|
__metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["g" /* Platform */], __WEBPACK_IMPORTED_MODULE_2__ionic_native_status_bar__["a" /* StatusBar */], __WEBPACK_IMPORTED_MODULE_3__ionic_native_splash_screen__["a" /* SplashScreen */]])
|
460
|
426
|
], MyApp);
|