@hsuite/native-connect-angular 2.1.1 → 2.1.3
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/LICENSE +146 -0
- package/dist/fesm2022/hsuite-native-connect-angular.mjs +321 -619
- package/dist/fesm2022/hsuite-native-connect-angular.mjs.map +1 -1
- package/dist/index.d.ts +5 -235
- package/package.json +37 -15
- package/USAGE_EXAMPLES.md +0 -476
- package/assets/wallets/extension.svg +0 -7
- package/assets/wallets/hashpack.svg +0 -6
- package/assets/wallets/hsuite.svg +0 -11
- package/assets/wallets/kabila.svg +0 -11
- package/assets/wallets/walletconnect.svg +0 -13
- package/coverage/base.css +0 -224
- package/coverage/block-navigation.js +0 -87
- package/coverage/coverage-summary.json +0 -54
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +0 -476
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -476
- package/coverage/lcov-report/lib/components/account-selector/account-actions/account-actions.component.ts.html +0 -868
- package/coverage/lcov-report/lib/components/account-selector/account-actions/index.html +0 -116
- package/coverage/lcov-report/lib/components/account-selector/account-filter/account-filter.component.ts.html +0 -1288
- package/coverage/lcov-report/lib/components/account-selector/account-filter/index.html +0 -116
- package/coverage/lcov-report/lib/components/account-selector/account-formatting.service.ts.html +0 -679
- package/coverage/lcov-report/lib/components/account-selector/account-grouping.service.ts.html +0 -766
- package/coverage/lcov-report/lib/components/account-selector/account-list/account-list.component.ts.html +0 -1495
- package/coverage/lcov-report/lib/components/account-selector/account-list/index.html +0 -116
- package/coverage/lcov-report/lib/components/account-selector/account-selector.component.ts.html +0 -1495
- package/coverage/lcov-report/lib/components/account-selector/account-selector.service.ts.html +0 -1588
- package/coverage/lcov-report/lib/components/account-selector/index.html +0 -161
- package/coverage/lcov-report/lib/components/wallet-account-display/index.html +0 -116
- package/coverage/lcov-report/lib/components/wallet-account-display/wallet-account-display.component.ts.html +0 -505
- package/coverage/lcov-report/lib/components/wallet-connect-button/index.html +0 -116
- package/coverage/lcov-report/lib/components/wallet-connect-button/wallet-connect-button.component.ts.html +0 -829
- package/coverage/lcov-report/lib/components/wallet-connect-prompt/index.html +0 -116
- package/coverage/lcov-report/lib/components/wallet-connect-prompt/wallet-connect-prompt.component.ts.html +0 -409
- package/coverage/lcov-report/lib/components/wallet-connected-guard/index.html +0 -116
- package/coverage/lcov-report/lib/components/wallet-connected-guard/wallet-connected-guard.component.ts.html +0 -304
- package/coverage/lcov-report/lib/components/wallet-connection-modal/connection-method-step/connection-method-step.component.ts.html +0 -436
- package/coverage/lcov-report/lib/components/wallet-connection-modal/connection-method-step/index.html +0 -116
- package/coverage/lcov-report/lib/components/wallet-connection-modal/index.html +0 -116
- package/coverage/lcov-report/lib/components/wallet-connection-modal/qr-pairing-step/index.html +0 -116
- package/coverage/lcov-report/lib/components/wallet-connection-modal/qr-pairing-step/qr-pairing-step.component.ts.html +0 -2287
- package/coverage/lcov-report/lib/components/wallet-connection-modal/wallet-connection-modal.component.ts.html +0 -2518
- package/coverage/lcov-report/lib/components/wallet-session-display/index.html +0 -116
- package/coverage/lcov-report/lib/components/wallet-session-display/wallet-session-display.component.ts.html +0 -676
- package/coverage/lcov-report/lib/components/wallet-transaction-status/index.html +0 -116
- package/coverage/lcov-report/lib/components/wallet-transaction-status/wallet-transaction-status.component.ts.html +0 -703
- package/coverage/lcov-report/lib/directives/index.html +0 -146
- package/coverage/lcov-report/lib/directives/wallet-connected.directive.ts.html +0 -670
- package/coverage/lcov-report/lib/directives/wallet-context.directive.ts.html +0 -547
- package/coverage/lcov-report/lib/directives/wallet-events.directive.ts.html +0 -781
- package/coverage/lcov-report/lib/hsuite-wallet.module.ts.html +0 -715
- package/coverage/lcov-report/lib/index.html +0 -116
- package/coverage/lcov-report/lib/models/connection-config.model.ts.html +0 -280
- package/coverage/lcov-report/lib/models/index.html +0 -131
- package/coverage/lcov-report/lib/models/provider-types.ts.html +0 -583
- package/coverage/lcov-report/lib/providers/base-wallet-provider.ts.html +0 -1138
- package/coverage/lcov-report/lib/providers/hsuite-native/channel-client.service.ts.html +0 -2674
- package/coverage/lcov-report/lib/providers/hsuite-native/index.html +0 -116
- package/coverage/lcov-report/lib/providers/hsuite-native-provider.ts.html +0 -2347
- package/coverage/lcov-report/lib/providers/index.html +0 -146
- package/coverage/lcov-report/lib/providers/p2p-native/index.html +0 -131
- package/coverage/lcov-report/lib/providers/p2p-native/p2p-native.provider.ts.html +0 -2254
- package/coverage/lcov-report/lib/providers/p2p-native/p2p-session-manager.ts.html +0 -2173
- package/coverage/lcov-report/lib/providers/wallet-error-handler.ts.html +0 -1132
- package/coverage/lcov-report/lib/providers/walletconnect/core/index.html +0 -176
- package/coverage/lcov-report/lib/providers/walletconnect/core/session-health.ts.html +0 -673
- package/coverage/lcov-report/lib/providers/walletconnect/core/walletconnect-client-manager.ts.html +0 -1177
- package/coverage/lcov-report/lib/providers/walletconnect/core/walletconnect-provider.ts.html +0 -2566
- package/coverage/lcov-report/lib/providers/walletconnect/core/walletconnect-session-store.ts.html +0 -904
- package/coverage/lcov-report/lib/providers/walletconnect/core/walletconnect-signing-orchestrator.ts.html +0 -982
- package/coverage/lcov-report/lib/providers/walletconnect/signers/hedera-signer.ts.html +0 -1915
- package/coverage/lcov-report/lib/providers/walletconnect/signers/index.html +0 -146
- package/coverage/lcov-report/lib/providers/walletconnect/signers/signer-factory.ts.html +0 -445
- package/coverage/lcov-report/lib/providers/walletconnect/signers/xrpl-signer.ts.html +0 -1519
- package/coverage/lcov-report/lib/services/hsuite-auth.interceptor.ts.html +0 -568
- package/coverage/lcov-report/lib/services/index.html +0 -221
- package/coverage/lcov-report/lib/services/logger.service.ts.html +0 -463
- package/coverage/lcov-report/lib/services/smart-session.service.ts.html +0 -1264
- package/coverage/lcov-report/lib/services/transaction-builders/active-account-source.ts.html +0 -250
- package/coverage/lcov-report/lib/services/transaction-builders/base-transaction-builder.service.ts.html +0 -1840
- package/coverage/lcov-report/lib/services/transaction-builders/hedera-amount-utils.ts.html +0 -337
- package/coverage/lcov-report/lib/services/transaction-builders/hedera-transaction-builder.service.ts.html +0 -3940
- package/coverage/lcov-report/lib/services/transaction-builders/index.html +0 -176
- package/coverage/lcov-report/lib/services/transaction-builders/xrpl-transaction-builder.service.ts.html +0 -2581
- package/coverage/lcov-report/lib/services/transaction.service.ts.html +0 -1120
- package/coverage/lcov-report/lib/services/unified-wallet.service.ts.html +0 -2638
- package/coverage/lcov-report/lib/services/wallet-context.service.ts.html +0 -637
- package/coverage/lcov-report/lib/services/wallet-event-bus.service.ts.html +0 -643
- package/coverage/lcov-report/lib/services/wallet-providers.service.ts.html +0 -493
- package/coverage/lcov-report/lib/transports/chrome-extension-transport.ts.html +0 -823
- package/coverage/lcov-report/lib/transports/index.html +0 -116
- package/coverage/lcov-report/lib/utils/index.html +0 -131
- package/coverage/lcov-report/lib/utils/ledger-icons.util.ts.html +0 -412
- package/coverage/lcov-report/lib/utils/ledger-ui-registry.ts.html +0 -676
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -210
- package/coverage/lcov.info +0 -20366
- package/coverage/lib/components/account-selector/account-actions/account-actions.component.ts.html +0 -868
- package/coverage/lib/components/account-selector/account-actions/index.html +0 -116
- package/coverage/lib/components/account-selector/account-filter/account-filter.component.ts.html +0 -1288
- package/coverage/lib/components/account-selector/account-filter/index.html +0 -116
- package/coverage/lib/components/account-selector/account-formatting.service.ts.html +0 -679
- package/coverage/lib/components/account-selector/account-grouping.service.ts.html +0 -766
- package/coverage/lib/components/account-selector/account-list/account-list.component.ts.html +0 -1495
- package/coverage/lib/components/account-selector/account-list/index.html +0 -116
- package/coverage/lib/components/account-selector/account-selector.component.ts.html +0 -1495
- package/coverage/lib/components/account-selector/account-selector.service.ts.html +0 -1588
- package/coverage/lib/components/account-selector/index.html +0 -161
- package/coverage/lib/components/wallet-account-display/index.html +0 -116
- package/coverage/lib/components/wallet-account-display/wallet-account-display.component.ts.html +0 -505
- package/coverage/lib/components/wallet-connect-button/index.html +0 -116
- package/coverage/lib/components/wallet-connect-button/wallet-connect-button.component.ts.html +0 -829
- package/coverage/lib/components/wallet-connect-prompt/index.html +0 -116
- package/coverage/lib/components/wallet-connect-prompt/wallet-connect-prompt.component.ts.html +0 -409
- package/coverage/lib/components/wallet-connected-guard/index.html +0 -116
- package/coverage/lib/components/wallet-connected-guard/wallet-connected-guard.component.ts.html +0 -304
- package/coverage/lib/components/wallet-connection-modal/connection-method-step/connection-method-step.component.ts.html +0 -436
- package/coverage/lib/components/wallet-connection-modal/connection-method-step/index.html +0 -116
- package/coverage/lib/components/wallet-connection-modal/index.html +0 -116
- package/coverage/lib/components/wallet-connection-modal/qr-pairing-step/index.html +0 -116
- package/coverage/lib/components/wallet-connection-modal/qr-pairing-step/qr-pairing-step.component.ts.html +0 -2287
- package/coverage/lib/components/wallet-connection-modal/wallet-connection-modal.component.ts.html +0 -2518
- package/coverage/lib/components/wallet-session-display/index.html +0 -116
- package/coverage/lib/components/wallet-session-display/wallet-session-display.component.ts.html +0 -676
- package/coverage/lib/components/wallet-transaction-status/index.html +0 -116
- package/coverage/lib/components/wallet-transaction-status/wallet-transaction-status.component.ts.html +0 -703
- package/coverage/lib/directives/index.html +0 -146
- package/coverage/lib/directives/wallet-connected.directive.ts.html +0 -670
- package/coverage/lib/directives/wallet-context.directive.ts.html +0 -547
- package/coverage/lib/directives/wallet-events.directive.ts.html +0 -781
- package/coverage/lib/hsuite-wallet.module.ts.html +0 -715
- package/coverage/lib/index.html +0 -116
- package/coverage/lib/models/connection-config.model.ts.html +0 -280
- package/coverage/lib/models/index.html +0 -131
- package/coverage/lib/models/provider-types.ts.html +0 -583
- package/coverage/lib/providers/base-wallet-provider.ts.html +0 -1138
- package/coverage/lib/providers/hsuite-native/channel-client.service.ts.html +0 -2674
- package/coverage/lib/providers/hsuite-native/index.html +0 -116
- package/coverage/lib/providers/hsuite-native-provider.ts.html +0 -2347
- package/coverage/lib/providers/index.html +0 -146
- package/coverage/lib/providers/p2p-native/index.html +0 -131
- package/coverage/lib/providers/p2p-native/p2p-native.provider.ts.html +0 -2254
- package/coverage/lib/providers/p2p-native/p2p-session-manager.ts.html +0 -2173
- package/coverage/lib/providers/wallet-error-handler.ts.html +0 -1132
- package/coverage/lib/providers/walletconnect/core/index.html +0 -176
- package/coverage/lib/providers/walletconnect/core/session-health.ts.html +0 -673
- package/coverage/lib/providers/walletconnect/core/walletconnect-client-manager.ts.html +0 -1177
- package/coverage/lib/providers/walletconnect/core/walletconnect-provider.ts.html +0 -2566
- package/coverage/lib/providers/walletconnect/core/walletconnect-session-store.ts.html +0 -904
- package/coverage/lib/providers/walletconnect/core/walletconnect-signing-orchestrator.ts.html +0 -982
- package/coverage/lib/providers/walletconnect/signers/hedera-signer.ts.html +0 -1915
- package/coverage/lib/providers/walletconnect/signers/index.html +0 -146
- package/coverage/lib/providers/walletconnect/signers/signer-factory.ts.html +0 -445
- package/coverage/lib/providers/walletconnect/signers/xrpl-signer.ts.html +0 -1519
- package/coverage/lib/services/hsuite-auth.interceptor.ts.html +0 -568
- package/coverage/lib/services/index.html +0 -221
- package/coverage/lib/services/logger.service.ts.html +0 -463
- package/coverage/lib/services/smart-session.service.ts.html +0 -1264
- package/coverage/lib/services/transaction-builders/active-account-source.ts.html +0 -250
- package/coverage/lib/services/transaction-builders/base-transaction-builder.service.ts.html +0 -1840
- package/coverage/lib/services/transaction-builders/hedera-amount-utils.ts.html +0 -337
- package/coverage/lib/services/transaction-builders/hedera-transaction-builder.service.ts.html +0 -3940
- package/coverage/lib/services/transaction-builders/index.html +0 -176
- package/coverage/lib/services/transaction-builders/xrpl-transaction-builder.service.ts.html +0 -2581
- package/coverage/lib/services/transaction.service.ts.html +0 -1120
- package/coverage/lib/services/unified-wallet.service.ts.html +0 -2638
- package/coverage/lib/services/wallet-context.service.ts.html +0 -637
- package/coverage/lib/services/wallet-event-bus.service.ts.html +0 -643
- package/coverage/lib/services/wallet-providers.service.ts.html +0 -493
- package/coverage/lib/transports/chrome-extension-transport.ts.html +0 -823
- package/coverage/lib/transports/index.html +0 -116
- package/coverage/lib/utils/index.html +0 -131
- package/coverage/lib/utils/ledger-icons.util.ts.html +0 -412
- package/coverage/lib/utils/ledger-ui-registry.ts.html +0 -676
- package/coverage/prettify.css +0 -1
- package/coverage/prettify.js +0 -2
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +0 -210
- package/examples/minimal-connect.ts +0 -178
- package/examples/multi-protocol.ts +0 -495
- package/examples/transaction-signing.ts +0 -361
- package/jest.config.json +0 -45
- package/karma.conf.js +0 -42
- package/ng-package.json +0 -20
- package/src/index.ts +0 -229
- package/src/lib/components/account-selector/account-actions/account-actions.component.ts +0 -261
- package/src/lib/components/account-selector/account-filter/account-filter.component.ts +0 -401
- package/src/lib/components/account-selector/account-formatting.service.ts +0 -198
- package/src/lib/components/account-selector/account-grouping.service.ts +0 -227
- package/src/lib/components/account-selector/account-list/account-list.component.ts +0 -470
- package/src/lib/components/account-selector/account-selector.component.html +0 -135
- package/src/lib/components/account-selector/account-selector.component.scss +0 -2039
- package/src/lib/components/account-selector/account-selector.component.ts +0 -470
- package/src/lib/components/account-selector/account-selector.service.ts +0 -501
- package/src/lib/components/wallet-account-display/wallet-account-display.component.html +0 -34
- package/src/lib/components/wallet-account-display/wallet-account-display.component.scss +0 -99
- package/src/lib/components/wallet-account-display/wallet-account-display.component.ts +0 -140
- package/src/lib/components/wallet-connect-button/wallet-connect-button.component.html +0 -14
- package/src/lib/components/wallet-connect-button/wallet-connect-button.component.scss +0 -272
- package/src/lib/components/wallet-connect-button/wallet-connect-button.component.spec.ts +0 -89
- package/src/lib/components/wallet-connect-button/wallet-connect-button.component.ts +0 -248
- package/src/lib/components/wallet-connect-prompt/wallet-connect-prompt.component.html +0 -24
- package/src/lib/components/wallet-connect-prompt/wallet-connect-prompt.component.scss +0 -50
- package/src/lib/components/wallet-connect-prompt/wallet-connect-prompt.component.ts +0 -108
- package/src/lib/components/wallet-connected-guard/wallet-connected-guard.component.html +0 -24
- package/src/lib/components/wallet-connected-guard/wallet-connected-guard.component.ts +0 -73
- package/src/lib/components/wallet-connection-modal/connection-method-step/connection-method-step.component.html +0 -56
- package/src/lib/components/wallet-connection-modal/connection-method-step/connection-method-step.component.scss +0 -218
- package/src/lib/components/wallet-connection-modal/connection-method-step/connection-method-step.component.ts +0 -117
- package/src/lib/components/wallet-connection-modal/qr-pairing-step/qr-pairing-step.component.html +0 -94
- package/src/lib/components/wallet-connection-modal/qr-pairing-step/qr-pairing-step.component.scss +0 -272
- package/src/lib/components/wallet-connection-modal/qr-pairing-step/qr-pairing-step.component.ts +0 -734
- package/src/lib/components/wallet-connection-modal/wallet-connection-modal.component.html +0 -192
- package/src/lib/components/wallet-connection-modal/wallet-connection-modal.component.scss +0 -678
- package/src/lib/components/wallet-connection-modal/wallet-connection-modal.component.spec.ts +0 -173
- package/src/lib/components/wallet-connection-modal/wallet-connection-modal.component.ts +0 -811
- package/src/lib/components/wallet-session-display/wallet-session-display.component.html +0 -110
- package/src/lib/components/wallet-session-display/wallet-session-display.component.scss +0 -179
- package/src/lib/components/wallet-session-display/wallet-session-display.component.ts +0 -197
- package/src/lib/components/wallet-transaction-status/wallet-transaction-status.component.html +0 -65
- package/src/lib/components/wallet-transaction-status/wallet-transaction-status.component.scss +0 -254
- package/src/lib/components/wallet-transaction-status/wallet-transaction-status.component.ts +0 -206
- package/src/lib/directives/wallet-connected.directive.ts +0 -195
- package/src/lib/directives/wallet-context.directive.ts +0 -154
- package/src/lib/directives/wallet-events.directive.ts +0 -232
- package/src/lib/hsuite-wallet.module.ts +0 -210
- package/src/lib/models/connection-config.model.ts +0 -65
- package/src/lib/models/provider-types.ts +0 -166
- package/src/lib/models/unified-account.model.ts +0 -79
- package/src/lib/models/wallet-context.model.ts +0 -121
- package/src/lib/models/wallet-events.model.ts +0 -158
- package/src/lib/providers/base-wallet-provider.ts +0 -351
- package/src/lib/providers/hsuite-native/channel-client.service.spec.ts +0 -73
- package/src/lib/providers/hsuite-native/channel-client.service.ts +0 -863
- package/src/lib/providers/hsuite-native/index.ts +0 -8
- package/src/lib/providers/hsuite-native-provider.ts +0 -754
- package/src/lib/providers/mobile-native/mobile-native.provider.spec.ts +0 -19
- package/src/lib/providers/p2p-native/index.ts +0 -30
- package/src/lib/providers/p2p-native/p2p-native.provider.spec.ts +0 -523
- package/src/lib/providers/p2p-native/p2p-native.provider.ts +0 -723
- package/src/lib/providers/p2p-native/p2p-session-manager.ts +0 -696
- package/src/lib/providers/wallet-error-handler.ts +0 -349
- package/src/lib/providers/walletconnect/core/base-signer.interface.ts +0 -122
- package/src/lib/providers/walletconnect/core/session-health.ts +0 -196
- package/src/lib/providers/walletconnect/core/walletconnect-client-manager.ts +0 -364
- package/src/lib/providers/walletconnect/core/walletconnect-provider.integration.spec.ts +0 -348
- package/src/lib/providers/walletconnect/core/walletconnect-provider.ts +0 -827
- package/src/lib/providers/walletconnect/core/walletconnect-session-store.ts +0 -273
- package/src/lib/providers/walletconnect/core/walletconnect-signing-orchestrator.ts +0 -299
- package/src/lib/providers/walletconnect/core/walletconnect-types.ts +0 -48
- package/src/lib/providers/walletconnect/index.ts +0 -33
- package/src/lib/providers/walletconnect/signers/hedera-signer.spec.ts +0 -367
- package/src/lib/providers/walletconnect/signers/hedera-signer.ts +0 -610
- package/src/lib/providers/walletconnect/signers/signer-factory.spec.ts +0 -62
- package/src/lib/providers/walletconnect/signers/signer-factory.ts +0 -120
- package/src/lib/providers/walletconnect/signers/xrpl-signer.spec.ts +0 -296
- package/src/lib/providers/walletconnect/signers/xrpl-signer.ts +0 -478
- package/src/lib/services/hsuite-auth.interceptor.ts +0 -159
- package/src/lib/services/logger.service.ts +0 -126
- package/src/lib/services/smart-session.service.ts +0 -378
- package/src/lib/services/transaction-builders/active-account-source.spec.ts +0 -75
- package/src/lib/services/transaction-builders/active-account-source.ts +0 -55
- package/src/lib/services/transaction-builders/base-transaction-builder.service.ts +0 -585
- package/src/lib/services/transaction-builders/hedera-amount-utils.ts +0 -84
- package/src/lib/services/transaction-builders/hedera-transaction-builder.service.spec.ts +0 -741
- package/src/lib/services/transaction-builders/hedera-transaction-builder.service.ts +0 -1285
- package/src/lib/services/transaction-builders/index.ts +0 -55
- package/src/lib/services/transaction-builders/xrpl-transaction-builder.service.spec.ts +0 -937
- package/src/lib/services/transaction-builders/xrpl-transaction-builder.service.ts +0 -832
- package/src/lib/services/transaction.service.ts +0 -349
- package/src/lib/services/unified-wallet.service.spec.ts +0 -1382
- package/src/lib/services/unified-wallet.service.ts +0 -851
- package/src/lib/services/wallet-context.service.ts +0 -184
- package/src/lib/services/wallet-event-bus.service.ts +0 -186
- package/src/lib/services/wallet-providers.service.ts +0 -136
- package/src/lib/transports/chrome-extension-transport.ts +0 -246
- package/src/lib/utils/index.ts +0 -15
- package/src/lib/utils/ledger-icons.util.ts +0 -109
- package/src/lib/utils/ledger-ui-registry.ts +0 -197
- package/test/test-setup.ts +0 -21
- package/test-setup.ts +0 -63
- package/tsconfig.build.json +0 -11
- package/tsconfig.json +0 -29
- package/tsconfig.spec.json +0 -15
- package/vitest.config.ts +0 -48
|
@@ -1,248 +0,0 @@
|
|
|
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 { CommonModule } from '@angular/common';
|
|
12
|
-
import { Component, EventEmitter, Input, Output, inject } from '@angular/core';
|
|
13
|
-
import { getLogger } from '@hsuite/native-connect-sdk';
|
|
14
|
-
import { IonButton, IonIcon, IonSpinner, ModalController } from '@ionic/angular/standalone';
|
|
15
|
-
import { addIcons } from 'ionicons';
|
|
16
|
-
import { walletOutline, linkOutline, checkmarkCircleOutline } from 'ionicons/icons';
|
|
17
|
-
|
|
18
|
-
import { DEFAULT_WALLET_URL } from '../../models/provider-types';
|
|
19
|
-
import { UnifiedWalletService } from '../../services/unified-wallet.service';
|
|
20
|
-
import { WalletConnectionModalComponent } from '../wallet-connection-modal/wallet-connection-modal.component';
|
|
21
|
-
|
|
22
|
-
const logger = getLogger().scoped?.('WalletConnectButton') ?? getLogger();
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* @component WalletConnectButtonComponent
|
|
26
|
-
* Ready-to-use wallet connection button for dApps with multi-protocol support.
|
|
27
|
-
*
|
|
28
|
-
* **Features:**
|
|
29
|
-
* - Beautiful connection modal with protocol/network selection
|
|
30
|
-
* - Support for HSuite Native and WalletConnect
|
|
31
|
-
* - Automatic connection state management
|
|
32
|
-
* - Loading states
|
|
33
|
-
* - Session display
|
|
34
|
-
* - One-click connect/disconnect
|
|
35
|
-
* - Theme-aware styling
|
|
36
|
-
*
|
|
37
|
-
* **Design Principles:**
|
|
38
|
-
* - Easy configuration
|
|
39
|
-
* - Fully customizable appearance
|
|
40
|
-
* - Accessible
|
|
41
|
-
* - Responsive
|
|
42
|
-
*/
|
|
43
|
-
@Component({
|
|
44
|
-
selector: 'wallet-connect-button',
|
|
45
|
-
standalone: true,
|
|
46
|
-
imports: [CommonModule, IonButton, IonIcon, IonSpinner],
|
|
47
|
-
providers: [ModalController],
|
|
48
|
-
templateUrl: './wallet-connect-button.component.html',
|
|
49
|
-
styleUrls: ['./wallet-connect-button.component.scss'],
|
|
50
|
-
})
|
|
51
|
-
export class WalletConnectButtonComponent {
|
|
52
|
-
/**
|
|
53
|
-
* WalletConnect project ID (required for WalletConnect)
|
|
54
|
-
*/
|
|
55
|
-
@Input() walletConnectProjectId?: string;
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* App name for wallet metadata
|
|
59
|
-
*/
|
|
60
|
-
@Input() appName: string = 'HSuite Demo';
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* App description for wallet metadata
|
|
64
|
-
*/
|
|
65
|
-
@Input() appDescription: string = 'Multi-chain wallet connection';
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Wallet URL for targeting the wallet window
|
|
69
|
-
*/
|
|
70
|
-
@Input() walletUrl = DEFAULT_WALLET_URL;
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Pins the connection network and hides the network-selection step in the
|
|
74
|
-
* modal. When set to `'mainnet'` or `'testnet'`, the dApp decides the network
|
|
75
|
-
* and the user never sees the picker. When omitted, the user chooses.
|
|
76
|
-
*/
|
|
77
|
-
@Input() network?: 'mainnet' | 'testnet';
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Whether to show session information when connected
|
|
81
|
-
* @default true
|
|
82
|
-
*/
|
|
83
|
-
@Input() showSessionInfo = true;
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Button color (Ionic color)
|
|
87
|
-
* @default 'primary'
|
|
88
|
-
*/
|
|
89
|
-
@Input() buttonColor: string = 'primary';
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Button size
|
|
93
|
-
* @default 'default'
|
|
94
|
-
*/
|
|
95
|
-
@Input() size: 'small' | 'default' | 'large' = 'default';
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Custom button text for connect state
|
|
99
|
-
*/
|
|
100
|
-
@Input() connectText = 'Connect Wallet';
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Custom button text for when wallets are connected (multi-session mode)
|
|
104
|
-
*/
|
|
105
|
-
@Input() connectedText = 'Add Another Wallet';
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Enable multi-session mode (allows multiple connections)
|
|
109
|
-
* @default true
|
|
110
|
-
*/
|
|
111
|
-
@Input() multiSessionMode = true;
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Emitted when wallet successfully connects
|
|
115
|
-
*/
|
|
116
|
-
@Output() connected = new EventEmitter<unknown>();
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Emitted when wallet disconnects
|
|
120
|
-
*/
|
|
121
|
-
@Output() disconnected = new EventEmitter<void>();
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Emitted when connection fails
|
|
125
|
-
*/
|
|
126
|
-
@Output() error = new EventEmitter<Error>();
|
|
127
|
-
|
|
128
|
-
protected readonly wallet = inject(UnifiedWalletService);
|
|
129
|
-
protected readonly modalController = inject(ModalController);
|
|
130
|
-
|
|
131
|
-
protected isConnecting = false;
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
*
|
|
135
|
-
*/
|
|
136
|
-
constructor() {
|
|
137
|
-
addIcons({ walletOutline, linkOutline, checkmarkCircleOutline });
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* Connect to wallet (opens modal - supports multi-session)
|
|
142
|
-
*/
|
|
143
|
-
async connect(): Promise<void> {
|
|
144
|
-
if (this.isConnecting) return;
|
|
145
|
-
|
|
146
|
-
this.isConnecting = true;
|
|
147
|
-
try {
|
|
148
|
-
await this.openConnectionModal();
|
|
149
|
-
} catch (err) {
|
|
150
|
-
const error = err instanceof Error ? err : new Error(String(err));
|
|
151
|
-
this.error.emit(error);
|
|
152
|
-
logger.error('Connection failed', { error: error.message });
|
|
153
|
-
} finally {
|
|
154
|
-
this.isConnecting = false;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Open the new multi-protocol connection modal
|
|
160
|
-
* Passes wallet configuration including walletUrl and metadata for proper window targeting.
|
|
161
|
-
*/
|
|
162
|
-
private async openConnectionModal(): Promise<void> {
|
|
163
|
-
const modal = await this.modalController.create({
|
|
164
|
-
component: WalletConnectionModalComponent,
|
|
165
|
-
componentProps: {
|
|
166
|
-
projectId: this.walletConnectProjectId,
|
|
167
|
-
appName: this.appName,
|
|
168
|
-
appDescription: this.appDescription,
|
|
169
|
-
walletUrl: this.walletUrl,
|
|
170
|
-
network: this.network,
|
|
171
|
-
},
|
|
172
|
-
});
|
|
173
|
-
|
|
174
|
-
await modal.present();
|
|
175
|
-
|
|
176
|
-
const { data } = await modal.onDidDismiss();
|
|
177
|
-
|
|
178
|
-
if (data?.connected) {
|
|
179
|
-
// Emit connected event with unified accounts
|
|
180
|
-
const accounts = this.wallet.allAccounts();
|
|
181
|
-
this.connected.emit({
|
|
182
|
-
protocol: data.protocol,
|
|
183
|
-
network: data.network,
|
|
184
|
-
accounts,
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Disconnect from wallet
|
|
191
|
-
* In multi-session mode, this disconnects ALL sessions
|
|
192
|
-
*/
|
|
193
|
-
async disconnect(): Promise<void> {
|
|
194
|
-
try {
|
|
195
|
-
// Disconnect all sessions via UnifiedWalletService
|
|
196
|
-
await this.wallet.disconnectAll();
|
|
197
|
-
|
|
198
|
-
this.disconnected.emit();
|
|
199
|
-
} catch (err) {
|
|
200
|
-
const error = err instanceof Error ? err : new Error(String(err));
|
|
201
|
-
this.error.emit(error);
|
|
202
|
-
logger.error('Disconnect failed', { error: error.message });
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* Check if unknown wallet is connected
|
|
208
|
-
*/
|
|
209
|
-
isConnected(): boolean {
|
|
210
|
-
return this.wallet.isAnyConnected();
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* Get display text for connection state
|
|
215
|
-
*/
|
|
216
|
-
getButtonText(): string {
|
|
217
|
-
if (this.isConnecting) return 'Connecting...';
|
|
218
|
-
|
|
219
|
-
if (this.multiSessionMode) {
|
|
220
|
-
return this.isConnected() ? this.connectedText : this.connectText;
|
|
221
|
-
}
|
|
222
|
-
return this.isConnected() ? 'Disconnect' : this.connectText;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Get icon name for current state
|
|
227
|
-
*/
|
|
228
|
-
getIconName(): string {
|
|
229
|
-
if (this.isConnected()) return 'checkmark-circle-outline';
|
|
230
|
-
return 'wallet-outline';
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
/**
|
|
234
|
-
* Truncate address for display
|
|
235
|
-
* @param address
|
|
236
|
-
*/
|
|
237
|
-
truncateAddress(address: string): string {
|
|
238
|
-
if (address.length <= 12) return address;
|
|
239
|
-
return `${address.substring(0, 6)}...${address.substring(address.length - 4)}`;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* Get connected accounts (unified)
|
|
244
|
-
*/
|
|
245
|
-
getConnectedAccounts(): any[] {
|
|
246
|
-
return this.wallet.allAccounts();
|
|
247
|
-
}
|
|
248
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<ion-card class="wallet-connect-prompt" [color]="cardColor">
|
|
2
|
-
<ion-card-header>
|
|
3
|
-
<div class="prompt-header">
|
|
4
|
-
<ion-icon *ngIf="showIcon" name="wallet-outline" class="prompt-icon"></ion-icon>
|
|
5
|
-
<div>
|
|
6
|
-
<ion-card-title>{{ title }}</ion-card-title>
|
|
7
|
-
<ion-card-subtitle *ngIf="subtitle">{{ subtitle }}</ion-card-subtitle>
|
|
8
|
-
</div>
|
|
9
|
-
</div>
|
|
10
|
-
</ion-card-header>
|
|
11
|
-
|
|
12
|
-
<ion-card-content>
|
|
13
|
-
<p class="prompt-message">{{ message }}</p>
|
|
14
|
-
|
|
15
|
-
<wallet-connect-button
|
|
16
|
-
[walletConnectProjectId]="walletConnectProjectId"
|
|
17
|
-
[connectText]="buttonText"
|
|
18
|
-
[size]="buttonSize"
|
|
19
|
-
[buttonColor]="buttonColor"
|
|
20
|
-
class="prompt-button"
|
|
21
|
-
/>
|
|
22
|
-
</ion-card-content>
|
|
23
|
-
</ion-card>
|
|
24
|
-
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Wallet Connect Prompt Component Styles
|
|
3
|
-
* @compodoc
|
|
4
|
-
* Styles for the wallet connect prompt empty state component
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
.wallet-connect-prompt {
|
|
8
|
-
max-width: 600px;
|
|
9
|
-
margin: var(--space-lg, 24px) auto;
|
|
10
|
-
text-align: center;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.prompt-header {
|
|
14
|
-
display: flex;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
align-items: center;
|
|
17
|
-
gap: var(--space-sm, 12px);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.prompt-icon {
|
|
21
|
-
font-size: 48px;
|
|
22
|
-
color: var(--ion-color-primary);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.prompt-message {
|
|
26
|
-
margin: var(--space-md, 16px) 0;
|
|
27
|
-
color: var(--ion-color-medium);
|
|
28
|
-
font-size: 14px;
|
|
29
|
-
line-height: 1.6;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.prompt-button {
|
|
33
|
-
margin-top: var(--space-md, 16px);
|
|
34
|
-
|
|
35
|
-
::ng-deep ion-button {
|
|
36
|
-
margin: 0 auto;
|
|
37
|
-
display: block;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
@media (max-width: 576px) {
|
|
42
|
-
.wallet-connect-prompt {
|
|
43
|
-
margin: var(--space-md, 16px);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.prompt-icon {
|
|
47
|
-
font-size: 36px;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
@@ -1,108 +0,0 @@
|
|
|
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
|
-
/**
|
|
12
|
-
* @file wallet-connect-prompt.component.ts
|
|
13
|
-
* @description Beautiful empty state component with connect button
|
|
14
|
-
*
|
|
15
|
-
* Pre-built component for showing a professional "connect wallet" prompt.
|
|
16
|
-
* Eliminates repetitive empty state boilerplate.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
import { Component, Input } from '@angular/core';
|
|
20
|
-
import { CommonModule } from '@angular/common';
|
|
21
|
-
import {
|
|
22
|
-
IonCard,
|
|
23
|
-
IonCardHeader,
|
|
24
|
-
IonCardTitle,
|
|
25
|
-
IonCardSubtitle,
|
|
26
|
-
IonCardContent,
|
|
27
|
-
IonIcon,
|
|
28
|
-
} from '@ionic/angular/standalone';
|
|
29
|
-
import { addIcons } from 'ionicons';
|
|
30
|
-
import { walletOutline } from 'ionicons/icons';
|
|
31
|
-
import { WalletConnectButtonComponent } from '../wallet-connect-button/wallet-connect-button.component';
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Pre-built component for "connect wallet" empty state
|
|
35
|
-
*
|
|
36
|
-
* Features:
|
|
37
|
-
* - Beautiful, professional design
|
|
38
|
-
* - Integrated connect button
|
|
39
|
-
* - Customizable message
|
|
40
|
-
* - Responsive styling
|
|
41
|
-
* - Optional icon
|
|
42
|
-
*/
|
|
43
|
-
@Component({
|
|
44
|
-
selector: 'wallet-connect-prompt',
|
|
45
|
-
standalone: true,
|
|
46
|
-
imports: [
|
|
47
|
-
CommonModule,
|
|
48
|
-
IonCard,
|
|
49
|
-
IonCardHeader,
|
|
50
|
-
IonCardTitle,
|
|
51
|
-
IonCardSubtitle,
|
|
52
|
-
IonCardContent,
|
|
53
|
-
IonIcon,
|
|
54
|
-
WalletConnectButtonComponent,
|
|
55
|
-
],
|
|
56
|
-
templateUrl: './wallet-connect-prompt.component.html',
|
|
57
|
-
styleUrls: ['./wallet-connect-prompt.component.scss'],
|
|
58
|
-
})
|
|
59
|
-
export class WalletConnectPromptComponent {
|
|
60
|
-
/**
|
|
61
|
-
* Main title text
|
|
62
|
-
*/
|
|
63
|
-
@Input() title = 'Connect Your Wallet';
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Subtitle text (optional)
|
|
67
|
-
*/
|
|
68
|
-
@Input() subtitle = '';
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Message explaining why connection is needed
|
|
72
|
-
*/
|
|
73
|
-
@Input() message = 'Connect your wallet to continue';
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Whether to show the wallet icon
|
|
77
|
-
*/
|
|
78
|
-
@Input() showIcon = true;
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Text for the connect button
|
|
82
|
-
*/
|
|
83
|
-
@Input() buttonText = 'Connect Wallet';
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Button size
|
|
87
|
-
*/
|
|
88
|
-
@Input() buttonSize: 'small' | 'default' | 'large' = 'default';
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Button color
|
|
92
|
-
*/
|
|
93
|
-
@Input() buttonColor = 'primary';
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Card background color
|
|
97
|
-
*/
|
|
98
|
-
@Input() cardColor: string | undefined = undefined;
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* WalletConnect Project ID (optional)
|
|
102
|
-
*/
|
|
103
|
-
@Input() walletConnectProjectId: string | undefined = undefined;
|
|
104
|
-
|
|
105
|
-
constructor() {
|
|
106
|
-
addIcons({ walletOutline });
|
|
107
|
-
}
|
|
108
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<!-- Show content when connected -->
|
|
2
|
-
<ng-container *ngIf="isConnected()">
|
|
3
|
-
<ng-content></ng-content>
|
|
4
|
-
</ng-container>
|
|
5
|
-
|
|
6
|
-
<!-- Show empty state when not connected -->
|
|
7
|
-
<ng-container *ngIf="!isConnected()">
|
|
8
|
-
<!-- Custom empty template if provided -->
|
|
9
|
-
<ng-container *ngIf="emptyTemplate; else defaultEmpty">
|
|
10
|
-
<ng-container *ngTemplateOutlet="emptyTemplate"></ng-container>
|
|
11
|
-
</ng-container>
|
|
12
|
-
|
|
13
|
-
<!-- Default empty state: connect prompt -->
|
|
14
|
-
<ng-template #defaultEmpty>
|
|
15
|
-
<wallet-connect-prompt
|
|
16
|
-
[title]="emptyTitle"
|
|
17
|
-
[subtitle]="emptySubtitle"
|
|
18
|
-
[message]="emptyMessage"
|
|
19
|
-
[showIcon]="showIcon"
|
|
20
|
-
[walletConnectProjectId]="walletConnectProjectId"
|
|
21
|
-
/>
|
|
22
|
-
</ng-template>
|
|
23
|
-
</ng-container>
|
|
24
|
-
|
|
@@ -1,73 +0,0 @@
|
|
|
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
|
-
/**
|
|
12
|
-
* @file wallet-connected-guard.component.ts
|
|
13
|
-
* @description Component-based guard for wallet connection status
|
|
14
|
-
*
|
|
15
|
-
* Alternative to `*walletConnected` directive. Shows content only when connected,
|
|
16
|
-
* with customizable empty state.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
import { Component, Input, computed, inject } from '@angular/core';
|
|
20
|
-
import { CommonModule } from '@angular/common';
|
|
21
|
-
import { WalletContextService } from '../../services/wallet-context.service';
|
|
22
|
-
import { WalletConnectPromptComponent } from '../wallet-connect-prompt/wallet-connect-prompt.component';
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Component-based guard for wallet connection
|
|
26
|
-
*
|
|
27
|
-
* Shows projected content when wallet is connected, otherwise shows
|
|
28
|
-
* a customizable empty state (default: connect prompt).
|
|
29
|
-
*/
|
|
30
|
-
@Component({
|
|
31
|
-
selector: 'wallet-connected-guard',
|
|
32
|
-
standalone: true,
|
|
33
|
-
imports: [CommonModule, WalletConnectPromptComponent],
|
|
34
|
-
templateUrl: './wallet-connected-guard.component.html',
|
|
35
|
-
})
|
|
36
|
-
export class WalletConnectedGuardComponent {
|
|
37
|
-
private readonly contextService = inject(WalletContextService);
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Custom empty state template
|
|
41
|
-
*/
|
|
42
|
-
@Input() emptyTemplate?: any;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Title for default empty state
|
|
46
|
-
*/
|
|
47
|
-
@Input() emptyTitle = 'Connect Your Wallet';
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Subtitle for default empty state
|
|
51
|
-
*/
|
|
52
|
-
@Input() emptySubtitle = '';
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Message for default empty state
|
|
56
|
-
*/
|
|
57
|
-
@Input() emptyMessage = 'Please connect your wallet to continue';
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Whether to show icon in default empty state
|
|
61
|
-
*/
|
|
62
|
-
@Input() showIcon = true;
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* WalletConnect Project ID
|
|
66
|
-
*/
|
|
67
|
-
@Input() walletConnectProjectId: string | undefined = undefined;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Computed connection status
|
|
71
|
-
*/
|
|
72
|
-
protected readonly isConnected = computed(() => this.contextService.context().isConnected);
|
|
73
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
<!-- Connection Method Step -->
|
|
2
|
-
<div class="connection-method-step">
|
|
3
|
-
<div class="step-header">
|
|
4
|
-
<h3 class="step-title">Choose Connection Method</h3>
|
|
5
|
-
<p class="step-description">Select how you'd like to connect to HSuite Wallet</p>
|
|
6
|
-
</div>
|
|
7
|
-
|
|
8
|
-
<div class="method-list">
|
|
9
|
-
<button
|
|
10
|
-
*ngFor="let method of methods; trackBy: trackByMethodId"
|
|
11
|
-
type="button"
|
|
12
|
-
class="method-card"
|
|
13
|
-
[class.selected]="selectedMethod === method.id"
|
|
14
|
-
[class.recommended]="method.recommended"
|
|
15
|
-
[class.disabled]="!method.available"
|
|
16
|
-
[disabled]="!method.available"
|
|
17
|
-
(click)="selectMethod(method)"
|
|
18
|
-
>
|
|
19
|
-
<!-- Recommended badge -->
|
|
20
|
-
<div class="recommended-badge" *ngIf="method.recommended">
|
|
21
|
-
<ion-icon name="checkmark-circle"></ion-icon>
|
|
22
|
-
<span>Recommended</span>
|
|
23
|
-
</div>
|
|
24
|
-
|
|
25
|
-
<!-- Icon -->
|
|
26
|
-
<div class="method-icon">
|
|
27
|
-
<ion-icon [name]="method.icon"></ion-icon>
|
|
28
|
-
</div>
|
|
29
|
-
|
|
30
|
-
<!-- Content -->
|
|
31
|
-
<div class="method-content">
|
|
32
|
-
<h4 class="method-name">{{ method.name }}</h4>
|
|
33
|
-
<p class="method-description">{{ method.description }}</p>
|
|
34
|
-
|
|
35
|
-
<!-- Features list -->
|
|
36
|
-
<ul class="method-features" *ngIf="method.features?.length">
|
|
37
|
-
<li *ngFor="let feature of method.features">
|
|
38
|
-
<ion-icon name="checkmark-circle"></ion-icon>
|
|
39
|
-
<span>{{ feature }}</span>
|
|
40
|
-
</li>
|
|
41
|
-
</ul>
|
|
42
|
-
</div>
|
|
43
|
-
|
|
44
|
-
<!-- Not available message -->
|
|
45
|
-
<div class="not-available" *ngIf="!method.available">
|
|
46
|
-
<span>Not available</span>
|
|
47
|
-
</div>
|
|
48
|
-
</button>
|
|
49
|
-
</div>
|
|
50
|
-
|
|
51
|
-
<!-- Mobile hint -->
|
|
52
|
-
<p class="mobile-hint" *ngIf="isMobile">
|
|
53
|
-
<ion-icon name="phone-portrait-outline"></ion-icon>
|
|
54
|
-
<span>Scan QR code with the HSuite Wallet app on your mobile device</span>
|
|
55
|
-
</p>
|
|
56
|
-
</div>
|