Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
The component to interact with Ethereum
import { Component, OnInit } from '@angular/core';
import { EthService } from './ethereum/eth.service';
selector: 'app-root',
template: '<p>Current Account: {{address$ | async}}',
styles: []
export class AppComponent implements OnInit {
public address$: Observable<string>;
constructor(private eth: EthService) {}
ngOnInit() {
this.address$ = this.eth.currentAccount();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.