Refactor transactions table to show address before loading account meta.

This commit is contained in:
Spencer Ofwiti 2021-05-26 11:30:38 +03:00
parent 9782c919d5
commit 16af939af7
8 changed files with 14 additions and 12 deletions

View File

@ -3,7 +3,7 @@ import Web3 from 'web3';
import { environment } from '@src/environments/environment';
@Injectable({
providedIn: 'root'
providedIn: 'root',
})
export class Web3Service {
private static web3: Web3;

View File

@ -121,8 +121,10 @@ export class AccountDetailsComponent implements OnInit {
location: this.account.location.area,
locationType: this.account.location.area_type,
});
this.userService.getAccountStatus(this.account.vcard?.tel[0].value).pipe(first())
.subscribe(response => this.accountStatus = response.status);
this.userService
.getAccountStatus(this.account.vcard?.tel[0].value)
.pipe(first())
.subscribe((response) => (this.accountStatus = response.status));
} else {
alert('Account not found!');
}

View File

@ -48,12 +48,12 @@
<ng-container matColumnDef="sender">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Sender </th>
<td mat-cell *matCellDef="let transaction"> {{transaction?.sender?.vcard.fn[0].value}} </td>
<td mat-cell *matCellDef="let transaction"> {{transaction?.sender?.vcard.fn[0].value || transaction.from}} </td>
</ng-container>
<ng-container matColumnDef="recipient">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Recipient </th>
<td mat-cell *matCellDef="let transaction"> {{transaction?.recipient?.vcard.fn[0].value}} </td>
<td mat-cell *matCellDef="let transaction"> {{transaction?.recipient?.vcard.fn[0].value || transaction.to }} </td>
</ng-container>
<ng-container matColumnDef="value">