Update main view to 'shop'

This commit is contained in:
Rene Vergara 2021-11-05 09:53:29 -05:00
parent 4c5d4c311f
commit 172f4da6b1
2 changed files with 4 additions and 4 deletions

View file

@ -8,7 +8,7 @@ import { NodeResolverService } from './node-resolver.service';
const routes: Routes = [
{ path: '', component: LoginComponent, resolve: { response: NodeResolverService} },
//{ path: 'create', component: PostCreateComponent, canActivate: [AuthGuardService]},
{ path: 'view', component: ViewerComponent, canActivate: [AuthGuardService]},
{ path: 'shop', component: ViewerComponent, canActivate: [AuthGuardService]},
{ path: 'login', component: LoginComponent}
];

View file

@ -52,12 +52,12 @@ export class LoginComponent implements OnInit {
subscribe((userAddr: string) => {
if (userAddr.length != 0) {
console.log('Log in found!');
this.router.navigate(['/view']);
this.router.navigate(['/shop']);
} else {
console.log('No login for existing token found');
console.log('Showing QR code for login');
//console.log(URLSafeBase64.encode(Buffer.from('S4ZEC::'.concat(localToken))));
var codeString = `zcash:${this.nodeAddress}?amount=0.001&memo=${URLSafeBase64.encode(Buffer.from('ZGO::'.concat(localToken!)))}`;
var codeString = `zcash:${this.nodeAddress}?amount=0.005&memo=${URLSafeBase64.encode(Buffer.from('ZGO::'.concat(localToken!)))}`;
console.log(codeString);
var qrcode = new QRCode(document.getElementById("qrcode"), {
text: codeString,
@ -81,7 +81,7 @@ export class LoginComponent implements OnInit {
this.uZaddrUpdate.subscribe((userAddr: string) => {
if (userAddr.length != 0) {
console.log('Log in found in blockchain!');
this.router.navigate(['/view']);
this.router.navigate(['/shop']);
}
});
}