From dedc97ffe6655adb9afe4611cf49ca6542fd67c1 Mon Sep 17 00:00:00 2001 From: SondreB Date: Wed, 4 Jan 2023 01:28:50 +0100 Subject: [PATCH] Update the dapp with CITY address and display result when done --- src/app/app.component.html | 13 +++---------- src/app/app.component.ts | 9 +++++++-- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/app/app.component.html b/src/app/app.component.html index 2fa041f..87eb860 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -312,22 +312,15 @@ Send Transaction - -
-

Signature:
{{ signedTextSignature }}

-

Key/Address:
{{ signedTextKey }}

-

Network:
{{ signedTextNetwork }}

-

Is Signature Valid:
{{ signedTextValidSignature }}

+
+

Transaction ID:
{{ transactionResult.transactionId }}

+

Transaction HEX:
{{ transactionResult.transactionHex }}

- diff --git a/src/app/app.component.ts b/src/app/app.component.ts index f96c0a4..5aae726 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -151,14 +151,16 @@ export class AppComponent implements OnInit { this.nostrDecrypted = content; } + transactionResult: any = undefined; + async sendTransaction() { const result: any = await this.provider!.request({ method: 'transaction.send', params: [ { recipients: [ - { hint: 'Swap', address: 'yRZBBWkf4THjC5qqfvoJaV2qn4pLJnkHH9', amount: 100000000 }, - { hint: 'Fee Service', address: 'pRZBBWkf4THjC5qqfvoJaV2qn4pLJnkHH9', amount: 20000000 }, + { hint: 'Swap', address: 'CMrc2rFsPd9VnxPiHvN2wHFVNfNd9vY8Ze', amount: 100000000 }, + { hint: 'Fee Service', address: 'CMrc2rFsPd9VnxPiHvN2wHFVNfNd9vY8Ze', amount: 20000000 }, ], // data: 'op_return', feeRate: 'medium', @@ -166,8 +168,11 @@ export class AppComponent implements OnInit { }, ], }); + console.log('Result:', result); + this.transactionResult = result; + // this.signedTextKey = result.key; // this.signedTextSignature = result.response.signature; // this.signedTextNetwork = result.network;