MCPcopy Create free account
hub / github.com/Pecunia-Wallet/PecuniaWallet / ngOnInit

Function ngOnInit

src/app/components/code/code.component.ts:51–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

49 protected auth: AuthService) {}
50
51 ngOnInit() {
52 this.buttons = [];
53 for (let i = 0; i < 10; i++) {
54 this.buttons.push({
55 render: el => el.textContent = `${i}`,
56 onclick: () => this.enter(i)
57 });
58 }
59 this.buttons = this.shuffle(this.buttons);
60
61 this.buttons.splice(-1, 0, this.funcButtonLeft());
62 this.buttons.push(this.funcButtonRight());
63
64 this.buttons.reverse();
65
66 this.code$.subscribe(code => {
67 if (code.length >= this.codeLength) {
68 this.loading = true;
69 this.onInput(code);
70 }
71 });
72 }
73
74 protected renderIcon(el: Element, name: string, width = 40, height = 40) {
75 el.classList.add("key--icon");

Callers

nothing calls this directly

Calls 2

funcButtonLeftMethod · 0.80
onInputMethod · 0.45

Tested by

no test coverage detected