Remove DeSo's GetTransactionSpending. LBRY will get this info from parsing psbts.

This commit is contained in:
Daniel Krol 2022-04-09 17:38:19 -04:00
parent 8441a49232
commit b89ff006ce
3 changed files with 7 additions and 26 deletions

View file

@ -9,9 +9,9 @@
{{ globalVars.hostname }} wants to {{ transactionDescription }}
</p>
<br/>
<div *ngIf="transactionDeSoSpent">
<div *ngIf="transactionSpent">
<p class="pb-15px">
Total Cost: {{ transactionDeSoSpent }} $DESO
Total Cost: {{ transactionSpent }} $DESO
</p>
</div>
<div class="d-flex align-items-end justify-content-between">

View file

@ -46,7 +46,7 @@ export class ApproveComponent implements OnInit {
transactionHex: any;
username: any;
transactionDescription: any;
transactionDeSoSpent: string | boolean = false;
transactionSpent: string | boolean = false;
constructor(
private activatedRoute: ActivatedRoute,
@ -61,9 +61,10 @@ export class ApproveComponent implements OnInit {
ngOnInit(): void {
this.activatedRoute.queryParams.subscribe(params => {
this.transactionHex = params.tx;
this.backendApi.GetTransactionSpending(this.transactionHex).subscribe( res => {
this.transactionDeSoSpent = res ? this.nanosToUnitString(res) : false;
});
// TODO - for LBRY
this.transactionSpent = false;
const txBytes = new Buffer(this.transactionHex, 'hex');
this.transaction = Transaction.fromBytes(txBytes)[0];
this.publicKey = this.base58KeyCheck(this.transaction.publicKey);

View file

@ -93,24 +93,4 @@ export class BackendAPIService {
return of(userProfiles);
}
}
GetTransactionSpending(
transactionHex: string
): Observable<number> {
const req = this.httpClient.post<any>(
`${this.endpoint}/get-transaction-spending`,
{
TransactionHex: transactionHex,
},
);
return req.pipe(
map( res => {
return res.TotalSpendingNanos as number;
})
).pipe(
catchError(() => {
return of(0);
})
);
}
}