@hsuite/native-connect-angular 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -0
- package/USAGE_EXAMPLES.md +476 -0
- package/assets/wallets/extension.svg +7 -0
- package/assets/wallets/hashpack.svg +6 -0
- package/assets/wallets/hsuite.svg +11 -0
- package/assets/wallets/kabila.svg +11 -0
- package/assets/wallets/walletconnect.svg +13 -0
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/coverage-summary.json +50 -0
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +476 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +476 -0
- package/coverage/lcov-report/lib/components/account-selector/account-actions/account-actions.component.ts.html +868 -0
- package/coverage/lcov-report/lib/components/account-selector/account-actions/index.html +116 -0
- package/coverage/lcov-report/lib/components/account-selector/account-filter/account-filter.component.ts.html +1288 -0
- package/coverage/lcov-report/lib/components/account-selector/account-filter/index.html +116 -0
- package/coverage/lcov-report/lib/components/account-selector/account-formatting.service.ts.html +685 -0
- package/coverage/lcov-report/lib/components/account-selector/account-grouping.service.ts.html +766 -0
- package/coverage/lcov-report/lib/components/account-selector/account-list/account-list.component.ts.html +1495 -0
- package/coverage/lcov-report/lib/components/account-selector/account-list/index.html +116 -0
- package/coverage/lcov-report/lib/components/account-selector/account-selector.component.ts.html +1495 -0
- package/coverage/lcov-report/lib/components/account-selector/account-selector.service.ts.html +1588 -0
- package/coverage/lcov-report/lib/components/account-selector/index.html +161 -0
- package/coverage/lcov-report/lib/components/wallet-account-display/index.html +116 -0
- package/coverage/lcov-report/lib/components/wallet-account-display/wallet-account-display.component.ts.html +505 -0
- package/coverage/lcov-report/lib/components/wallet-connect-button/index.html +116 -0
- package/coverage/lcov-report/lib/components/wallet-connect-button/wallet-connect-button.component.ts.html +805 -0
- package/coverage/lcov-report/lib/components/wallet-connect-prompt/index.html +116 -0
- package/coverage/lcov-report/lib/components/wallet-connect-prompt/wallet-connect-prompt.component.ts.html +409 -0
- package/coverage/lcov-report/lib/components/wallet-connected-guard/index.html +116 -0
- package/coverage/lcov-report/lib/components/wallet-connected-guard/wallet-connected-guard.component.ts.html +304 -0
- package/coverage/lcov-report/lib/components/wallet-connection-modal/connection-method-step/connection-method-step.component.ts.html +436 -0
- package/coverage/lcov-report/lib/components/wallet-connection-modal/connection-method-step/index.html +116 -0
- package/coverage/lcov-report/lib/components/wallet-connection-modal/index.html +116 -0
- package/coverage/lcov-report/lib/components/wallet-connection-modal/qr-pairing-step/index.html +116 -0
- package/coverage/lcov-report/lib/components/wallet-connection-modal/qr-pairing-step/qr-pairing-step.component.ts.html +2287 -0
- package/coverage/lcov-report/lib/components/wallet-connection-modal/wallet-connection-modal.component.ts.html +2275 -0
- package/coverage/lcov-report/lib/components/wallet-session-display/index.html +116 -0
- package/coverage/lcov-report/lib/components/wallet-session-display/wallet-session-display.component.ts.html +676 -0
- package/coverage/lcov-report/lib/components/wallet-transaction-status/index.html +116 -0
- package/coverage/lcov-report/lib/components/wallet-transaction-status/wallet-transaction-status.component.ts.html +703 -0
- package/coverage/lcov-report/lib/directives/index.html +146 -0
- package/coverage/lcov-report/lib/directives/wallet-connected.directive.ts.html +670 -0
- package/coverage/lcov-report/lib/directives/wallet-context.directive.ts.html +547 -0
- package/coverage/lcov-report/lib/directives/wallet-events.directive.ts.html +781 -0
- package/coverage/lcov-report/lib/hsuite-wallet.module.ts.html +715 -0
- package/coverage/lcov-report/lib/index.html +116 -0
- package/coverage/lcov-report/lib/models/connection-config.model.ts.html +280 -0
- package/coverage/lcov-report/lib/models/index.html +131 -0
- package/coverage/lcov-report/lib/models/provider-types.ts.html +577 -0
- package/coverage/lcov-report/lib/providers/base-wallet-provider.ts.html +1138 -0
- package/coverage/lcov-report/lib/providers/hsuite-native/channel-client.service.ts.html +2671 -0
- package/coverage/lcov-report/lib/providers/hsuite-native/index.html +116 -0
- package/coverage/lcov-report/lib/providers/hsuite-native-provider.ts.html +2347 -0
- package/coverage/lcov-report/lib/providers/index.html +146 -0
- package/coverage/lcov-report/lib/providers/p2p-native/index.html +131 -0
- package/coverage/lcov-report/lib/providers/p2p-native/p2p-native.provider.ts.html +2254 -0
- package/coverage/lcov-report/lib/providers/p2p-native/p2p-session-manager.ts.html +2170 -0
- package/coverage/lcov-report/lib/providers/wallet-error-handler.ts.html +1132 -0
- package/coverage/lcov-report/lib/providers/walletconnect/core/index.html +176 -0
- package/coverage/lcov-report/lib/providers/walletconnect/core/session-health.ts.html +673 -0
- package/coverage/lcov-report/lib/providers/walletconnect/core/walletconnect-client-manager.ts.html +1177 -0
- package/coverage/lcov-report/lib/providers/walletconnect/core/walletconnect-provider.ts.html +2563 -0
- package/coverage/lcov-report/lib/providers/walletconnect/core/walletconnect-session-store.ts.html +904 -0
- package/coverage/lcov-report/lib/providers/walletconnect/core/walletconnect-signing-orchestrator.ts.html +982 -0
- package/coverage/lcov-report/lib/providers/walletconnect/signers/hedera-signer.ts.html +1915 -0
- package/coverage/lcov-report/lib/providers/walletconnect/signers/index.html +146 -0
- package/coverage/lcov-report/lib/providers/walletconnect/signers/signer-factory.ts.html +445 -0
- package/coverage/lcov-report/lib/providers/walletconnect/signers/xrpl-signer.ts.html +1519 -0
- package/coverage/lcov-report/lib/services/index.html +191 -0
- package/coverage/lcov-report/lib/services/logger.service.ts.html +463 -0
- package/coverage/lcov-report/lib/services/transaction-builders/base-transaction-builder.service.ts.html +1840 -0
- package/coverage/lcov-report/lib/services/transaction-builders/hedera-amount-utils.ts.html +337 -0
- package/coverage/lcov-report/lib/services/transaction-builders/hedera-transaction-builder.service.ts.html +3940 -0
- package/coverage/lcov-report/lib/services/transaction-builders/index.html +161 -0
- package/coverage/lcov-report/lib/services/transaction-builders/xrpl-transaction-builder.service.ts.html +2581 -0
- package/coverage/lcov-report/lib/services/transaction.service.ts.html +1123 -0
- package/coverage/lcov-report/lib/services/unified-wallet.service.ts.html +2641 -0
- package/coverage/lcov-report/lib/services/wallet-context.service.ts.html +637 -0
- package/coverage/lcov-report/lib/services/wallet-event-bus.service.ts.html +643 -0
- package/coverage/lcov-report/lib/services/wallet-providers.service.ts.html +496 -0
- package/coverage/lcov-report/lib/transports/chrome-extension-transport.ts.html +823 -0
- package/coverage/lcov-report/lib/transports/index.html +116 -0
- package/coverage/lcov-report/lib/utils/index.html +116 -0
- package/coverage/lcov-report/lib/utils/ledger-icons.util.ts.html +319 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +210 -0
- package/coverage/lcov.info +19252 -0
- package/coverage/lib/components/account-selector/account-actions/account-actions.component.ts.html +868 -0
- package/coverage/lib/components/account-selector/account-actions/index.html +116 -0
- package/coverage/lib/components/account-selector/account-filter/account-filter.component.ts.html +1288 -0
- package/coverage/lib/components/account-selector/account-filter/index.html +116 -0
- package/coverage/lib/components/account-selector/account-formatting.service.ts.html +685 -0
- package/coverage/lib/components/account-selector/account-grouping.service.ts.html +766 -0
- package/coverage/lib/components/account-selector/account-list/account-list.component.ts.html +1495 -0
- package/coverage/lib/components/account-selector/account-list/index.html +116 -0
- package/coverage/lib/components/account-selector/account-selector.component.ts.html +1495 -0
- package/coverage/lib/components/account-selector/account-selector.service.ts.html +1588 -0
- package/coverage/lib/components/account-selector/index.html +161 -0
- package/coverage/lib/components/wallet-account-display/index.html +116 -0
- package/coverage/lib/components/wallet-account-display/wallet-account-display.component.ts.html +505 -0
- package/coverage/lib/components/wallet-connect-button/index.html +116 -0
- package/coverage/lib/components/wallet-connect-button/wallet-connect-button.component.ts.html +805 -0
- package/coverage/lib/components/wallet-connect-prompt/index.html +116 -0
- package/coverage/lib/components/wallet-connect-prompt/wallet-connect-prompt.component.ts.html +409 -0
- package/coverage/lib/components/wallet-connected-guard/index.html +116 -0
- package/coverage/lib/components/wallet-connected-guard/wallet-connected-guard.component.ts.html +304 -0
- package/coverage/lib/components/wallet-connection-modal/connection-method-step/connection-method-step.component.ts.html +436 -0
- package/coverage/lib/components/wallet-connection-modal/connection-method-step/index.html +116 -0
- package/coverage/lib/components/wallet-connection-modal/index.html +116 -0
- package/coverage/lib/components/wallet-connection-modal/qr-pairing-step/index.html +116 -0
- package/coverage/lib/components/wallet-connection-modal/qr-pairing-step/qr-pairing-step.component.ts.html +2287 -0
- package/coverage/lib/components/wallet-connection-modal/wallet-connection-modal.component.ts.html +2275 -0
- package/coverage/lib/components/wallet-session-display/index.html +116 -0
- package/coverage/lib/components/wallet-session-display/wallet-session-display.component.ts.html +676 -0
- package/coverage/lib/components/wallet-transaction-status/index.html +116 -0
- package/coverage/lib/components/wallet-transaction-status/wallet-transaction-status.component.ts.html +703 -0
- package/coverage/lib/directives/index.html +146 -0
- package/coverage/lib/directives/wallet-connected.directive.ts.html +670 -0
- package/coverage/lib/directives/wallet-context.directive.ts.html +547 -0
- package/coverage/lib/directives/wallet-events.directive.ts.html +781 -0
- package/coverage/lib/hsuite-wallet.module.ts.html +715 -0
- package/coverage/lib/index.html +116 -0
- package/coverage/lib/models/connection-config.model.ts.html +280 -0
- package/coverage/lib/models/index.html +131 -0
- package/coverage/lib/models/provider-types.ts.html +577 -0
- package/coverage/lib/providers/base-wallet-provider.ts.html +1138 -0
- package/coverage/lib/providers/hsuite-native/channel-client.service.ts.html +2671 -0
- package/coverage/lib/providers/hsuite-native/index.html +116 -0
- package/coverage/lib/providers/hsuite-native-provider.ts.html +2347 -0
- package/coverage/lib/providers/index.html +146 -0
- package/coverage/lib/providers/p2p-native/index.html +131 -0
- package/coverage/lib/providers/p2p-native/p2p-native.provider.ts.html +2254 -0
- package/coverage/lib/providers/p2p-native/p2p-session-manager.ts.html +2170 -0
- package/coverage/lib/providers/wallet-error-handler.ts.html +1132 -0
- package/coverage/lib/providers/walletconnect/core/index.html +176 -0
- package/coverage/lib/providers/walletconnect/core/session-health.ts.html +673 -0
- package/coverage/lib/providers/walletconnect/core/walletconnect-client-manager.ts.html +1177 -0
- package/coverage/lib/providers/walletconnect/core/walletconnect-provider.ts.html +2563 -0
- package/coverage/lib/providers/walletconnect/core/walletconnect-session-store.ts.html +904 -0
- package/coverage/lib/providers/walletconnect/core/walletconnect-signing-orchestrator.ts.html +982 -0
- package/coverage/lib/providers/walletconnect/signers/hedera-signer.ts.html +1915 -0
- package/coverage/lib/providers/walletconnect/signers/index.html +146 -0
- package/coverage/lib/providers/walletconnect/signers/signer-factory.ts.html +445 -0
- package/coverage/lib/providers/walletconnect/signers/xrpl-signer.ts.html +1519 -0
- package/coverage/lib/services/index.html +191 -0
- package/coverage/lib/services/logger.service.ts.html +463 -0
- package/coverage/lib/services/transaction-builders/base-transaction-builder.service.ts.html +1840 -0
- package/coverage/lib/services/transaction-builders/hedera-amount-utils.ts.html +337 -0
- package/coverage/lib/services/transaction-builders/hedera-transaction-builder.service.ts.html +3940 -0
- package/coverage/lib/services/transaction-builders/index.html +161 -0
- package/coverage/lib/services/transaction-builders/xrpl-transaction-builder.service.ts.html +2581 -0
- package/coverage/lib/services/transaction.service.ts.html +1123 -0
- package/coverage/lib/services/unified-wallet.service.ts.html +2641 -0
- package/coverage/lib/services/wallet-context.service.ts.html +637 -0
- package/coverage/lib/services/wallet-event-bus.service.ts.html +643 -0
- package/coverage/lib/services/wallet-providers.service.ts.html +496 -0
- package/coverage/lib/transports/chrome-extension-transport.ts.html +823 -0
- package/coverage/lib/transports/index.html +116 -0
- package/coverage/lib/utils/index.html +116 -0
- package/coverage/lib/utils/ledger-icons.util.ts.html +319 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +210 -0
- package/dist/README.md +48 -0
- package/dist/fesm2022/hsuite-native-connect-angular.mjs +14592 -0
- package/dist/fesm2022/hsuite-native-connect-angular.mjs.map +1 -0
- package/dist/index.d.ts +6949 -0
- package/examples/minimal-connect.ts +178 -0
- package/examples/multi-protocol.ts +495 -0
- package/examples/transaction-signing.ts +361 -0
- package/jest.config.json +45 -0
- package/karma.conf.js +42 -0
- package/ng-package.json +20 -0
- package/package.json +60 -0
- package/src/index.ts +203 -0
- package/src/lib/components/account-selector/account-actions/account-actions.component.ts +261 -0
- package/src/lib/components/account-selector/account-filter/account-filter.component.ts +401 -0
- package/src/lib/components/account-selector/account-formatting.service.ts +200 -0
- package/src/lib/components/account-selector/account-grouping.service.ts +227 -0
- package/src/lib/components/account-selector/account-list/account-list.component.ts +470 -0
- package/src/lib/components/account-selector/account-selector.component.html +135 -0
- package/src/lib/components/account-selector/account-selector.component.scss +2039 -0
- package/src/lib/components/account-selector/account-selector.component.ts +470 -0
- package/src/lib/components/account-selector/account-selector.service.ts +501 -0
- package/src/lib/components/wallet-account-display/wallet-account-display.component.html +34 -0
- package/src/lib/components/wallet-account-display/wallet-account-display.component.scss +99 -0
- package/src/lib/components/wallet-account-display/wallet-account-display.component.ts +140 -0
- package/src/lib/components/wallet-connect-button/wallet-connect-button.component.html +14 -0
- package/src/lib/components/wallet-connect-button/wallet-connect-button.component.scss +272 -0
- package/src/lib/components/wallet-connect-button/wallet-connect-button.component.ts +240 -0
- package/src/lib/components/wallet-connect-prompt/wallet-connect-prompt.component.html +24 -0
- package/src/lib/components/wallet-connect-prompt/wallet-connect-prompt.component.scss +50 -0
- package/src/lib/components/wallet-connect-prompt/wallet-connect-prompt.component.ts +108 -0
- package/src/lib/components/wallet-connected-guard/wallet-connected-guard.component.html +24 -0
- package/src/lib/components/wallet-connected-guard/wallet-connected-guard.component.ts +73 -0
- package/src/lib/components/wallet-connection-modal/connection-method-step/connection-method-step.component.html +56 -0
- package/src/lib/components/wallet-connection-modal/connection-method-step/connection-method-step.component.scss +218 -0
- package/src/lib/components/wallet-connection-modal/connection-method-step/connection-method-step.component.ts +117 -0
- package/src/lib/components/wallet-connection-modal/qr-pairing-step/qr-pairing-step.component.html +94 -0
- package/src/lib/components/wallet-connection-modal/qr-pairing-step/qr-pairing-step.component.scss +272 -0
- package/src/lib/components/wallet-connection-modal/qr-pairing-step/qr-pairing-step.component.ts +734 -0
- package/src/lib/components/wallet-connection-modal/wallet-connection-modal.component.html +197 -0
- package/src/lib/components/wallet-connection-modal/wallet-connection-modal.component.scss +678 -0
- package/src/lib/components/wallet-connection-modal/wallet-connection-modal.component.ts +730 -0
- package/src/lib/components/wallet-session-display/wallet-session-display.component.html +110 -0
- package/src/lib/components/wallet-session-display/wallet-session-display.component.scss +179 -0
- package/src/lib/components/wallet-session-display/wallet-session-display.component.ts +197 -0
- package/src/lib/components/wallet-transaction-status/wallet-transaction-status.component.html +65 -0
- package/src/lib/components/wallet-transaction-status/wallet-transaction-status.component.scss +254 -0
- package/src/lib/components/wallet-transaction-status/wallet-transaction-status.component.ts +206 -0
- package/src/lib/directives/wallet-connected.directive.ts +195 -0
- package/src/lib/directives/wallet-context.directive.ts +154 -0
- package/src/lib/directives/wallet-events.directive.ts +232 -0
- package/src/lib/hsuite-wallet.module.ts +210 -0
- package/src/lib/models/connection-config.model.ts +65 -0
- package/src/lib/models/provider-types.ts +164 -0
- package/src/lib/models/unified-account.model.ts +76 -0
- package/src/lib/models/wallet-context.model.ts +121 -0
- package/src/lib/models/wallet-events.model.ts +158 -0
- package/src/lib/providers/base-wallet-provider.ts +351 -0
- package/src/lib/providers/hsuite-native/channel-client.service.spec.ts +73 -0
- package/src/lib/providers/hsuite-native/channel-client.service.ts +862 -0
- package/src/lib/providers/hsuite-native/index.ts +8 -0
- package/src/lib/providers/hsuite-native-provider.ts +754 -0
- package/src/lib/providers/mobile-native/mobile-native.provider.spec.ts +19 -0
- package/src/lib/providers/p2p-native/index.ts +30 -0
- package/src/lib/providers/p2p-native/p2p-native.provider.spec.ts +523 -0
- package/src/lib/providers/p2p-native/p2p-native.provider.ts +723 -0
- package/src/lib/providers/p2p-native/p2p-session-manager.ts +695 -0
- package/src/lib/providers/wallet-error-handler.ts +349 -0
- package/src/lib/providers/walletconnect/core/base-signer.interface.ts +122 -0
- package/src/lib/providers/walletconnect/core/session-health.ts +196 -0
- package/src/lib/providers/walletconnect/core/walletconnect-client-manager.ts +364 -0
- package/src/lib/providers/walletconnect/core/walletconnect-provider.integration.spec.ts +348 -0
- package/src/lib/providers/walletconnect/core/walletconnect-provider.ts +826 -0
- package/src/lib/providers/walletconnect/core/walletconnect-session-store.ts +273 -0
- package/src/lib/providers/walletconnect/core/walletconnect-signing-orchestrator.ts +299 -0
- package/src/lib/providers/walletconnect/core/walletconnect-types.ts +48 -0
- package/src/lib/providers/walletconnect/index.ts +33 -0
- package/src/lib/providers/walletconnect/signers/hedera-signer.spec.ts +367 -0
- package/src/lib/providers/walletconnect/signers/hedera-signer.ts +610 -0
- package/src/lib/providers/walletconnect/signers/signer-factory.spec.ts +62 -0
- package/src/lib/providers/walletconnect/signers/signer-factory.ts +120 -0
- package/src/lib/providers/walletconnect/signers/xrpl-signer.spec.ts +296 -0
- package/src/lib/providers/walletconnect/signers/xrpl-signer.ts +478 -0
- package/src/lib/services/logger.service.ts +126 -0
- package/src/lib/services/transaction-builders/base-transaction-builder.service.ts +585 -0
- package/src/lib/services/transaction-builders/hedera-amount-utils.ts +84 -0
- package/src/lib/services/transaction-builders/hedera-transaction-builder.service.spec.ts +741 -0
- package/src/lib/services/transaction-builders/hedera-transaction-builder.service.ts +1285 -0
- package/src/lib/services/transaction-builders/index.ts +54 -0
- package/src/lib/services/transaction-builders/xrpl-transaction-builder.service.spec.ts +937 -0
- package/src/lib/services/transaction-builders/xrpl-transaction-builder.service.ts +832 -0
- package/src/lib/services/transaction.service.ts +346 -0
- package/src/lib/services/unified-wallet.service.spec.ts +1382 -0
- package/src/lib/services/unified-wallet.service.ts +852 -0
- package/src/lib/services/wallet-context.service.ts +184 -0
- package/src/lib/services/wallet-event-bus.service.ts +186 -0
- package/src/lib/services/wallet-providers.service.ts +137 -0
- package/src/lib/transports/chrome-extension-transport.ts +246 -0
- package/src/lib/utils/index.ts +14 -0
- package/src/lib/utils/ledger-icons.util.ts +78 -0
- package/test/test-setup.ts +21 -0
- package/test-setup.ts +63 -0
- package/tsconfig.build.json +11 -0
- package/tsconfig.json +29 -0
- package/tsconfig.spec.json +15 -0
- package/vitest.config.ts +48 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
<ion-card *ngIf="session()" class="session-card">
|
|
2
|
+
<ion-card-header>
|
|
3
|
+
<ion-card-title>
|
|
4
|
+
<ion-icon name="link-outline" class="title-icon"></ion-icon>
|
|
5
|
+
Active Session
|
|
6
|
+
</ion-card-title>
|
|
7
|
+
</ion-card-header>
|
|
8
|
+
|
|
9
|
+
<ion-card-content>
|
|
10
|
+
<ion-list lines="none">
|
|
11
|
+
<!-- Session ID -->
|
|
12
|
+
<ion-item>
|
|
13
|
+
<ion-icon name="fingerprint-outline" slot="start" color="primary"></ion-icon>
|
|
14
|
+
<ion-label>
|
|
15
|
+
<p>Session ID</p>
|
|
16
|
+
<ion-text class="session-id">
|
|
17
|
+
{{ formatAddress(session()!.sessionId) }}
|
|
18
|
+
</ion-text>
|
|
19
|
+
</ion-label>
|
|
20
|
+
</ion-item>
|
|
21
|
+
|
|
22
|
+
<!-- Transport Status -->
|
|
23
|
+
<ion-item *ngIf="transportState() !== 'idle'">
|
|
24
|
+
<ion-icon [name]="getTransportDisplay().icon" slot="start" [color]="getTransportDisplay().color"></ion-icon>
|
|
25
|
+
<ion-label>
|
|
26
|
+
<p>Transport</p>
|
|
27
|
+
<div class="badges">
|
|
28
|
+
<ion-badge [color]="getTransportDisplay().color">{{ getTransportDisplay().label }}</ion-badge>
|
|
29
|
+
</div>
|
|
30
|
+
</ion-label>
|
|
31
|
+
</ion-item>
|
|
32
|
+
|
|
33
|
+
<!-- Ledger & Network -->
|
|
34
|
+
<ion-item>
|
|
35
|
+
<ion-icon name="globe-outline" slot="start" color="primary"></ion-icon>
|
|
36
|
+
<ion-label>
|
|
37
|
+
<p>Network</p>
|
|
38
|
+
<div class="badges">
|
|
39
|
+
<ion-badge color="success">{{ session()!.ledgerId }}</ion-badge>
|
|
40
|
+
<ion-badge>{{ session()!.networkId }}</ion-badge>
|
|
41
|
+
</div>
|
|
42
|
+
</ion-label>
|
|
43
|
+
</ion-item>
|
|
44
|
+
|
|
45
|
+
<!-- dApp Info -->
|
|
46
|
+
<ion-item *ngIf="session()!.appName || session()!.appId">
|
|
47
|
+
<ion-icon name="globe-outline" slot="start" color="secondary"></ion-icon>
|
|
48
|
+
<ion-label>
|
|
49
|
+
<p>dApp</p>
|
|
50
|
+
<ion-text>
|
|
51
|
+
<strong>{{ session()!.appName || session()!.appId }}</strong>
|
|
52
|
+
</ion-text>
|
|
53
|
+
</ion-label>
|
|
54
|
+
</ion-item>
|
|
55
|
+
|
|
56
|
+
<!-- Connected Accounts -->
|
|
57
|
+
<ion-item *ngIf="session()?.accounts && session()!.accounts!.length > 0" class="accounts-section">
|
|
58
|
+
<ion-icon name="person-outline" slot="start" color="tertiary"></ion-icon>
|
|
59
|
+
<ion-label>
|
|
60
|
+
<p>Connected Accounts ({{ session()!.accounts!.length }})</p>
|
|
61
|
+
<div class="account-list">
|
|
62
|
+
<div *ngFor="let account of session()!.accounts" class="account-item">
|
|
63
|
+
<ion-text class="account-address">
|
|
64
|
+
{{ formatAddress(account.address || '') }}
|
|
65
|
+
</ion-text>
|
|
66
|
+
<div class="account-badges">
|
|
67
|
+
<ion-badge color="tertiary" size="small">{{ account.ledgerId }}</ion-badge>
|
|
68
|
+
<ion-badge size="small">{{ account.networkId }}</ion-badge>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</ion-label>
|
|
73
|
+
</ion-item>
|
|
74
|
+
|
|
75
|
+
<!-- Timestamps -->
|
|
76
|
+
<ng-container *ngIf="showTimestamps && hasCreatedAt()">
|
|
77
|
+
<ion-item>
|
|
78
|
+
<ion-icon name="time-outline" slot="start"></ion-icon>
|
|
79
|
+
<ion-label>
|
|
80
|
+
<p>Created</p>
|
|
81
|
+
<ion-text class="timestamp">
|
|
82
|
+
{{ getCreatedAtFormatted() }}
|
|
83
|
+
</ion-text>
|
|
84
|
+
</ion-label>
|
|
85
|
+
</ion-item>
|
|
86
|
+
</ng-container>
|
|
87
|
+
|
|
88
|
+
<!-- Metadata -->
|
|
89
|
+
<ng-container *ngIf="showMetadata && session()!.metadata">
|
|
90
|
+
<ion-item>
|
|
91
|
+
<ion-label>
|
|
92
|
+
<p>Metadata</p>
|
|
93
|
+
<ion-text class="metadata-json">
|
|
94
|
+
<code>{{ session()!.metadata | json }}</code>
|
|
95
|
+
</ion-text>
|
|
96
|
+
</ion-label>
|
|
97
|
+
</ion-item>
|
|
98
|
+
</ng-container>
|
|
99
|
+
</ion-list>
|
|
100
|
+
</ion-card-content>
|
|
101
|
+
</ion-card>
|
|
102
|
+
|
|
103
|
+
<ion-card *ngIf="!session()" class="no-session-card">
|
|
104
|
+
<ion-card-content>
|
|
105
|
+
<ion-text>
|
|
106
|
+
<p class="text-center">No active session</p>
|
|
107
|
+
</ion-text>
|
|
108
|
+
</ion-card-content>
|
|
109
|
+
</ion-card>
|
|
110
|
+
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @component WalletSessionDisplay
|
|
3
|
+
* @compodoc
|
|
4
|
+
* Theme-aware session display component
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
.session-card,
|
|
8
|
+
.no-session-card {
|
|
9
|
+
margin: 0;
|
|
10
|
+
background: var(--wallet-session-bg, var(--surface-flat, rgba(var(--ion-color-light-rgb), 0.05)));
|
|
11
|
+
border: var(--border-width-thin, 1px) solid var(--wallet-session-border, var(--border-flat, rgba(var(--ion-color-light-rgb), 0.1)));
|
|
12
|
+
border-radius: var(--wallet-session-radius, var(--border-radius-lg, 12px));
|
|
13
|
+
box-shadow: var(--wallet-session-shadow, var(--shadow-md));
|
|
14
|
+
animation: fadeIn var(--wallet-transition-slow, var(--duration-slow, 0.3s)) ease;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.title-icon {
|
|
18
|
+
font-size: 1.25em;
|
|
19
|
+
vertical-align: middle;
|
|
20
|
+
margin-right: var(--wallet-spacing-xs, var(--space-xs, 4px));
|
|
21
|
+
color: var(--ion-color-primary);
|
|
22
|
+
transition: transform var(--wallet-transition-fast, var(--duration-fast, 0.15s)) ease;
|
|
23
|
+
display: inline-block;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.session-card:hover .title-icon {
|
|
27
|
+
transform: scale(1.1) rotate(10deg);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.session-id {
|
|
31
|
+
font-family: var(--wallet-account-font-family, var(--font-family-mono, monospace));
|
|
32
|
+
font-size: var(--wallet-font-size-sm, var(--font-size-sm, 13px));
|
|
33
|
+
font-weight: var(--wallet-font-weight-medium, var(--font-weight-medium, 500));
|
|
34
|
+
color: var(--wallet-session-text-primary, var(--ion-text-color));
|
|
35
|
+
line-height: var(--wallet-line-height-normal, var(--line-height-normal, 1.4));
|
|
36
|
+
word-break: break-all;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.badges {
|
|
40
|
+
display: flex;
|
|
41
|
+
gap: var(--wallet-spacing-xs, var(--space-xs, 4px));
|
|
42
|
+
flex-wrap: wrap;
|
|
43
|
+
margin-top: var(--wallet-spacing-xs, var(--space-xs, 4px));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
.accounts-section {
|
|
48
|
+
--inner-padding-top: var(--wallet-spacing-md, 12px);
|
|
49
|
+
--inner-padding-bottom: var(--wallet-spacing-md, 12px);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.account-list {
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: column;
|
|
55
|
+
gap: var(--wallet-spacing-sm, 8px);
|
|
56
|
+
margin-top: var(--wallet-spacing-sm, 8px);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.account-item {
|
|
60
|
+
padding: var(--wallet-spacing-md, 8px);
|
|
61
|
+
background: var(--wallet-account-bg, rgba(var(--ion-color-tertiary-rgb), 0.1));
|
|
62
|
+
border-radius: var(--wallet-account-radius, 8px);
|
|
63
|
+
border-left: var(--wallet-account-border-left, 3px solid var(--ion-color-tertiary));
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: column;
|
|
66
|
+
gap: var(--wallet-spacing-xs, 4px);
|
|
67
|
+
transition: all var(--wallet-transition-normal, 0.2s) ease;
|
|
68
|
+
|
|
69
|
+
&:hover {
|
|
70
|
+
background: var(--wallet-account-bg-hover, rgba(var(--ion-color-tertiary-rgb), 0.15));
|
|
71
|
+
transform: translateX(4px);
|
|
72
|
+
box-shadow: var(--wallet-shadow-sm, var(--shadow-sm));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&:active {
|
|
76
|
+
transform: translateX(2px);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.account-address {
|
|
80
|
+
font-family: var(--wallet-account-font-family, monospace);
|
|
81
|
+
font-size: var(--wallet-font-size-sm, 13px);
|
|
82
|
+
font-weight: var(--wallet-font-weight-medium, 500);
|
|
83
|
+
color: var(--wallet-session-text-primary, var(--ion-text-color));
|
|
84
|
+
line-height: var(--wallet-line-height-normal, 1.4);
|
|
85
|
+
word-break: break-all;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.account-badges {
|
|
89
|
+
display: flex;
|
|
90
|
+
gap: var(--wallet-spacing-xs, 4px);
|
|
91
|
+
flex-wrap: wrap;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.timestamp {
|
|
97
|
+
font-size: var(--wallet-font-size-xs, 12px);
|
|
98
|
+
color: var(--wallet-session-text-secondary, var(--ion-color-medium));
|
|
99
|
+
display: block;
|
|
100
|
+
margin-top: var(--wallet-spacing-xs, 4px);
|
|
101
|
+
line-height: var(--wallet-line-height-normal, 1.4);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.metadata-json {
|
|
105
|
+
display: block;
|
|
106
|
+
font-family: var(--wallet-account-font-family, monospace);
|
|
107
|
+
font-size: var(--wallet-font-size-xs, 12px);
|
|
108
|
+
background: var(--wallet-status-section-bg, rgba(var(--ion-color-medium-rgb), 0.05));
|
|
109
|
+
padding: var(--wallet-spacing-md, 8px);
|
|
110
|
+
border-radius: var(--wallet-account-radius, 6px);
|
|
111
|
+
margin-top: var(--wallet-spacing-xs, 4px);
|
|
112
|
+
overflow-x: auto;
|
|
113
|
+
line-height: var(--wallet-line-height-relaxed, 1.6);
|
|
114
|
+
border: 1px solid var(--wallet-session-border, rgba(var(--ion-color-light-rgb), 0.1));
|
|
115
|
+
|
|
116
|
+
code {
|
|
117
|
+
white-space: pre-wrap;
|
|
118
|
+
word-break: break-all;
|
|
119
|
+
color: var(--wallet-session-text-primary, var(--ion-text-color));
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&::-webkit-scrollbar {
|
|
123
|
+
height: 6px;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&::-webkit-scrollbar-track {
|
|
127
|
+
background: rgba(var(--ion-color-light-rgb), 0.05);
|
|
128
|
+
border-radius: 3px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
&::-webkit-scrollbar-thumb {
|
|
132
|
+
background: rgba(var(--ion-color-light-rgb), 0.2);
|
|
133
|
+
border-radius: 3px;
|
|
134
|
+
|
|
135
|
+
&:hover {
|
|
136
|
+
background: rgba(var(--ion-color-light-rgb), 0.3);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.no-session-card {
|
|
142
|
+
background: rgba(var(--ion-color-medium-rgb), 0.05);
|
|
143
|
+
border: 1px dashed rgba(var(--ion-color-medium-rgb), 0.3);
|
|
144
|
+
|
|
145
|
+
.text-center {
|
|
146
|
+
text-align: center;
|
|
147
|
+
margin: var(--wallet-spacing-lg, 16px) 0;
|
|
148
|
+
color: var(--wallet-session-text-secondary, var(--ion-color-medium));
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/* Animations */
|
|
153
|
+
@keyframes fadeIn {
|
|
154
|
+
from {
|
|
155
|
+
opacity: 0;
|
|
156
|
+
transform: scale(0.98);
|
|
157
|
+
}
|
|
158
|
+
to {
|
|
159
|
+
opacity: 1;
|
|
160
|
+
transform: scale(1);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/* Reduced Motion Support */
|
|
165
|
+
@media (prefers-reduced-motion: reduce) {
|
|
166
|
+
*,
|
|
167
|
+
*::before,
|
|
168
|
+
*::after {
|
|
169
|
+
animation-duration: 0.01ms !important;
|
|
170
|
+
transition-duration: 0.01ms !important;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
@keyframes fadeIn {
|
|
174
|
+
from, to {
|
|
175
|
+
opacity: 1;
|
|
176
|
+
transform: scale(1);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HSuite Native Connect
|
|
3
|
+
* Copyright 2024-2025 HSuite (https://hsuite.finance)
|
|
4
|
+
*
|
|
5
|
+
* SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
|
|
6
|
+
*
|
|
7
|
+
* This file is part of HSuite Native Connect. For commercial licensing,
|
|
8
|
+
* visit https://hsuite.finance/licensing
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { Component, Input, inject, computed } from '@angular/core';
|
|
12
|
+
import { CommonModule } from '@angular/common';
|
|
13
|
+
import {
|
|
14
|
+
IonCard,
|
|
15
|
+
IonCardHeader,
|
|
16
|
+
IonCardTitle,
|
|
17
|
+
IonCardContent,
|
|
18
|
+
IonList,
|
|
19
|
+
IonItem,
|
|
20
|
+
IonLabel,
|
|
21
|
+
IonText,
|
|
22
|
+
IonBadge,
|
|
23
|
+
IonIcon,
|
|
24
|
+
} from '@ionic/angular/standalone';
|
|
25
|
+
import { addIcons } from 'ionicons';
|
|
26
|
+
import {
|
|
27
|
+
timeOutline,
|
|
28
|
+
linkOutline,
|
|
29
|
+
personOutline,
|
|
30
|
+
globeOutline,
|
|
31
|
+
fingerPrintOutline,
|
|
32
|
+
wifiOutline,
|
|
33
|
+
cloudOutline,
|
|
34
|
+
flashOutline,
|
|
35
|
+
syncOutline,
|
|
36
|
+
closeCircleOutline,
|
|
37
|
+
} from 'ionicons/icons';
|
|
38
|
+
import { UnifiedWalletService } from '../../services/unified-wallet.service';
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @component WalletSessionDisplayComponent
|
|
42
|
+
* Displays detailed session information for connected wallet.
|
|
43
|
+
*
|
|
44
|
+
* **Features:**
|
|
45
|
+
* - Session ID and timestamps
|
|
46
|
+
* - Connected accounts list
|
|
47
|
+
* - Ledger and network information
|
|
48
|
+
* - dApp metadata
|
|
49
|
+
* - Theme-aware styling
|
|
50
|
+
*
|
|
51
|
+
* **Usage:**
|
|
52
|
+
* Uses UnifiedWalletService for multi-protocol support (HSuite Native + WalletConnect).
|
|
53
|
+
*/
|
|
54
|
+
@Component({
|
|
55
|
+
selector: 'wallet-session-display',
|
|
56
|
+
standalone: true,
|
|
57
|
+
imports: [
|
|
58
|
+
CommonModule,
|
|
59
|
+
IonCard,
|
|
60
|
+
IonCardHeader,
|
|
61
|
+
IonCardTitle,
|
|
62
|
+
IonCardContent,
|
|
63
|
+
IonList,
|
|
64
|
+
IonItem,
|
|
65
|
+
IonLabel,
|
|
66
|
+
IonText,
|
|
67
|
+
IonBadge,
|
|
68
|
+
IonIcon,
|
|
69
|
+
],
|
|
70
|
+
templateUrl: './wallet-session-display.component.html',
|
|
71
|
+
styleUrls: ['./wallet-session-display.component.scss'],
|
|
72
|
+
})
|
|
73
|
+
export class WalletSessionDisplayComponent {
|
|
74
|
+
/**
|
|
75
|
+
* Whether to show session metadata
|
|
76
|
+
* @default false
|
|
77
|
+
*/
|
|
78
|
+
@Input() showMetadata = false;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Whether to show timestamps
|
|
82
|
+
* @default false
|
|
83
|
+
*/
|
|
84
|
+
@Input() showTimestamps = false;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Whether to show full addresses (not truncated)
|
|
88
|
+
* @default false
|
|
89
|
+
*/
|
|
90
|
+
@Input() showFullAddresses = false;
|
|
91
|
+
|
|
92
|
+
protected readonly wallet = inject(UnifiedWalletService);
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Get session from UnifiedWalletService (supports all protocols)
|
|
96
|
+
*/
|
|
97
|
+
protected readonly session = computed(() => {
|
|
98
|
+
const activeAccount = this.wallet.activeAccount();
|
|
99
|
+
|
|
100
|
+
if (!activeAccount) {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Create session display data from active account
|
|
105
|
+
return {
|
|
106
|
+
sessionId: activeAccount.id,
|
|
107
|
+
accounts: [
|
|
108
|
+
{
|
|
109
|
+
address: activeAccount.address,
|
|
110
|
+
ledgerId: activeAccount.ledgerId,
|
|
111
|
+
networkId: activeAccount.networkId,
|
|
112
|
+
label: activeAccount.label,
|
|
113
|
+
publicKey: (activeAccount.metadata as any)?.publicKey,
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
ledgerId: activeAccount.ledgerId,
|
|
117
|
+
networkId: activeAccount.networkId,
|
|
118
|
+
metadata: {
|
|
119
|
+
createdAt: Date.now(),
|
|
120
|
+
providerType: activeAccount.providerType,
|
|
121
|
+
},
|
|
122
|
+
} as any;
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Transport state for the connection (nostr-only, upgrading, p2p-connected, etc.)
|
|
127
|
+
*/
|
|
128
|
+
readonly transportState = computed(() => this.wallet.transportState());
|
|
129
|
+
|
|
130
|
+
constructor() {
|
|
131
|
+
addIcons({
|
|
132
|
+
timeOutline,
|
|
133
|
+
linkOutline,
|
|
134
|
+
personOutline,
|
|
135
|
+
globeOutline,
|
|
136
|
+
fingerPrintOutline,
|
|
137
|
+
wifiOutline,
|
|
138
|
+
cloudOutline,
|
|
139
|
+
flashOutline,
|
|
140
|
+
syncOutline,
|
|
141
|
+
closeCircleOutline,
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Get transport state display info (icon, color, label)
|
|
147
|
+
*/
|
|
148
|
+
getTransportDisplay(): { icon: string; color: string; label: string } {
|
|
149
|
+
const state = this.transportState();
|
|
150
|
+
switch (state) {
|
|
151
|
+
case 'nostr-only':
|
|
152
|
+
return { icon: 'cloud-outline', color: 'warning', label: 'Nostr Relay' };
|
|
153
|
+
case 'upgrading':
|
|
154
|
+
return { icon: 'sync-outline', color: 'tertiary', label: 'Upgrading to P2P...' };
|
|
155
|
+
case 'p2p-connected':
|
|
156
|
+
return { icon: 'flash-outline', color: 'success', label: 'P2P Connected' };
|
|
157
|
+
case 'p2p-failed':
|
|
158
|
+
return { icon: 'close-circle-outline', color: 'danger', label: 'P2P Failed (using Nostr)' };
|
|
159
|
+
default:
|
|
160
|
+
return { icon: 'wifi-outline', color: 'medium', label: 'Connecting...' };
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Truncate address for display
|
|
166
|
+
*/
|
|
167
|
+
formatAddress(address: string): string {
|
|
168
|
+
if (this.showFullAddresses || address.length <= 16) return address;
|
|
169
|
+
return `${address.substring(0, 8)}...${address.substring(address.length - 6)}`;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Format timestamp
|
|
174
|
+
*/
|
|
175
|
+
formatTimestamp(timestamp: number): string {
|
|
176
|
+
return new Date(timestamp).toLocaleString();
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Check if session has createdAt timestamp
|
|
181
|
+
*/
|
|
182
|
+
hasCreatedAt(): boolean {
|
|
183
|
+
const sess = this.session();
|
|
184
|
+
return !!(sess?.metadata && typeof sess.metadata['createdAt'] === 'number');
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Get formatted createdAt timestamp
|
|
189
|
+
*/
|
|
190
|
+
getCreatedAtFormatted(): string {
|
|
191
|
+
const sess = this.session();
|
|
192
|
+
if (sess?.metadata && typeof sess.metadata['createdAt'] === 'number') {
|
|
193
|
+
return this.formatTimestamp(sess.metadata['createdAt']);
|
|
194
|
+
}
|
|
195
|
+
return '';
|
|
196
|
+
}
|
|
197
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<ion-card [class]="'status-card status-' + status">
|
|
2
|
+
<ion-card-header>
|
|
3
|
+
<div class="status-header">
|
|
4
|
+
<ion-spinner *ngIf="status === 'processing' || status === 'pending'"
|
|
5
|
+
[name]="'crescent'"
|
|
6
|
+
[color]="getStatusConfig().color"
|
|
7
|
+
class="status-spinner">
|
|
8
|
+
</ion-spinner>
|
|
9
|
+
<ion-icon *ngIf="status !== 'processing' && status !== 'pending'"
|
|
10
|
+
[name]="getStatusConfig().icon"
|
|
11
|
+
[color]="getStatusConfig().color"
|
|
12
|
+
class="status-icon">
|
|
13
|
+
</ion-icon>
|
|
14
|
+
<ion-card-title [color]="getStatusConfig().color">
|
|
15
|
+
{{ getStatusConfig().title }}
|
|
16
|
+
</ion-card-title>
|
|
17
|
+
</div>
|
|
18
|
+
</ion-card-header>
|
|
19
|
+
|
|
20
|
+
<ion-card-content>
|
|
21
|
+
<!-- Description -->
|
|
22
|
+
<ion-text class="status-description">
|
|
23
|
+
<p>{{ getStatusConfig().description }}</p>
|
|
24
|
+
</ion-text>
|
|
25
|
+
|
|
26
|
+
<!-- Transaction ID (for success) -->
|
|
27
|
+
<div *ngIf="status === 'success' && transactionId" class="transaction-id-section">
|
|
28
|
+
<ion-text>
|
|
29
|
+
<p class="section-label">Transaction ID</p>
|
|
30
|
+
<p class="transaction-id">{{ formatTransactionId(transactionId) }}</p>
|
|
31
|
+
</ion-text>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<!-- Error Details (for failed) -->
|
|
35
|
+
<div *ngIf="status === 'failed' && error" class="error-section">
|
|
36
|
+
<ion-text color="danger">
|
|
37
|
+
<p class="section-label">Error Details</p>
|
|
38
|
+
<p class="error-message">{{ error }}</p>
|
|
39
|
+
</ion-text>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<!-- Actions -->
|
|
43
|
+
<div class="actions" *ngIf="explorerUrl || showRetry">
|
|
44
|
+
<ion-button
|
|
45
|
+
*ngIf="explorerUrl && status === 'success'"
|
|
46
|
+
expand="block"
|
|
47
|
+
fill="outline"
|
|
48
|
+
[color]="'primary'"
|
|
49
|
+
(click)="openExplorer()">
|
|
50
|
+
<ion-icon name="open-outline" slot="start"></ion-icon>
|
|
51
|
+
View in Explorer
|
|
52
|
+
</ion-button>
|
|
53
|
+
|
|
54
|
+
<ion-button
|
|
55
|
+
*ngIf="showRetry && (status === 'failed' || status === 'timeout' || status === 'rejected')"
|
|
56
|
+
expand="block"
|
|
57
|
+
[color]="'primary'"
|
|
58
|
+
(click)="onRetry()">
|
|
59
|
+
<ion-icon name="refresh-outline" slot="start"></ion-icon>
|
|
60
|
+
Retry Transaction
|
|
61
|
+
</ion-button>
|
|
62
|
+
</div>
|
|
63
|
+
</ion-card-content>
|
|
64
|
+
</ion-card>
|
|
65
|
+
|